283 lines
13 KiB
Go
283 lines
13 KiB
Go
// 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 (
|
|
AnalyticsOverviewResp = radio.AnalyticsOverviewResp
|
|
AnalyticsReq = radio.AnalyticsReq
|
|
CategoryInfo = radio.CategoryInfo
|
|
CategoryListReq = radio.CategoryListReq
|
|
CategoryListResp = radio.CategoryListResp
|
|
CategoryReq = radio.CategoryReq
|
|
CategoryUpdateReq = radio.CategoryUpdateReq
|
|
ChannelAnalyticsItem = radio.ChannelAnalyticsItem
|
|
ChannelAnalyticsResp = radio.ChannelAnalyticsResp
|
|
ChannelInfo = radio.ChannelInfo
|
|
ChannelListReq = radio.ChannelListReq
|
|
ChannelListResp = radio.ChannelListResp
|
|
CommentReq = radio.CommentReq
|
|
CommonResp = radio.CommonResp
|
|
CreateChannelReq = radio.CreateChannelReq
|
|
CreatePayOrderReq = radio.CreatePayOrderReq
|
|
CreatePayOrderResp = radio.CreatePayOrderResp
|
|
CreateProgramReq = radio.CreateProgramReq
|
|
CreateVoiceReq = radio.CreateVoiceReq
|
|
FavoriteListResp = radio.FavoriteListResp
|
|
GetProfileReq = radio.GetProfileReq
|
|
HistoryListResp = radio.HistoryListResp
|
|
IdReq = radio.IdReq
|
|
IdsReq = radio.IdsReq
|
|
InteractionListReq = radio.InteractionListReq
|
|
ProgramInfo = radio.ProgramInfo
|
|
ProgramListReq = radio.ProgramListReq
|
|
ProgramListResp = radio.ProgramListResp
|
|
RadioUserProfile = radio.RadioUserProfile
|
|
RecordHistoryReq = radio.RecordHistoryReq
|
|
SubscriptionInfo = radio.SubscriptionInfo
|
|
SubscriptionListReq = radio.SubscriptionListReq
|
|
SubscriptionListResp = radio.SubscriptionListResp
|
|
ToggleFavoriteReq = radio.ToggleFavoriteReq
|
|
ToggleLikeReq = radio.ToggleLikeReq
|
|
UpdateChannelReq = radio.UpdateChannelReq
|
|
UpdateProgramReq = radio.UpdateProgramReq
|
|
UpdateVoiceReq = radio.UpdateVoiceReq
|
|
UserAnalyticsResp = radio.UserAnalyticsResp
|
|
VipConfigInfo = radio.VipConfigInfo
|
|
VipConfigListResp = radio.VipConfigListResp
|
|
VoiceInfo = radio.VoiceInfo
|
|
VoiceListReq = radio.VoiceListReq
|
|
VoiceListResp = radio.VoiceListResp
|
|
|
|
RadioService interface {
|
|
// 用户Profile
|
|
GetUserProfile(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error)
|
|
// 分类
|
|
CreateCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateCategory(ctx context.Context, in *CategoryUpdateReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteCategory(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetCategoryList(ctx context.Context, in *CategoryListReq, opts ...grpc.CallOption) (*CategoryListResp, error)
|
|
// 频道
|
|
CreateChannel(ctx context.Context, in *CreateChannelReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateChannel(ctx context.Context, in *UpdateChannelReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteChannel(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetChannelList(ctx context.Context, in *ChannelListReq, opts ...grpc.CallOption) (*ChannelListResp, error)
|
|
GetChannelDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ChannelInfo, error)
|
|
// 节目
|
|
CreateProgram(ctx context.Context, in *CreateProgramReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateProgram(ctx context.Context, in *UpdateProgramReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteProgram(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetProgramList(ctx context.Context, in *ProgramListReq, opts ...grpc.CallOption) (*ProgramListResp, error)
|
|
GetProgramDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ProgramInfo, error)
|
|
// 音色
|
|
CreateVoice(ctx context.Context, in *CreateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
UpdateVoice(ctx context.Context, in *UpdateVoiceReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
DeleteVoice(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetVoiceList(ctx context.Context, in *VoiceListReq, opts ...grpc.CallOption) (*VoiceListResp, error)
|
|
// 互动
|
|
ToggleLike(ctx context.Context, in *ToggleLikeReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
ToggleFavorite(ctx context.Context, in *ToggleFavoriteReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
CommentProgram(ctx context.Context, in *CommentReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
RecordHistory(ctx context.Context, in *RecordHistoryReq, opts ...grpc.CallOption) (*CommonResp, error)
|
|
GetFavoriteList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*FavoriteListResp, error)
|
|
GetHistoryList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*HistoryListResp, error)
|
|
// 订阅/VIP
|
|
GetMySubscriptions(ctx context.Context, in *SubscriptionListReq, opts ...grpc.CallOption) (*SubscriptionListResp, error)
|
|
CreatePayOrder(ctx context.Context, in *CreatePayOrderReq, opts ...grpc.CallOption) (*CreatePayOrderResp, error)
|
|
GetVipConfigList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*VipConfigListResp, error)
|
|
GetMyVipInfo(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error)
|
|
// 数据分析
|
|
GetAnalyticsOverview(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*AnalyticsOverviewResp, error)
|
|
GetChannelAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*ChannelAnalyticsResp, error)
|
|
GetUserAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*UserAnalyticsResp, error)
|
|
}
|
|
|
|
defaultRadioService struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewRadioService(cli zrpc.Client) RadioService {
|
|
return &defaultRadioService{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// 用户Profile
|
|
func (m *defaultRadioService) GetUserProfile(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetUserProfile(ctx, in, opts...)
|
|
}
|
|
|
|
// 分类
|
|
func (m *defaultRadioService) CreateCategory(ctx context.Context, in *CategoryReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.CreateCategory(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) UpdateCategory(ctx context.Context, in *CategoryUpdateReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.UpdateCategory(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) DeleteCategory(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.DeleteCategory(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetCategoryList(ctx context.Context, in *CategoryListReq, opts ...grpc.CallOption) (*CategoryListResp, 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) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.UpdateChannel(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) DeleteChannel(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.DeleteChannel(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetChannelList(ctx context.Context, in *ChannelListReq, opts ...grpc.CallOption) (*ChannelListResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetChannelList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetChannelDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ChannelInfo, 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) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.UpdateProgram(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) DeleteProgram(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.DeleteProgram(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetProgramList(ctx context.Context, in *ProgramListReq, opts ...grpc.CallOption) (*ProgramListResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetProgramList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetProgramDetail(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*ProgramInfo, 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) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.UpdateVoice(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) DeleteVoice(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.DeleteVoice(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetVoiceList(ctx context.Context, in *VoiceListReq, opts ...grpc.CallOption) (*VoiceListResp, 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) (*CommonResp, 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) (*CommonResp, 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) (*CommonResp, 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) (*CommonResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.RecordHistory(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetFavoriteList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*FavoriteListResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetFavoriteList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetHistoryList(ctx context.Context, in *InteractionListReq, opts ...grpc.CallOption) (*HistoryListResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetHistoryList(ctx, in, opts...)
|
|
}
|
|
|
|
// 订阅/VIP
|
|
func (m *defaultRadioService) GetMySubscriptions(ctx context.Context, in *SubscriptionListReq, opts ...grpc.CallOption) (*SubscriptionListResp, 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...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetVipConfigList(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*VipConfigListResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetVipConfigList(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetMyVipInfo(ctx context.Context, in *GetProfileReq, opts ...grpc.CallOption) (*RadioUserProfile, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetMyVipInfo(ctx, in, opts...)
|
|
}
|
|
|
|
// 数据分析
|
|
func (m *defaultRadioService) GetAnalyticsOverview(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*AnalyticsOverviewResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetAnalyticsOverview(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetChannelAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*ChannelAnalyticsResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetChannelAnalytics(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultRadioService) GetUserAnalytics(ctx context.Context, in *AnalyticsReq, opts ...grpc.CallOption) (*UserAnalyticsResp, error) {
|
|
client := radio.NewRadioServiceClient(m.cli.Conn())
|
|
return client.GetUserAnalytics(ctx, in, opts...)
|
|
}
|