193 lines
6.8 KiB
Go
193 lines
6.8 KiB
Go
// 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"
|
|
)
|
|
|
|
// 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 {
|
|
UpdateMediaAccount(ctx context.Context, in *UpdateMediaAccountReq, opts ...grpc_go.CallOption) (*UpdateMediaAccountResp, common.ErrorWithAttachment)
|
|
UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment)
|
|
}
|
|
|
|
type castClient struct {
|
|
cc *triple.TripleConn
|
|
}
|
|
|
|
type CastClientImpl struct {
|
|
UpdateMediaAccount func(ctx context.Context, in *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
|
UpdateWork func(ctx context.Context, in *UpdateWorkReq) (*UpdateWorkResp, 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) 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) UpdateWork(ctx context.Context, in *UpdateWorkReq, opts ...grpc_go.CallOption) (*UpdateWorkResp, common.ErrorWithAttachment) {
|
|
out := new(UpdateWorkResp)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateWork", in, out)
|
|
}
|
|
|
|
// CastServer is the server API for Cast service.
|
|
// All implementations must embed UnimplementedCastServer
|
|
// for forward compatibility
|
|
type CastServer interface {
|
|
UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error)
|
|
UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error)
|
|
mustEmbedUnimplementedCastServer()
|
|
}
|
|
|
|
// UnimplementedCastServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedCastServer struct {
|
|
proxyImpl protocol.Invoker
|
|
}
|
|
|
|
func (UnimplementedCastServer) UpdateMediaAccount(context.Context, *UpdateMediaAccountReq) (*UpdateMediaAccountResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateMediaAccount not implemented")
|
|
}
|
|
func (UnimplementedCastServer) UpdateWork(context.Context, *UpdateWorkReq) (*UpdateWorkResp, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateWork 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_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_UpdateWork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateWorkReq)
|
|
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("UpdateWork", 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: "UpdateMediaAccount",
|
|
Handler: _Cast_UpdateMediaAccount_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateWork",
|
|
Handler: _Cast_UpdateWork_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc_go.StreamDesc{},
|
|
Metadata: "pb/fiee/cast.proto",
|
|
}
|