Compare commits
1 Commits
feature-mu
...
main
Author | SHA1 | Date | |
---|---|---|---|
88333063d7 |
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,17 +1,12 @@
|
||||
.gitignore
|
||||
.idea
|
||||
.scannerwork
|
||||
.vscode
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
*.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
@ -32,7 +27,4 @@ yarn-error.log*
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
|
||||
/cmd/logs/*.log
|
||||
/cmd/runtime/log/*.log
|
||||
/build/*
|
||||
/cmd/runtime
|
||||
|
1469
api/cast/cast.pb.go
1469
api/cast/cast.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,418 +0,0 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.21.1
|
||||
// source: pb/fiee/cast.proto
|
||||
|
||||
package cast
|
||||
|
||||
import (
|
||||
context "context"
|
||||
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
|
||||
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
|
||||
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
|
||||
grpc_go "github.com/dubbogo/grpc-go"
|
||||
codes "github.com/dubbogo/grpc-go/codes"
|
||||
metadata "github.com/dubbogo/grpc-go/metadata"
|
||||
status "github.com/dubbogo/grpc-go/status"
|
||||
common "github.com/dubbogo/triple/pkg/common"
|
||||
constant "github.com/dubbogo/triple/pkg/common/constant"
|
||||
triple "github.com/dubbogo/triple/pkg/triple"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc_go.SupportPackageIsVersion7
|
||||
|
||||
// CastClient is the client API for Cast service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type CastClient interface {
|
||||
MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment)
|
||||
UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment)
|
||||
UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment)
|
||||
UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment)
|
||||
WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type castClient struct {
|
||||
cc *triple.TripleConn
|
||||
}
|
||||
|
||||
type CastClientImpl struct {
|
||||
MediaUserList func(ctx context.Context, in *MediaUserListReq) (*MediaUserListResp, error)
|
||||
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||
UnbindManager func(ctx context.Context, in *UnbindManagerReq) (*emptypb.Empty, error)
|
||||
BindManager func(ctx context.Context, in *BindManagerReq) (*emptypb.Empty, error)
|
||||
UpdateWorkImage func(ctx context.Context, in *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||
UpdateWorkVideo func(ctx context.Context, in *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||
WorkList func(ctx context.Context, in *WorkListReq) (*WorkListResp, error)
|
||||
}
|
||||
|
||||
func (c *CastClientImpl) GetDubboStub(cc *triple.TripleConn) CastClient {
|
||||
return NewCastClient(cc)
|
||||
}
|
||||
|
||||
func (c *CastClientImpl) XXX_InterfaceName() string {
|
||||
return "Cast.Cast"
|
||||
}
|
||||
|
||||
func NewCastClient(cc *triple.TripleConn) CastClient {
|
||||
return &castClient{cc}
|
||||
}
|
||||
|
||||
func (c *castClient) MediaUserList(ctx context.Context, in *MediaUserListReq, opts ...grpc_go.CallOption) (*MediaUserListResp, common.ErrorWithAttachment) {
|
||||
out := new(MediaUserListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/MediaUserList", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateMediaAccountResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateMediaAccount", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UnbindManager(ctx context.Context, in *UnbindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UnbindManager", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) BindManager(ctx context.Context, in *BindManagerReq, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BindManager", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateWorkImage(ctx context.Context, in *UpdateWorkImageReq, opts ...grpc_go.CallOption) (*UpdateWorkImageResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateWorkImageResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWorkImage", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) UpdateWorkVideo(ctx context.Context, in *UpdateWorkVideoReq, opts ...grpc_go.CallOption) (*UpdateWorkVideoResp, common.ErrorWithAttachment) {
|
||||
out := new(UpdateWorkVideoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWorkVideo", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) WorkList(ctx context.Context, in *WorkListReq, opts ...grpc_go.CallOption) (*WorkListResp, common.ErrorWithAttachment) {
|
||||
out := new(WorkListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/WorkList", in, out)
|
||||
}
|
||||
|
||||
// CastServer is the server API for Cast service.
|
||||
// All implementations must embed UnimplementedCastServer
|
||||
// for forward compatibility
|
||||
type CastServer interface {
|
||||
MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error)
|
||||
UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
||||
UnbindManager(context.Context, *UnbindManagerReq) (*emptypb.Empty, error)
|
||||
BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error)
|
||||
UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error)
|
||||
UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error)
|
||||
WorkList(context.Context, *WorkListReq) (*WorkListResp, error)
|
||||
mustEmbedUnimplementedCastServer()
|
||||
}
|
||||
|
||||
// UnimplementedCastServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedCastServer struct {
|
||||
proxyImpl protocol.Invoker
|
||||
}
|
||||
|
||||
func (UnimplementedCastServer) MediaUserList(context.Context, *MediaUserListReq) (*MediaUserListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MediaUserList not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UnbindManager(context.Context, *UnbindManagerReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnbindManager not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) BindManager(context.Context, *BindManagerReq) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BindManager not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateWorkImage(context.Context, *UpdateWorkImageReq) (*UpdateWorkImageResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkImage not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) UpdateWorkVideo(context.Context, *UpdateWorkVideoReq) (*UpdateWorkVideoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkVideo not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) WorkList(context.Context, *WorkListReq) (*WorkListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WorkList not implemented")
|
||||
}
|
||||
func (s *UnimplementedCastServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
|
||||
func (s *UnimplementedCastServer) XXX_GetProxyImpl() protocol.Invoker {
|
||||
return s.proxyImpl
|
||||
}
|
||||
|
||||
func (s *UnimplementedCastServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
||||
return &Cast_ServiceDesc
|
||||
}
|
||||
func (s *UnimplementedCastServer) XXX_InterfaceName() string {
|
||||
return "Cast.Cast"
|
||||
}
|
||||
|
||||
func (UnimplementedCastServer) mustEmbedUnimplementedCastServer() {}
|
||||
|
||||
// UnsafeCastServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CastServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeCastServer interface {
|
||||
mustEmbedUnimplementedCastServer()
|
||||
}
|
||||
|
||||
func RegisterCastServer(s grpc_go.ServiceRegistrar, srv CastServer) {
|
||||
s.RegisterService(&Cast_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Cast_MediaUserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MediaUserListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("MediaUserList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateMediaAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateMediaAccountReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateMediaAccount", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UnbindManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UnbindManagerReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UnbindManager", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_BindManager_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BindManagerReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("BindManager", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateWorkImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateWorkImageReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateWorkImage", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_UpdateWorkVideo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateWorkVideoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateWorkVideo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_WorkList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(WorkListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("WorkList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Cast_ServiceDesc is the grpc_go.ServiceDesc for Cast service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
||||
ServiceName: "Cast.Cast",
|
||||
HandlerType: (*CastServer)(nil),
|
||||
Methods: []grpc_go.MethodDesc{
|
||||
{
|
||||
MethodName: "MediaUserList",
|
||||
Handler: _Cast_MediaUserList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateMediaAccount",
|
||||
Handler: _Cast_UpdateMediaAccount_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnbindManager",
|
||||
Handler: _Cast_UnbindManager_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BindManager",
|
||||
Handler: _Cast_BindManager_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateWorkImage",
|
||||
Handler: _Cast_UpdateWorkImage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateWorkVideo",
|
||||
Handler: _Cast_UpdateWorkVideo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "WorkList",
|
||||
Handler: _Cast_WorkList_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "pb/fiee/cast.proto",
|
||||
}
|
@ -109,7 +109,6 @@ type Redis struct {
|
||||
|
||||
type System struct {
|
||||
Mode string
|
||||
AppMode string
|
||||
Version string
|
||||
HttpPort string
|
||||
Host string
|
||||
|
2
conf/.gitignore
vendored
2
conf/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
conf.ini
|
||||
dubbogo.yaml
|
36
conf/conf.ini
Normal file
36
conf/conf.ini
Normal file
@ -0,0 +1,36 @@
|
||||
[system]
|
||||
Domain = "fiee"
|
||||
AppMode = "debug"
|
||||
HttpPort = ":8085"
|
||||
Host = "http://127.0.0.1:8085"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName = "dci-file-new"
|
||||
BosUrl = ".bj.bcebos.com"
|
||||
BosBaseDir = "fonchain-main"
|
||||
BosHttp = "https://"
|
||||
BosDomain = "cdns.fontree.cn"
|
||||
[oss]
|
||||
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fonchain-main"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "127.0.0.1:6379"
|
||||
RedisPW = ""
|
||||
RedisDBNAme = "2"
|
||||
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[service]
|
||||
IsHTTPS = false
|
29
conf/dubbogo.yaml
Normal file
29
conf/dubbogo.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
dubbo:
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 5s
|
||||
address: 127.0.0.1:2181
|
||||
consumer:
|
||||
references:
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
# params:
|
||||
# .accessKeyId: "Accountksl"
|
||||
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
BundleClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
@ -1,6 +1,6 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "dev"
|
||||
AppMode = "debug"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
@ -4,8 +4,8 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
# address: 172.16.100.93:2181
|
||||
address: 127.0.0.1:2181
|
||||
address: 172.16.100.93:2181
|
||||
# address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
@ -42,6 +42,3 @@ dubbo:
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
|
@ -1,6 +1,6 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "prod"
|
||||
AppMode = "debug"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
|
@ -42,6 +42,3 @@ dubbo:
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
|
@ -1,6 +1,6 @@
|
||||
[system]
|
||||
Domain = "artistinfo"
|
||||
AppMode = "test"
|
||||
AppMode = "debug"
|
||||
HttpPort = ":8085"
|
||||
Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
@ -10,27 +10,16 @@ Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
BucketName = "dci-file-new"
|
||||
BosUrl = ".bj.bcebos.com"
|
||||
BosBaseDir = "fiee"
|
||||
BosBaseDir = "fonchain-main"
|
||||
BosHttp = "https://"
|
||||
BosDomain = "cdns.fontree.cn"
|
||||
[oss]
|
||||
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
|
||||
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
BucketName = "fontree-test"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisAddr = "172.16.100.114:6379"
|
||||
RedisPW = "kP6tW4tS3qB2dW4aE6uI5cX2"
|
||||
RedisAddr = "redis:6379"
|
||||
RedisPW = "root"
|
||||
RedisDBNAme = "2"
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_uOQpG6IZTqtfLuePIDtfLCGJPqedSCCN"
|
||||
|
@ -4,44 +4,5 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
address: 172.16.100.93:2181
|
||||
# address: 127.0.0.1:2181
|
||||
address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
request-timeout: 30s
|
||||
references:
|
||||
OrderClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "SYD8-order-04"
|
||||
.secretAccessKey: "Al-order-FDF112"
|
||||
BundleClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.Account
|
||||
filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute
|
||||
params:
|
||||
.accessKeyId: "Accountksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
AccountFieeClientImpl:
|
||||
protocol: tri
|
||||
retries: 3
|
||||
interface: com.fontree.microservices.common.micro.account.fiee
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
PaymentCentClientImpl:
|
||||
interface: com.fontree.microservices.common.payment # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,auth
|
||||
params:
|
||||
.accessKeyId: "Paymentksl"
|
||||
.secretAccessKey: "BSDY-FDF1-Fontree_payment"
|
||||
CastClientImpl:
|
||||
protocol: tri
|
||||
interface: com.fontree.microservices.fiee.multicast
|
||||
|
2
go.mod
2
go.mod
@ -101,7 +101,6 @@ require (
|
||||
github.com/BurntSushi/toml v1.2.1
|
||||
github.com/PuerkitoBio/goquery v1.8.1
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0
|
||||
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
@ -132,6 +131,7 @@ require (
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.7.4 // indirect
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-co-op/gocron v1.9.0 // indirect
|
||||
|
@ -2,7 +2,7 @@ package middleware
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -24,14 +24,11 @@ func NewLogger() gin.HandlerFunc {
|
||||
latencyTime := endTime.Sub(startTime) // 请求方式
|
||||
path := c.Request.URL.Path
|
||||
query := c.Request.URL.RawQuery
|
||||
data, _ := io.ReadAll(c.Request.Body)
|
||||
val := c.GetHeader("Accept-Language")
|
||||
if val == "" {
|
||||
c.Request.Header.Set("Accept-Language", "zh-CN")
|
||||
}
|
||||
data, _ := ioutil.ReadAll(c.Request.Body)
|
||||
log.Printf("[%s] %s %d %s %s %s %s %s %s", path, c.Request.Method, c.Writer.Status(), query,
|
||||
string(data), c.ClientIP(), c.Request.UserAgent(), c.Errors.ByType(gin.ErrorTypePrivate).String(), latencyTime.String())
|
||||
c.Request.Body = io.NopCloser(bytes.NewBuffer(data))
|
||||
|
||||
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(data))
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
serviceCast "fonchain-fiee/pkg/service/cast"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func MediaRouter(r *gin.RouterGroup) {
|
||||
//noAuth := r.Group("")
|
||||
auth := r.Group("")
|
||||
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
|
||||
media := auth.Group("media")
|
||||
{
|
||||
media.POST("user-list", serviceCast.MediaUserList)
|
||||
media.POST("unbind-manager", serviceCast.UnbindManager)
|
||||
media.POST("bind-manager", serviceCast.BindManager)
|
||||
media.POST("update-account", serviceCast.UpdateMediaAccount)
|
||||
}
|
||||
|
||||
work := auth.Group("work")
|
||||
{
|
||||
work.POST("update-work-image", serviceCast.UpdateWorkImage)
|
||||
work.POST("update-work-video", serviceCast.UpdateWorkVideo)
|
||||
}
|
||||
}
|
@ -41,7 +41,6 @@ func NewRouter() *gin.Engine {
|
||||
BundleRouter(privateGroup)
|
||||
BundleOrderRouter(privateGroup)
|
||||
ValueAddBundleRouter(privateGroup)
|
||||
MediaRouter(privateGroup)
|
||||
|
||||
{
|
||||
v1.POST("version", version.Version) //版本号公共
|
||||
|
@ -1,118 +0,0 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func MediaUserList(ctx *gin.Context) {
|
||||
var req *cast.MediaUserListReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.MediaUserList(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func UnbindManager(ctx *gin.Context) {
|
||||
var req *cast.UnbindManagerReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
_, err = service.CastProvider.UnbindManager(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func BindManager(ctx *gin.Context) {
|
||||
var req *cast.BindManagerReq
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
_, err = service.CastProvider.BindManager(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateMediaAccount(ctx *gin.Context) {
|
||||
var req *cast.UpdateMediaAccountReq
|
||||
var infoResp *accountFiee.UserInfoResponse
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if err = req.Validate(); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
// 查询艺人的信息
|
||||
// 字符串转整型
|
||||
artistID, err := strconv.ParseUint(req.ArtistUuid, 10, 64)
|
||||
if config.AppConfig.System.AppMode != "dev" {
|
||||
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
ID: artistID,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
infoResp = &accountFiee.UserInfoResponse{
|
||||
Name: "小波",
|
||||
TelNum: "18288888888",
|
||||
}
|
||||
}
|
||||
req.ArtistName = infoResp.Name
|
||||
req.ArtistPhone = infoResp.TelNum
|
||||
if _, ok := cast.PlatformIDENUM_name[int32(req.PlatformID)]; !ok {
|
||||
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.UpdateMediaAccount(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package cast
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func UpdateWorkImage(ctx *gin.Context) {
|
||||
var req *cast.UpdateWorkImageReq
|
||||
var infoResp *accountFiee.UserInfoResponse
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if config.AppConfig.System.AppMode != "dev" {
|
||||
artistId, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
|
||||
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
ID: artistId,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
infoResp = &accountFiee.UserInfoResponse{
|
||||
Name: "小波",
|
||||
TelNum: "18288888888",
|
||||
}
|
||||
}
|
||||
req.ArtistPhone = infoResp.TelNum
|
||||
resp, err := service.CastProvider.UpdateWorkImage(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateWorkVideo(ctx *gin.Context) {
|
||||
var req *cast.UpdateWorkVideoReq
|
||||
var infoResp *accountFiee.UserInfoResponse
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
if config.AppConfig.System.AppMode != "dev" {
|
||||
artistId, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
|
||||
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
|
||||
ID: artistId,
|
||||
Domain: "app",
|
||||
})
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
infoResp = &accountFiee.UserInfoResponse{
|
||||
Name: "小波",
|
||||
TelNum: "18288888888",
|
||||
}
|
||||
}
|
||||
req.ArtistPhone = infoResp.TelNum
|
||||
resp, err := service.CastProvider.UpdateWorkVideo(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
@ -8,7 +8,6 @@ import (
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/api/payment"
|
||||
pkConfig "fonchain-fiee/pkg/config"
|
||||
@ -21,7 +20,6 @@ var AccountFieeProvider = new(accountFiee.AccountFieeClientImpl)
|
||||
var BundleProvider = new(bundle.BundleClientImpl)
|
||||
var OrderProvider = new(order.OrderClientImpl)
|
||||
var PaymentProvider = new(payment.PaymentCentClientImpl)
|
||||
var CastProvider = new(cast.CastClientImpl)
|
||||
|
||||
func init() {
|
||||
config.SetConsumerService(BundleProvider)
|
||||
@ -29,7 +27,6 @@ func init() {
|
||||
config.SetConsumerService(AccountProvider)
|
||||
config.SetConsumerService(PaymentProvider)
|
||||
config.SetConsumerService(AccountFieeProvider)
|
||||
config.SetConsumerService(CastProvider)
|
||||
|
||||
if err := config.Load(); err != nil {
|
||||
panic(err)
|
||||
|
Loading…
Reference in New Issue
Block a user