418 lines
17 KiB
Go
418 lines
17 KiB
Go
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-triple v1.0.5
|
|
// - protoc v3.9.0
|
|
// source: api/artwork/artwork.proto
|
|
|
|
package artwork
|
|
|
|
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
|
|
|
|
// ArtworkClient is the client API for Artwork 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 ArtworkClient interface {
|
|
ArtworkAdd(ctx context.Context, in *ArtworkAddRequest, opts ...grpc_go.CallOption) (*ArtworkAddRespond, common.ErrorWithAttachment)
|
|
CheckUserLock(ctx context.Context, in *CheckUserLockRequest, opts ...grpc_go.CallOption) (*CheckUserLockRespond, common.ErrorWithAttachment)
|
|
UpdateArtwork(ctx context.Context, in *UpdateArtworkRequest, opts ...grpc_go.CallOption) (*UpdateArtworkRespond, common.ErrorWithAttachment)
|
|
GetArtworkList(ctx context.Context, in *GetArtworkListRequest, opts ...grpc_go.CallOption) (*GetArtworkListRespond, common.ErrorWithAttachment)
|
|
GetArtwork(ctx context.Context, in *GetArtworkRequest, opts ...grpc_go.CallOption) (*GetArtworkRespond, common.ErrorWithAttachment)
|
|
DelArtwork(ctx context.Context, in *DelArtworkRequest, opts ...grpc_go.CallOption) (*DelArtworkRespond, common.ErrorWithAttachment)
|
|
UploadArtwork(ctx context.Context, in *UploadArtworkRequest, opts ...grpc_go.CallOption) (*UploadArtworkRespond, common.ErrorWithAttachment)
|
|
}
|
|
|
|
type artworkClient struct {
|
|
cc *triple.TripleConn
|
|
}
|
|
|
|
type ArtworkClientImpl struct {
|
|
ArtworkAdd func(ctx context.Context, in *ArtworkAddRequest) (*ArtworkAddRespond, error)
|
|
CheckUserLock func(ctx context.Context, in *CheckUserLockRequest) (*CheckUserLockRespond, error)
|
|
UpdateArtwork func(ctx context.Context, in *UpdateArtworkRequest) (*UpdateArtworkRespond, error)
|
|
GetArtworkList func(ctx context.Context, in *GetArtworkListRequest) (*GetArtworkListRespond, error)
|
|
GetArtwork func(ctx context.Context, in *GetArtworkRequest) (*GetArtworkRespond, error)
|
|
DelArtwork func(ctx context.Context, in *DelArtworkRequest) (*DelArtworkRespond, error)
|
|
UploadArtwork func(ctx context.Context, in *UploadArtworkRequest) (*UploadArtworkRespond, error)
|
|
}
|
|
|
|
func (c *ArtworkClientImpl) GetDubboStub(cc *triple.TripleConn) ArtworkClient {
|
|
return NewArtworkClient(cc)
|
|
}
|
|
|
|
func (c *ArtworkClientImpl) XXX_InterfaceName() string {
|
|
return "Artwork.Artwork"
|
|
}
|
|
|
|
func NewArtworkClient(cc *triple.TripleConn) ArtworkClient {
|
|
return &artworkClient{cc}
|
|
}
|
|
|
|
func (c *artworkClient) ArtworkAdd(ctx context.Context, in *ArtworkAddRequest, opts ...grpc_go.CallOption) (*ArtworkAddRespond, common.ErrorWithAttachment) {
|
|
out := new(ArtworkAddRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ArtworkAdd", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) CheckUserLock(ctx context.Context, in *CheckUserLockRequest, opts ...grpc_go.CallOption) (*CheckUserLockRespond, common.ErrorWithAttachment) {
|
|
out := new(CheckUserLockRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CheckUserLock", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) UpdateArtwork(ctx context.Context, in *UpdateArtworkRequest, opts ...grpc_go.CallOption) (*UpdateArtworkRespond, common.ErrorWithAttachment) {
|
|
out := new(UpdateArtworkRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateArtwork", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) GetArtworkList(ctx context.Context, in *GetArtworkListRequest, opts ...grpc_go.CallOption) (*GetArtworkListRespond, common.ErrorWithAttachment) {
|
|
out := new(GetArtworkListRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtworkList", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) GetArtwork(ctx context.Context, in *GetArtworkRequest, opts ...grpc_go.CallOption) (*GetArtworkRespond, common.ErrorWithAttachment) {
|
|
out := new(GetArtworkRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtwork", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) DelArtwork(ctx context.Context, in *DelArtworkRequest, opts ...grpc_go.CallOption) (*DelArtworkRespond, common.ErrorWithAttachment) {
|
|
out := new(DelArtworkRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DelArtwork", in, out)
|
|
}
|
|
|
|
func (c *artworkClient) UploadArtwork(ctx context.Context, in *UploadArtworkRequest, opts ...grpc_go.CallOption) (*UploadArtworkRespond, common.ErrorWithAttachment) {
|
|
out := new(UploadArtworkRespond)
|
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UploadArtwork", in, out)
|
|
}
|
|
|
|
// ArtworkServer is the server API for Artwork service.
|
|
// All implementations must embed UnimplementedArtworkServer
|
|
// for forward compatibility
|
|
type ArtworkServer interface {
|
|
ArtworkAdd(context.Context, *ArtworkAddRequest) (*ArtworkAddRespond, error)
|
|
CheckUserLock(context.Context, *CheckUserLockRequest) (*CheckUserLockRespond, error)
|
|
UpdateArtwork(context.Context, *UpdateArtworkRequest) (*UpdateArtworkRespond, error)
|
|
GetArtworkList(context.Context, *GetArtworkListRequest) (*GetArtworkListRespond, error)
|
|
GetArtwork(context.Context, *GetArtworkRequest) (*GetArtworkRespond, error)
|
|
DelArtwork(context.Context, *DelArtworkRequest) (*DelArtworkRespond, error)
|
|
UploadArtwork(context.Context, *UploadArtworkRequest) (*UploadArtworkRespond, error)
|
|
mustEmbedUnimplementedArtworkServer()
|
|
}
|
|
|
|
// UnimplementedArtworkServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedArtworkServer struct {
|
|
proxyImpl protocol.Invoker
|
|
}
|
|
|
|
func (UnimplementedArtworkServer) ArtworkAdd(context.Context, *ArtworkAddRequest) (*ArtworkAddRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ArtworkAdd not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) CheckUserLock(context.Context, *CheckUserLockRequest) (*CheckUserLockRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CheckUserLock not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) UpdateArtwork(context.Context, *UpdateArtworkRequest) (*UpdateArtworkRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateArtwork not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) GetArtworkList(context.Context, *GetArtworkListRequest) (*GetArtworkListRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtworkList not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) GetArtwork(context.Context, *GetArtworkRequest) (*GetArtworkRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetArtwork not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) DelArtwork(context.Context, *DelArtworkRequest) (*DelArtworkRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DelArtwork not implemented")
|
|
}
|
|
func (UnimplementedArtworkServer) UploadArtwork(context.Context, *UploadArtworkRequest) (*UploadArtworkRespond, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UploadArtwork not implemented")
|
|
}
|
|
func (s *UnimplementedArtworkServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
|
s.proxyImpl = impl
|
|
}
|
|
|
|
func (s *UnimplementedArtworkServer) XXX_GetProxyImpl() protocol.Invoker {
|
|
return s.proxyImpl
|
|
}
|
|
|
|
func (s *UnimplementedArtworkServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
|
|
return &Artwork_ServiceDesc
|
|
}
|
|
func (s *UnimplementedArtworkServer) XXX_InterfaceName() string {
|
|
return "Artwork.Artwork"
|
|
}
|
|
|
|
func (UnimplementedArtworkServer) mustEmbedUnimplementedArtworkServer() {}
|
|
|
|
// UnsafeArtworkServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ArtworkServer will
|
|
// result in compilation errors.
|
|
type UnsafeArtworkServer interface {
|
|
mustEmbedUnimplementedArtworkServer()
|
|
}
|
|
|
|
func RegisterArtworkServer(s grpc_go.ServiceRegistrar, srv ArtworkServer) {
|
|
s.RegisterService(&Artwork_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Artwork_ArtworkAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ArtworkAddRequest)
|
|
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("ArtworkAdd", 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 _Artwork_CheckUserLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CheckUserLockRequest)
|
|
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("CheckUserLock", 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 _Artwork_UpdateArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateArtworkRequest)
|
|
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("UpdateArtwork", 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 _Artwork_GetArtworkList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetArtworkListRequest)
|
|
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("GetArtworkList", 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 _Artwork_GetArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetArtworkRequest)
|
|
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("GetArtwork", 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 _Artwork_DelArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DelArtworkRequest)
|
|
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("DelArtwork", 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 _Artwork_UploadArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UploadArtworkRequest)
|
|
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("UploadArtwork", 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)
|
|
}
|
|
|
|
// Artwork_ServiceDesc is the grpc_go.ServiceDesc for Artwork service.
|
|
// It's only intended for direct use with grpc_go.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Artwork_ServiceDesc = grpc_go.ServiceDesc{
|
|
ServiceName: "Artwork.Artwork",
|
|
HandlerType: (*ArtworkServer)(nil),
|
|
Methods: []grpc_go.MethodDesc{
|
|
{
|
|
MethodName: "ArtworkAdd",
|
|
Handler: _Artwork_ArtworkAdd_Handler,
|
|
},
|
|
{
|
|
MethodName: "CheckUserLock",
|
|
Handler: _Artwork_CheckUserLock_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateArtwork",
|
|
Handler: _Artwork_UpdateArtwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetArtworkList",
|
|
Handler: _Artwork_GetArtworkList_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetArtwork",
|
|
Handler: _Artwork_GetArtwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "DelArtwork",
|
|
Handler: _Artwork_DelArtwork_Handler,
|
|
},
|
|
{
|
|
MethodName: "UploadArtwork",
|
|
Handler: _Artwork_UploadArtwork_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc_go.StreamDesc{},
|
|
Metadata: "api/artwork/artwork.proto",
|
|
}
|