2025-05-21 06:52:33 +00:00
// 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 {
2025-05-23 05:25:47 +00:00
UpdateMediaAccount ( ctx context . Context , in * UpdateMediaAccountReq , opts ... grpc_go . CallOption ) ( * UpdateMediaAccountResp , common . ErrorWithAttachment )
2025-05-21 06:52:33 +00:00
}
type castClient struct {
cc * triple . TripleConn
}
type CastClientImpl struct {
2025-05-23 05:25:47 +00:00
UpdateMediaAccount func ( ctx context . Context , in * UpdateMediaAccountReq ) ( * UpdateMediaAccountResp , error )
2025-05-21 06:52:33 +00:00
}
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 }
}
2025-05-23 05:25:47 +00:00
func ( c * castClient ) UpdateMediaAccount ( ctx context . Context , in * UpdateMediaAccountReq , opts ... grpc_go . CallOption ) ( * UpdateMediaAccountResp , common . ErrorWithAttachment ) {
out := new ( UpdateMediaAccountResp )
2025-05-21 06:52:33 +00:00
interfaceKey := ctx . Value ( constant . InterfaceKey ) . ( string )
2025-05-23 05:25:47 +00:00
return out , c . cc . Invoke ( ctx , "/" + interfaceKey + "/UpdateMediaAccount" , in , out )
2025-05-21 06:52:33 +00:00
}
// CastServer is the server API for Cast service.
// All implementations must embed UnimplementedCastServer
// for forward compatibility
type CastServer interface {
2025-05-23 05:25:47 +00:00
UpdateMediaAccount ( context . Context , * UpdateMediaAccountReq ) ( * UpdateMediaAccountResp , error )
2025-05-21 06:52:33 +00:00
mustEmbedUnimplementedCastServer ( )
}
// UnimplementedCastServer must be embedded to have forward compatible implementations.
type UnimplementedCastServer struct {
proxyImpl protocol . Invoker
}
2025-05-23 05:25:47 +00:00
func ( UnimplementedCastServer ) UpdateMediaAccount ( context . Context , * UpdateMediaAccountReq ) ( * UpdateMediaAccountResp , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UpdateMediaAccount not implemented" )
2025-05-21 06:52:33 +00:00
}
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 )
}
2025-05-23 05:25:47 +00:00
func _Cast_UpdateMediaAccount_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc_go . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateMediaAccountReq )
2025-05-21 06:52:33 +00:00
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
}
2025-05-23 05:25:47 +00:00
invo := invocation . NewRPCInvocation ( "UpdateMediaAccount" , args , invAttachment )
2025-05-21 06:52:33 +00:00
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 {
{
2025-05-23 05:25:47 +00:00
MethodName : "UpdateMediaAccount" ,
Handler : _Cast_UpdateMediaAccount_Handler ,
2025-05-21 06:52:33 +00:00
} ,
} ,
Streams : [ ] grpc_go . StreamDesc { } ,
Metadata : "pb/fiee/cast.proto" ,
}