init: init refactor
This commit is contained in:
@@ -0,0 +1,280 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.10.1
|
||||
// Source: radio.proto
|
||||
|
||||
package radioservice
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type (
|
||||
CategoryInfo = radio.CategoryInfo
|
||||
ChannelInfo = radio.ChannelInfo
|
||||
CommentReq = radio.CommentReq
|
||||
CommentResp = radio.CommentResp
|
||||
CreateCategoryReq = radio.CreateCategoryReq
|
||||
CreateCategoryResp = radio.CreateCategoryResp
|
||||
CreateChannelReq = radio.CreateChannelReq
|
||||
CreateChannelResp = radio.CreateChannelResp
|
||||
CreatePayOrderReq = radio.CreatePayOrderReq
|
||||
CreatePayOrderResp = radio.CreatePayOrderResp
|
||||
CreateProgramReq = radio.CreateProgramReq
|
||||
CreateProgramResp = radio.CreateProgramResp
|
||||
CreateVoiceReq = radio.CreateVoiceReq
|
||||
CreateVoiceResp = radio.CreateVoiceResp
|
||||
DeleteByIdsReq = radio.DeleteByIdsReq
|
||||
DeleteResp = radio.DeleteResp
|
||||
Empty = radio.Empty
|
||||
GetCategoryListReq = radio.GetCategoryListReq
|
||||
GetCategoryListResp = radio.GetCategoryListResp
|
||||
GetChannelDetailReq = radio.GetChannelDetailReq
|
||||
GetChannelDetailResp = radio.GetChannelDetailResp
|
||||
GetChannelListReq = radio.GetChannelListReq
|
||||
GetChannelListResp = radio.GetChannelListResp
|
||||
GetFavoriteListReq = radio.GetFavoriteListReq
|
||||
GetFavoriteListResp = radio.GetFavoriteListResp
|
||||
GetHistoryListReq = radio.GetHistoryListReq
|
||||
GetHistoryListResp = radio.GetHistoryListResp
|
||||
GetMySubscriptionsReq = radio.GetMySubscriptionsReq
|
||||
GetMySubscriptionsResp = radio.GetMySubscriptionsResp
|
||||
GetMyVipInfoReq = radio.GetMyVipInfoReq
|
||||
GetMyVipInfoResp = radio.GetMyVipInfoResp
|
||||
GetProgramDetailReq = radio.GetProgramDetailReq
|
||||
GetProgramDetailResp = radio.GetProgramDetailResp
|
||||
GetProgramListReq = radio.GetProgramListReq
|
||||
GetProgramListResp = radio.GetProgramListResp
|
||||
GetRadioUserProfileReq = radio.GetRadioUserProfileReq
|
||||
GetRadioUserProfileResp = radio.GetRadioUserProfileResp
|
||||
GetVipConfigListReq = radio.GetVipConfigListReq
|
||||
GetVipConfigListResp = radio.GetVipConfigListResp
|
||||
GetVoiceListReq = radio.GetVoiceListReq
|
||||
GetVoiceListResp = radio.GetVoiceListResp
|
||||
ProgramInfo = radio.ProgramInfo
|
||||
RadioUserProfile = radio.RadioUserProfile
|
||||
RecordHistoryReq = radio.RecordHistoryReq
|
||||
RecordHistoryResp = radio.RecordHistoryResp
|
||||
SubscriptionInfo = radio.SubscriptionInfo
|
||||
ToggleFavoriteReq = radio.ToggleFavoriteReq
|
||||
ToggleFavoriteResp = radio.ToggleFavoriteResp
|
||||
ToggleLikeReq = radio.ToggleLikeReq
|
||||
ToggleLikeResp = radio.ToggleLikeResp
|
||||
UpdateCategoryReq = radio.UpdateCategoryReq
|
||||
UpdateCategoryResp = radio.UpdateCategoryResp
|
||||
UpdateChannelReq = radio.UpdateChannelReq
|
||||
UpdateChannelResp = radio.UpdateChannelResp
|
||||
UpdateProgramReq = radio.UpdateProgramReq
|
||||
UpdateProgramResp = radio.UpdateProgramResp
|
||||
UpdateVoiceReq = radio.UpdateVoiceReq
|
||||
UpdateVoiceResp = radio.UpdateVoiceResp
|
||||
VipConfigInfo = radio.VipConfigInfo
|
||||
VoiceInfo = radio.VoiceInfo
|
||||
|
||||
RadioService interface {
|
||||
// 用户
|
||||
GetRadioUserProfile(ctx context.Context, in *GetRadioUserProfileReq, opts ...grpc.CallOption) (*GetRadioUserProfileResp, error)
|
||||
// 分类
|
||||
CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*CreateCategoryResp, error)
|
||||
UpdateCategory(ctx context.Context, in *UpdateCategoryReq, opts ...grpc.CallOption) (*UpdateCategoryResp, error)
|
||||
DeleteCategory(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetCategoryList(ctx context.Context, in *GetCategoryListReq, opts ...grpc.CallOption) (*GetCategoryListResp, error)
|
||||
// 频道
|
||||
CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CreateChannelResp, error)
|
||||
UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*UpdateChannelResp, error)
|
||||
DeleteChannel(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetChannelList(ctx context.Context, in *GetChannelListReq, opts ...grpc.CallOption) (*GetChannelListResp, error)
|
||||
GetChannelDetail(ctx context.Context, in *GetChannelDetailReq, opts ...grpc.CallOption) (*GetChannelDetailResp, error)
|
||||
// 节目
|
||||
CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CreateProgramResp, error)
|
||||
UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*UpdateProgramResp, error)
|
||||
DeleteProgram(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetProgramList(ctx context.Context, in *GetProgramListReq, opts ...grpc.CallOption) (*GetProgramListResp, error)
|
||||
GetProgramDetail(ctx context.Context, in *GetProgramDetailReq, opts ...grpc.CallOption) (*GetProgramDetailResp, error)
|
||||
// 音色
|
||||
CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CreateVoiceResp, error)
|
||||
UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*UpdateVoiceResp, error)
|
||||
DeleteVoice(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error)
|
||||
GetVoiceList(ctx context.Context, in *GetVoiceListReq, opts ...grpc.CallOption) (*GetVoiceListResp, error)
|
||||
// 互动
|
||||
ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*ToggleLikeResp, error)
|
||||
ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*ToggleFavoriteResp, error)
|
||||
CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommentResp, error)
|
||||
RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*RecordHistoryResp, error)
|
||||
GetHistoryList(ctx context.Context, in *GetHistoryListReq, opts ...grpc.CallOption) (*GetHistoryListResp, error)
|
||||
GetFavoriteList(ctx context.Context, in *GetFavoriteListReq, opts ...grpc.CallOption) (*GetFavoriteListResp, error)
|
||||
// 订阅
|
||||
GetMySubscriptions(ctx context.Context, in *GetMySubscriptionsReq, opts ...grpc.CallOption) (*GetMySubscriptionsResp, error)
|
||||
CreatePayOrder(ctx context.Context, in *CreatePayOrderReq, opts ...grpc.CallOption) (*CreatePayOrderResp, error)
|
||||
// VIP
|
||||
GetVipConfigList(ctx context.Context, in *GetVipConfigListReq, opts ...grpc.CallOption) (*GetVipConfigListResp, error)
|
||||
GetMyVipInfo(ctx context.Context, in *GetMyVipInfoReq, opts ...grpc.CallOption) (*GetMyVipInfoResp, error)
|
||||
}
|
||||
|
||||
defaultRadioService struct {
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewRadioService(cli zrpc.Client) RadioService {
|
||||
return &defaultRadioService{
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
// 用户
|
||||
func (m *defaultRadioService) GetRadioUserProfile(ctx context.Context, in *GetRadioUserProfileReq, opts ...grpc.CallOption) (*GetRadioUserProfileResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetRadioUserProfile(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 分类
|
||||
func (m *defaultRadioService) CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*CreateCategoryResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateCategory(ctx context.Context, in *UpdateCategoryReq, opts ...grpc.CallOption) (*UpdateCategoryResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteCategory(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteCategory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetCategoryList(ctx context.Context, in *GetCategoryListReq, opts ...grpc.CallOption) (*GetCategoryListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetCategoryList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 频道
|
||||
func (m *defaultRadioService) CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CreateChannelResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*UpdateChannelResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteChannel(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteChannel(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetChannelList(ctx context.Context, in *GetChannelListReq, opts ...grpc.CallOption) (*GetChannelListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetChannelList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetChannelDetail(ctx context.Context, in *GetChannelDetailReq, opts ...grpc.CallOption) (*GetChannelDetailResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetChannelDetail(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 节目
|
||||
func (m *defaultRadioService) CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CreateProgramResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*UpdateProgramResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteProgram(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetProgramList(ctx context.Context, in *GetProgramListReq, opts ...grpc.CallOption) (*GetProgramListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetProgramList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetProgramDetail(ctx context.Context, in *GetProgramDetailReq, opts ...grpc.CallOption) (*GetProgramDetailResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetProgramDetail(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 音色
|
||||
func (m *defaultRadioService) CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CreateVoiceResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreateVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*UpdateVoiceResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.UpdateVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) DeleteVoice(ctx context.Context, in *DeleteByIdsReq, opts ...grpc.CallOption) (*DeleteResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.DeleteVoice(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetVoiceList(ctx context.Context, in *GetVoiceListReq, opts ...grpc.CallOption) (*GetVoiceListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetVoiceList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 互动
|
||||
func (m *defaultRadioService) ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*ToggleLikeResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.ToggleLike(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*ToggleFavoriteResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.ToggleFavorite(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommentResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CommentProgram(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*RecordHistoryResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.RecordHistory(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetHistoryList(ctx context.Context, in *GetHistoryListReq, opts ...grpc.CallOption) (*GetHistoryListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetHistoryList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetFavoriteList(ctx context.Context, in *GetFavoriteListReq, opts ...grpc.CallOption) (*GetFavoriteListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetFavoriteList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 订阅
|
||||
func (m *defaultRadioService) GetMySubscriptions(ctx context.Context, in *GetMySubscriptionsReq, opts ...grpc.CallOption) (*GetMySubscriptionsResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetMySubscriptions(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) CreatePayOrder(ctx context.Context, in *CreatePayOrderReq, opts ...grpc.CallOption) (*CreatePayOrderResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.CreatePayOrder(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// VIP
|
||||
func (m *defaultRadioService) GetVipConfigList(ctx context.Context, in *GetVipConfigListReq, opts ...grpc.CallOption) (*GetVipConfigListResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetVipConfigList(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultRadioService) GetMyVipInfo(ctx context.Context, in *GetMyVipInfoReq, opts ...grpc.CallOption) (*GetMyVipInfoResp, error) {
|
||||
client := radio.NewRadioServiceClient(m.cli.Conn())
|
||||
return client.GetMyVipInfo(ctx, in, opts...)
|
||||
}
|
||||
Reference in New Issue
Block a user