init: init refactor

This commit is contained in:
Blizzard
2026-04-27 00:02:18 +08:00
commit e515f6a287
360 changed files with 30713 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
package config
import "github.com/zeromicro/go-zero/zrpc"
type Config struct {
zrpc.RpcServerConf
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CommentProgramLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCommentProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CommentProgramLogic {
return &CommentProgramLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *CommentProgramLogic) CommentProgram(in *radio.CommentReq) (*radio.CommentResp, error) {
// todo: add your logic here and delete this line
return &radio.CommentResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateCategoryLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreateCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateCategoryLogic {
return &CreateCategoryLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 分类
func (l *CreateCategoryLogic) CreateCategory(in *radio.CreateCategoryReq) (*radio.CreateCategoryResp, error) {
// todo: add your logic here and delete this line
return &radio.CreateCategoryResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateChannelLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreateChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateChannelLogic {
return &CreateChannelLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 频道
func (l *CreateChannelLogic) CreateChannel(in *radio.CreateChannelReq) (*radio.CreateChannelResp, error) {
// todo: add your logic here and delete this line
return &radio.CreateChannelResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CreatePayOrderLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreatePayOrderLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreatePayOrderLogic {
return &CreatePayOrderLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *CreatePayOrderLogic) CreatePayOrder(in *radio.CreatePayOrderReq) (*radio.CreatePayOrderResp, error) {
// todo: add your logic here and delete this line
return &radio.CreatePayOrderResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateProgramLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreateProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateProgramLogic {
return &CreateProgramLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 节目
func (l *CreateProgramLogic) CreateProgram(in *radio.CreateProgramReq) (*radio.CreateProgramResp, error) {
// todo: add your logic here and delete this line
return &radio.CreateProgramResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type CreateVoiceLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewCreateVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateVoiceLogic {
return &CreateVoiceLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 音色
func (l *CreateVoiceLogic) CreateVoice(in *radio.CreateVoiceReq) (*radio.CreateVoiceResp, error) {
// todo: add your logic here and delete this line
return &radio.CreateVoiceResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type DeleteCategoryLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewDeleteCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteCategoryLogic {
return &DeleteCategoryLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *DeleteCategoryLogic) DeleteCategory(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
// todo: add your logic here and delete this line
return &radio.DeleteResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type DeleteChannelLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewDeleteChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteChannelLogic {
return &DeleteChannelLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *DeleteChannelLogic) DeleteChannel(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
// todo: add your logic here and delete this line
return &radio.DeleteResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type DeleteProgramLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewDeleteProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteProgramLogic {
return &DeleteProgramLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *DeleteProgramLogic) DeleteProgram(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
// todo: add your logic here and delete this line
return &radio.DeleteResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type DeleteVoiceLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewDeleteVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteVoiceLogic {
return &DeleteVoiceLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *DeleteVoiceLogic) DeleteVoice(in *radio.DeleteByIdsReq) (*radio.DeleteResp, error) {
// todo: add your logic here and delete this line
return &radio.DeleteResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetCategoryListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetCategoryListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCategoryListLogic {
return &GetCategoryListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetCategoryListLogic) GetCategoryList(in *radio.GetCategoryListReq) (*radio.GetCategoryListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetCategoryListResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetChannelDetailLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetChannelDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetChannelDetailLogic {
return &GetChannelDetailLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetChannelDetailLogic) GetChannelDetail(in *radio.GetChannelDetailReq) (*radio.GetChannelDetailResp, error) {
// todo: add your logic here and delete this line
return &radio.GetChannelDetailResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetChannelListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetChannelListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetChannelListLogic {
return &GetChannelListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetChannelListLogic) GetChannelList(in *radio.GetChannelListReq) (*radio.GetChannelListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetChannelListResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetFavoriteListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetFavoriteListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetFavoriteListLogic {
return &GetFavoriteListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetFavoriteListLogic) GetFavoriteList(in *radio.GetFavoriteListReq) (*radio.GetFavoriteListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetFavoriteListResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetHistoryListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetHistoryListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetHistoryListLogic {
return &GetHistoryListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetHistoryListLogic) GetHistoryList(in *radio.GetHistoryListReq) (*radio.GetHistoryListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetHistoryListResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetMySubscriptionsLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetMySubscriptionsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetMySubscriptionsLogic {
return &GetMySubscriptionsLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 订阅
func (l *GetMySubscriptionsLogic) GetMySubscriptions(in *radio.GetMySubscriptionsReq) (*radio.GetMySubscriptionsResp, error) {
// todo: add your logic here and delete this line
return &radio.GetMySubscriptionsResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetMyVipInfoLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetMyVipInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetMyVipInfoLogic {
return &GetMyVipInfoLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetMyVipInfoLogic) GetMyVipInfo(in *radio.GetMyVipInfoReq) (*radio.GetMyVipInfoResp, error) {
// todo: add your logic here and delete this line
return &radio.GetMyVipInfoResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetProgramDetailLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetProgramDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProgramDetailLogic {
return &GetProgramDetailLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetProgramDetailLogic) GetProgramDetail(in *radio.GetProgramDetailReq) (*radio.GetProgramDetailResp, error) {
// todo: add your logic here and delete this line
return &radio.GetProgramDetailResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetProgramListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetProgramListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetProgramListLogic {
return &GetProgramListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetProgramListLogic) GetProgramList(in *radio.GetProgramListReq) (*radio.GetProgramListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetProgramListResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetRadioUserProfileLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetRadioUserProfileLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetRadioUserProfileLogic {
return &GetRadioUserProfileLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 用户
func (l *GetRadioUserProfileLogic) GetRadioUserProfile(in *radio.GetRadioUserProfileReq) (*radio.GetRadioUserProfileResp, error) {
// todo: add your logic here and delete this line
return &radio.GetRadioUserProfileResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetVipConfigListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetVipConfigListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetVipConfigListLogic {
return &GetVipConfigListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// VIP
func (l *GetVipConfigListLogic) GetVipConfigList(in *radio.GetVipConfigListReq) (*radio.GetVipConfigListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetVipConfigListResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type GetVoiceListLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewGetVoiceListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetVoiceListLogic {
return &GetVoiceListLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *GetVoiceListLogic) GetVoiceList(in *radio.GetVoiceListReq) (*radio.GetVoiceListResp, error) {
// todo: add your logic here and delete this line
return &radio.GetVoiceListResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type RecordHistoryLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewRecordHistoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RecordHistoryLogic {
return &RecordHistoryLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *RecordHistoryLogic) RecordHistory(in *radio.RecordHistoryReq) (*radio.RecordHistoryResp, error) {
// todo: add your logic here and delete this line
return &radio.RecordHistoryResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type ToggleFavoriteLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewToggleFavoriteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ToggleFavoriteLogic {
return &ToggleFavoriteLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *ToggleFavoriteLogic) ToggleFavorite(in *radio.ToggleFavoriteReq) (*radio.ToggleFavoriteResp, error) {
// todo: add your logic here and delete this line
return &radio.ToggleFavoriteResp{}, nil
}
@@ -0,0 +1,31 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type ToggleLikeLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewToggleLikeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ToggleLikeLogic {
return &ToggleLikeLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// 互动
func (l *ToggleLikeLogic) ToggleLike(in *radio.ToggleLikeReq) (*radio.ToggleLikeResp, error) {
// todo: add your logic here and delete this line
return &radio.ToggleLikeResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type UpdateCategoryLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewUpdateCategoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateCategoryLogic {
return &UpdateCategoryLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UpdateCategoryLogic) UpdateCategory(in *radio.UpdateCategoryReq) (*radio.UpdateCategoryResp, error) {
// todo: add your logic here and delete this line
return &radio.UpdateCategoryResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type UpdateChannelLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewUpdateChannelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateChannelLogic {
return &UpdateChannelLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UpdateChannelLogic) UpdateChannel(in *radio.UpdateChannelReq) (*radio.UpdateChannelResp, error) {
// todo: add your logic here and delete this line
return &radio.UpdateChannelResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type UpdateProgramLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewUpdateProgramLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateProgramLogic {
return &UpdateProgramLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UpdateProgramLogic) UpdateProgram(in *radio.UpdateProgramReq) (*radio.UpdateProgramResp, error) {
// todo: add your logic here and delete this line
return &radio.UpdateProgramResp{}, nil
}
@@ -0,0 +1,30 @@
package logic
import (
"context"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/logx"
)
type UpdateVoiceLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewUpdateVoiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateVoiceLogic {
return &UpdateVoiceLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *UpdateVoiceLogic) UpdateVoice(in *radio.UpdateVoiceReq) (*radio.UpdateVoiceResp, error) {
// todo: add your logic here and delete this line
return &radio.UpdateVoiceResp{}, nil
}
@@ -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)
}
@@ -0,0 +1,13 @@
package svc
import "sundynix-micro-go/app/radio/rpc/internal/config"
type ServiceContext struct {
Config config.Config
}
func NewServiceContext(c config.Config) *ServiceContext {
return &ServiceContext{
Config: c,
}
}