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
+6
View File
@@ -0,0 +1,6 @@
Name: radio.rpc
ListenOn: 0.0.0.0:8080
Etcd:
Hosts:
- 127.0.0.1:2379
Key: radio.rpc
+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,
}
}
+196
View File
@@ -0,0 +1,196 @@
syntax = "proto3";
package radio;
option go_package = "./radio";
// ========== 用户Profile ==========
message RadioUserProfile {
string id = 1;
string userId = 2;
string nickName = 3;
string avatarId = 4;
int32 isVip = 5;
int64 vipExpireAt = 6;
int32 vipLevel = 7;
}
message GetRadioUserProfileReq { string userId = 1; }
message GetRadioUserProfileResp { RadioUserProfile profile = 1; }
// ========== 分类 ==========
message CategoryInfo {
string id = 1;
string name = 2;
string icon = 3;
int32 sort = 4;
}
message CreateCategoryReq { string name = 1; string icon = 2; int32 sort = 3; }
message CreateCategoryResp { string id = 1; }
message UpdateCategoryReq { string id = 1; string name = 2; string icon = 3; int32 sort = 4; }
message UpdateCategoryResp {}
message DeleteByIdsReq { repeated string ids = 1; }
message DeleteResp {}
message GetCategoryListReq { int32 current = 1; int32 pageSize = 2; }
message GetCategoryListResp { repeated CategoryInfo list = 1; int64 total = 2; }
// ========== 频道 ==========
message ChannelInfo {
string id = 1;
string categoryId = 2;
string name = 3;
string description = 4;
int32 isFree = 5;
int32 isVipOnly = 6;
int32 monthlyPrice = 7;
int32 quarterlyPrice = 8;
int32 annualPrice = 9;
string cover = 10;
string tags = 11;
int32 sort = 12;
int32 status = 13;
int64 createdAt = 14;
}
message CreateChannelReq {
string categoryId = 1; string name = 2; string description = 3;
int32 isFree = 4; int32 isVipOnly = 5;
int32 monthlyPrice = 6; int32 quarterlyPrice = 7; int32 annualPrice = 8;
string cover = 9; string tags = 10; int32 sort = 11;
}
message CreateChannelResp { string id = 1; }
message UpdateChannelReq {
string id = 1; string name = 2; string description = 3;
int32 isFree = 4; int32 isVipOnly = 5;
int32 monthlyPrice = 6; int32 quarterlyPrice = 7; int32 annualPrice = 8;
string cover = 9; string tags = 10; int32 sort = 11; int32 status = 12;
}
message UpdateChannelResp {}
message GetChannelListReq { int32 current = 1; int32 pageSize = 2; string categoryId = 3; string userId = 4; }
message GetChannelListResp { repeated ChannelInfo list = 1; int64 total = 2; }
message GetChannelDetailReq { string id = 1; string userId = 2; }
message GetChannelDetailResp { ChannelInfo channel = 1; }
// ========== 节目 ==========
message ProgramInfo {
string id = 1;
string channelId = 2;
string title = 3;
string description = 4;
string content = 5;
string cover = 6;
string audioId = 7;
int32 audioStatus = 8;
int32 duration = 9;
string tags = 10;
int32 playCount = 11;
int32 likeCount = 12;
int32 status = 13;
int64 createdAt = 14;
}
message CreateProgramReq {
string channelId = 1; string title = 2; string description = 3;
string content = 4; string cover = 5; string tags = 6;
}
message CreateProgramResp { string id = 1; }
message UpdateProgramReq {
string id = 1; string title = 2; string description = 3;
string content = 4; string cover = 5; string audioId = 6;
int32 audioStatus = 7; int32 duration = 8; string tags = 9; int32 status = 10;
}
message UpdateProgramResp {}
message GetProgramListReq { int32 current = 1; int32 pageSize = 2; string channelId = 3; string userId = 4; }
message GetProgramListResp { repeated ProgramInfo list = 1; int64 total = 2; }
message GetProgramDetailReq { string id = 1; string userId = 2; }
message GetProgramDetailResp { ProgramInfo program = 1; }
// ========== 音色 ==========
message VoiceInfo {
string id = 1; string speakerId = 2; string name = 3;
string description = 4; string gender = 5; string icon = 6;
string audioId = 7; int32 sort = 8; int32 status = 9;
int32 isDefault = 10; int32 useCount = 11;
}
message CreateVoiceReq { string speakerId = 1; string name = 2; string description = 3; string gender = 4; string icon = 5; string audioId = 6; int32 sort = 7; int32 isDefault = 8; }
message CreateVoiceResp { string id = 1; }
message UpdateVoiceReq { string id = 1; string name = 2; string description = 3; string icon = 4; string audioId = 5; int32 sort = 6; int32 status = 7; int32 isDefault = 8; }
message UpdateVoiceResp {}
message GetVoiceListReq { int32 current = 1; int32 pageSize = 2; }
message GetVoiceListResp { repeated VoiceInfo list = 1; int64 total = 2; }
// ========== 互动 ==========
message ToggleLikeReq { string userId = 1; string programId = 2; }
message ToggleLikeResp { bool liked = 1; }
message ToggleFavoriteReq { string userId = 1; string programId = 2; }
message ToggleFavoriteResp { bool favorited = 1; }
message CommentReq { string userId = 1; string programId = 2; string content = 3; string parentId = 4; }
message CommentResp {}
message RecordHistoryReq { string userId = 1; string programId = 2; int32 duration = 3; }
message RecordHistoryResp {}
message GetHistoryListReq { string userId = 1; int32 current = 2; int32 pageSize = 3; }
message GetHistoryListResp { repeated ProgramInfo list = 1; int64 total = 2; }
message GetFavoriteListReq { string userId = 1; int32 current = 2; int32 pageSize = 3; }
message GetFavoriteListResp { repeated ProgramInfo list = 1; int64 total = 2; }
// ========== 订阅/支付 ==========
message SubscriptionInfo {
string id = 1; string userId = 2; string channelId = 3;
int64 expiredAt = 4; int32 status = 5;
}
message GetMySubscriptionsReq { string userId = 1; }
message GetMySubscriptionsResp { repeated SubscriptionInfo list = 1; }
message CreatePayOrderReq { string userId = 1; string channelId = 2; string planType = 3; }
message CreatePayOrderResp { string orderNo = 1; string prepayId = 2; }
// ========== VIP ==========
message VipConfigInfo {
string id = 1; string name = 2; string planType = 3;
int32 price = 4; int32 originalPrice = 5; int32 duration = 6;
string desc = 7;
}
message GetVipConfigListReq { int32 current = 1; int32 pageSize = 2; }
message GetVipConfigListResp { repeated VipConfigInfo list = 1; int64 total = 2; }
message GetMyVipInfoReq { string userId = 1; }
message GetMyVipInfoResp { RadioUserProfile profile = 1; }
// ========== 通用 ==========
message Empty {}
// ========== 服务定义 ==========
service RadioService {
// 用户
rpc GetRadioUserProfile(GetRadioUserProfileReq) returns (GetRadioUserProfileResp);
// 分类
rpc CreateCategory(CreateCategoryReq) returns (CreateCategoryResp);
rpc UpdateCategory(UpdateCategoryReq) returns (UpdateCategoryResp);
rpc DeleteCategory(DeleteByIdsReq) returns (DeleteResp);
rpc GetCategoryList(GetCategoryListReq) returns (GetCategoryListResp);
// 频道
rpc CreateChannel(CreateChannelReq) returns (CreateChannelResp);
rpc UpdateChannel(UpdateChannelReq) returns (UpdateChannelResp);
rpc DeleteChannel(DeleteByIdsReq) returns (DeleteResp);
rpc GetChannelList(GetChannelListReq) returns (GetChannelListResp);
rpc GetChannelDetail(GetChannelDetailReq) returns (GetChannelDetailResp);
// 节目
rpc CreateProgram(CreateProgramReq) returns (CreateProgramResp);
rpc UpdateProgram(UpdateProgramReq) returns (UpdateProgramResp);
rpc DeleteProgram(DeleteByIdsReq) returns (DeleteResp);
rpc GetProgramList(GetProgramListReq) returns (GetProgramListResp);
rpc GetProgramDetail(GetProgramDetailReq) returns (GetProgramDetailResp);
// 音色
rpc CreateVoice(CreateVoiceReq) returns (CreateVoiceResp);
rpc UpdateVoice(UpdateVoiceReq) returns (UpdateVoiceResp);
rpc DeleteVoice(DeleteByIdsReq) returns (DeleteResp);
rpc GetVoiceList(GetVoiceListReq) returns (GetVoiceListResp);
// 互动
rpc ToggleLike(ToggleLikeReq) returns (ToggleLikeResp);
rpc ToggleFavorite(ToggleFavoriteReq) returns (ToggleFavoriteResp);
rpc CommentProgram(CommentReq) returns (CommentResp);
rpc RecordHistory(RecordHistoryReq) returns (RecordHistoryResp);
rpc GetHistoryList(GetHistoryListReq) returns (GetHistoryListResp);
rpc GetFavoriteList(GetFavoriteListReq) returns (GetFavoriteListResp);
// 订阅
rpc GetMySubscriptions(GetMySubscriptionsReq) returns (GetMySubscriptionsResp);
rpc CreatePayOrder(CreatePayOrderReq) returns (CreatePayOrderResp);
// VIP
rpc GetVipConfigList(GetVipConfigListReq) returns (GetVipConfigListResp);
rpc GetMyVipInfo(GetMyVipInfoReq) returns (GetMyVipInfoResp);
}
+39
View File
@@ -0,0 +1,39 @@
package main
import (
"flag"
"fmt"
"sundynix-micro-go/app/radio/rpc/internal/config"
"sundynix-micro-go/app/radio/rpc/internal/server"
"sundynix-micro-go/app/radio/rpc/internal/svc"
"sundynix-micro-go/app/radio/rpc/radio"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/core/service"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
var configFile = flag.String("f", "etc/radio.yaml", "the config file")
func main() {
flag.Parse()
var c config.Config
conf.MustLoad(*configFile, &c)
ctx := svc.NewServiceContext(c)
s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
radio.RegisterRadioServiceServer(grpcServer, server.NewRadioServiceServer(ctx))
if c.Mode == service.DevMode || c.Mode == service.TestMode {
reflection.Register(grpcServer)
}
})
defer s.Stop()
fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
s.Start()
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+280
View File
@@ -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...)
}