init: init refactor
This commit is contained in:
@@ -0,0 +1,177 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.10.1
|
||||
// Source: radio.proto
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"sundynix-micro-go/app/radio/rpc/internal/logic"
|
||||
"sundynix-micro-go/app/radio/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/radio/rpc/radio"
|
||||
)
|
||||
|
||||
type RadioServiceServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
radio.UnimplementedRadioServiceServer
|
||||
}
|
||||
|
||||
func NewRadioServiceServer(svcCtx *svc.ServiceContext) *RadioServiceServer {
|
||||
return &RadioServiceServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// 用户
|
||||
func (s *RadioServiceServer) GetRadioUserProfile(ctx context.Context, in *radio.GetRadioUserProfileReq) (*radio.GetRadioUserProfileResp, error) {
|
||||
l := logic.NewGetRadioUserProfileLogic(ctx, s.svcCtx)
|
||||
return l.GetRadioUserProfile(in)
|
||||
}
|
||||
|
||||
// 分类
|
||||
func (s *RadioServiceServer) CreateCategory(ctx context.Context, in *radio.CreateCategoryReq) (*radio.CreateCategoryResp, error) {
|
||||
l := logic.NewCreateCategoryLogic(ctx, s.svcCtx)
|
||||
return l.CreateCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateCategory(ctx context.Context, in *radio.UpdateCategoryReq) (*radio.UpdateCategoryResp, error) {
|
||||
l := logic.NewUpdateCategoryLogic(ctx, s.svcCtx)
|
||||
return l.UpdateCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteCategory(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
l := logic.NewDeleteCategoryLogic(ctx, s.svcCtx)
|
||||
return l.DeleteCategory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetCategoryList(ctx context.Context, in *radio.GetCategoryListReq) (*radio.GetCategoryListResp, error) {
|
||||
l := logic.NewGetCategoryListLogic(ctx, s.svcCtx)
|
||||
return l.GetCategoryList(in)
|
||||
}
|
||||
|
||||
// 频道
|
||||
func (s *RadioServiceServer) CreateChannel(ctx context.Context, in *radio.CreateChannelReq) (*radio.CreateChannelResp, error) {
|
||||
l := logic.NewCreateChannelLogic(ctx, s.svcCtx)
|
||||
return l.CreateChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateChannel(ctx context.Context, in *radio.UpdateChannelReq) (*radio.UpdateChannelResp, error) {
|
||||
l := logic.NewUpdateChannelLogic(ctx, s.svcCtx)
|
||||
return l.UpdateChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteChannel(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
l := logic.NewDeleteChannelLogic(ctx, s.svcCtx)
|
||||
return l.DeleteChannel(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetChannelList(ctx context.Context, in *radio.GetChannelListReq) (*radio.GetChannelListResp, error) {
|
||||
l := logic.NewGetChannelListLogic(ctx, s.svcCtx)
|
||||
return l.GetChannelList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetChannelDetail(ctx context.Context, in *radio.GetChannelDetailReq) (*radio.GetChannelDetailResp, error) {
|
||||
l := logic.NewGetChannelDetailLogic(ctx, s.svcCtx)
|
||||
return l.GetChannelDetail(in)
|
||||
}
|
||||
|
||||
// 节目
|
||||
func (s *RadioServiceServer) CreateProgram(ctx context.Context, in *radio.CreateProgramReq) (*radio.CreateProgramResp, error) {
|
||||
l := logic.NewCreateProgramLogic(ctx, s.svcCtx)
|
||||
return l.CreateProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateProgram(ctx context.Context, in *radio.UpdateProgramReq) (*radio.UpdateProgramResp, error) {
|
||||
l := logic.NewUpdateProgramLogic(ctx, s.svcCtx)
|
||||
return l.UpdateProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteProgram(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
l := logic.NewDeleteProgramLogic(ctx, s.svcCtx)
|
||||
return l.DeleteProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetProgramList(ctx context.Context, in *radio.GetProgramListReq) (*radio.GetProgramListResp, error) {
|
||||
l := logic.NewGetProgramListLogic(ctx, s.svcCtx)
|
||||
return l.GetProgramList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetProgramDetail(ctx context.Context, in *radio.GetProgramDetailReq) (*radio.GetProgramDetailResp, error) {
|
||||
l := logic.NewGetProgramDetailLogic(ctx, s.svcCtx)
|
||||
return l.GetProgramDetail(in)
|
||||
}
|
||||
|
||||
// 音色
|
||||
func (s *RadioServiceServer) CreateVoice(ctx context.Context, in *radio.CreateVoiceReq) (*radio.CreateVoiceResp, error) {
|
||||
l := logic.NewCreateVoiceLogic(ctx, s.svcCtx)
|
||||
return l.CreateVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) UpdateVoice(ctx context.Context, in *radio.UpdateVoiceReq) (*radio.UpdateVoiceResp, error) {
|
||||
l := logic.NewUpdateVoiceLogic(ctx, s.svcCtx)
|
||||
return l.UpdateVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) DeleteVoice(ctx context.Context, in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
|
||||
l := logic.NewDeleteVoiceLogic(ctx, s.svcCtx)
|
||||
return l.DeleteVoice(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetVoiceList(ctx context.Context, in *radio.GetVoiceListReq) (*radio.GetVoiceListResp, error) {
|
||||
l := logic.NewGetVoiceListLogic(ctx, s.svcCtx)
|
||||
return l.GetVoiceList(in)
|
||||
}
|
||||
|
||||
// 互动
|
||||
func (s *RadioServiceServer) ToggleLike(ctx context.Context, in *radio.ToggleLikeReq) (*radio.ToggleLikeResp, error) {
|
||||
l := logic.NewToggleLikeLogic(ctx, s.svcCtx)
|
||||
return l.ToggleLike(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) ToggleFavorite(ctx context.Context, in *radio.ToggleFavoriteReq) (*radio.ToggleFavoriteResp, error) {
|
||||
l := logic.NewToggleFavoriteLogic(ctx, s.svcCtx)
|
||||
return l.ToggleFavorite(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) CommentProgram(ctx context.Context, in *radio.CommentReq) (*radio.CommentResp, error) {
|
||||
l := logic.NewCommentProgramLogic(ctx, s.svcCtx)
|
||||
return l.CommentProgram(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) RecordHistory(ctx context.Context, in *radio.RecordHistoryReq) (*radio.RecordHistoryResp, error) {
|
||||
l := logic.NewRecordHistoryLogic(ctx, s.svcCtx)
|
||||
return l.RecordHistory(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetHistoryList(ctx context.Context, in *radio.GetHistoryListReq) (*radio.GetHistoryListResp, error) {
|
||||
l := logic.NewGetHistoryListLogic(ctx, s.svcCtx)
|
||||
return l.GetHistoryList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetFavoriteList(ctx context.Context, in *radio.GetFavoriteListReq) (*radio.GetFavoriteListResp, error) {
|
||||
l := logic.NewGetFavoriteListLogic(ctx, s.svcCtx)
|
||||
return l.GetFavoriteList(in)
|
||||
}
|
||||
|
||||
// 订阅
|
||||
func (s *RadioServiceServer) GetMySubscriptions(ctx context.Context, in *radio.GetMySubscriptionsReq) (*radio.GetMySubscriptionsResp, error) {
|
||||
l := logic.NewGetMySubscriptionsLogic(ctx, s.svcCtx)
|
||||
return l.GetMySubscriptions(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) CreatePayOrder(ctx context.Context, in *radio.CreatePayOrderReq) (*radio.CreatePayOrderResp, error) {
|
||||
l := logic.NewCreatePayOrderLogic(ctx, s.svcCtx)
|
||||
return l.CreatePayOrder(in)
|
||||
}
|
||||
|
||||
// VIP
|
||||
func (s *RadioServiceServer) GetVipConfigList(ctx context.Context, in *radio.GetVipConfigListReq) (*radio.GetVipConfigListResp, error) {
|
||||
l := logic.NewGetVipConfigListLogic(ctx, s.svcCtx)
|
||||
return l.GetVipConfigList(in)
|
||||
}
|
||||
|
||||
func (s *RadioServiceServer) GetMyVipInfo(ctx context.Context, in *radio.GetMyVipInfoReq) (*radio.GetMyVipInfoResp, error) {
|
||||
l := logic.NewGetMyVipInfoLogic(ctx, s.svcCtx)
|
||||
return l.GetMyVipInfo(in)
|
||||
}
|
||||
Reference in New Issue
Block a user