backend/pkg/proto/brahma/murders/service_grpc.pb.go

144 lines
4.8 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.3
// source: service.proto
package murders
import (
context "context"
script "git.icechen.cn/monorepo/backend/pkg/proto/brahma/murders/script"
tag "git.icechen.cn/monorepo/backend/pkg/proto/brahma/murders/tag"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// MurdersClient is the client API for Murders 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 MurdersClient interface {
GetScripts(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*script.Scripts, error)
GetTags(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*tag.Tag, error)
}
type murdersClient struct {
cc grpc.ClientConnInterface
}
func NewMurdersClient(cc grpc.ClientConnInterface) MurdersClient {
return &murdersClient{cc}
}
func (c *murdersClient) GetScripts(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*script.Scripts, error) {
out := new(script.Scripts)
err := c.cc.Invoke(ctx, "/murder.murders/GetScripts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *murdersClient) GetTags(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*tag.Tag, error) {
out := new(tag.Tag)
err := c.cc.Invoke(ctx, "/murder.murders/GetTags", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MurdersServer is the server API for Murders service.
// All implementations must embed UnimplementedMurdersServer
// for forward compatibility
type MurdersServer interface {
GetScripts(context.Context, *QueryCondition) (*script.Scripts, error)
GetTags(context.Context, *QueryCondition) (*tag.Tag, error)
mustEmbedUnimplementedMurdersServer()
}
// UnimplementedMurdersServer must be embedded to have forward compatible implementations.
type UnimplementedMurdersServer struct {
}
func (UnimplementedMurdersServer) GetScripts(context.Context, *QueryCondition) (*script.Scripts, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetScripts not implemented")
}
func (UnimplementedMurdersServer) GetTags(context.Context, *QueryCondition) (*tag.Tag, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetTags not implemented")
}
func (UnimplementedMurdersServer) mustEmbedUnimplementedMurdersServer() {}
// UnsafeMurdersServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MurdersServer will
// result in compilation errors.
type UnsafeMurdersServer interface {
mustEmbedUnimplementedMurdersServer()
}
func RegisterMurdersServer(s grpc.ServiceRegistrar, srv MurdersServer) {
s.RegisterService(&Murders_ServiceDesc, srv)
}
func _Murders_GetScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryCondition)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MurdersServer).GetScripts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/murder.murders/GetScripts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MurdersServer).GetScripts(ctx, req.(*QueryCondition))
}
return interceptor(ctx, in, info, handler)
}
func _Murders_GetTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryCondition)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MurdersServer).GetTags(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/murder.murders/GetTags",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MurdersServer).GetTags(ctx, req.(*QueryCondition))
}
return interceptor(ctx, in, info, handler)
}
// Murders_ServiceDesc is the grpc.ServiceDesc for Murders service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Murders_ServiceDesc = grpc.ServiceDesc{
ServiceName: "murder.murders",
HandlerType: (*MurdersServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetScripts",
Handler: _Murders_GetScripts_Handler,
},
{
MethodName: "GetTags",
Handler: _Murders_GetTags_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
}