generated from VLADIMIR/template
add
This commit is contained in:
@@ -20,6 +20,8 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
EveningDetectiveServer_GetParticipation_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/GetParticipation"
|
||||
EveningDetectiveServer_AnswerParticipation_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/AnswerParticipation"
|
||||
EveningDetectiveServer_Ping_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/Ping"
|
||||
EveningDetectiveServer_Echo_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/Echo"
|
||||
EveningDetectiveServer_Signup_FullMethodName = "/crabs.evening_detective_server.EveningDetectiveServer/Signup"
|
||||
@@ -99,6 +101,8 @@ const (
|
||||
//
|
||||
// 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 EveningDetectiveServerClient interface {
|
||||
GetParticipation(ctx context.Context, in *GetParticipationReq, opts ...grpc.CallOption) (*ParticipationRsp, error)
|
||||
AnswerParticipation(ctx context.Context, in *AnswerParticipationReq, opts ...grpc.CallOption) (*ParticipationRsp, error)
|
||||
Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRsp, error)
|
||||
Echo(ctx context.Context, in *EchoReq, opts ...grpc.CallOption) (*EchoRsp, error)
|
||||
Signup(ctx context.Context, in *SignupReq, opts ...grpc.CallOption) (*SignupRsp, error)
|
||||
@@ -192,6 +196,26 @@ func NewEveningDetectiveServerClient(cc grpc.ClientConnInterface) EveningDetecti
|
||||
return &eveningDetectiveServerClient{cc}
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveServerClient) GetParticipation(ctx context.Context, in *GetParticipationReq, opts ...grpc.CallOption) (*ParticipationRsp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ParticipationRsp)
|
||||
err := c.cc.Invoke(ctx, EveningDetectiveServer_GetParticipation_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveServerClient) AnswerParticipation(ctx context.Context, in *AnswerParticipationReq, opts ...grpc.CallOption) (*ParticipationRsp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ParticipationRsp)
|
||||
err := c.cc.Invoke(ctx, EveningDetectiveServer_AnswerParticipation_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *eveningDetectiveServerClient) Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRsp, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PingRsp)
|
||||
@@ -926,6 +950,8 @@ func (c *eveningDetectiveServerClient) SetTeamAnswerScore(ctx context.Context, i
|
||||
// All implementations must embed UnimplementedEveningDetectiveServerServer
|
||||
// for forward compatibility.
|
||||
type EveningDetectiveServerServer interface {
|
||||
GetParticipation(context.Context, *GetParticipationReq) (*ParticipationRsp, error)
|
||||
AnswerParticipation(context.Context, *AnswerParticipationReq) (*ParticipationRsp, error)
|
||||
Ping(context.Context, *PingReq) (*PingRsp, error)
|
||||
Echo(context.Context, *EchoReq) (*EchoRsp, error)
|
||||
Signup(context.Context, *SignupReq) (*SignupRsp, error)
|
||||
@@ -1019,6 +1045,12 @@ type EveningDetectiveServerServer interface {
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedEveningDetectiveServerServer struct{}
|
||||
|
||||
func (UnimplementedEveningDetectiveServerServer) GetParticipation(context.Context, *GetParticipationReq) (*ParticipationRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetParticipation not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServerServer) AnswerParticipation(context.Context, *AnswerParticipationReq) (*ParticipationRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AnswerParticipation not implemented")
|
||||
}
|
||||
func (UnimplementedEveningDetectiveServerServer) Ping(context.Context, *PingReq) (*PingRsp, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
|
||||
}
|
||||
@@ -1260,6 +1292,42 @@ func RegisterEveningDetectiveServerServer(s grpc.ServiceRegistrar, srv EveningDe
|
||||
s.RegisterService(&EveningDetectiveServer_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _EveningDetectiveServer_GetParticipation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetParticipationReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EveningDetectiveServerServer).GetParticipation(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EveningDetectiveServer_GetParticipation_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EveningDetectiveServerServer).GetParticipation(ctx, req.(*GetParticipationReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetectiveServer_AnswerParticipation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AnswerParticipationReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(EveningDetectiveServerServer).AnswerParticipation(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: EveningDetectiveServer_AnswerParticipation_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(EveningDetectiveServerServer).AnswerParticipation(ctx, req.(*AnswerParticipationReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _EveningDetectiveServer_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PingReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -2581,6 +2649,14 @@ var EveningDetectiveServer_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "crabs.evening_detective_server.EveningDetectiveServer",
|
||||
HandlerType: (*EveningDetectiveServerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetParticipation",
|
||||
Handler: _EveningDetectiveServer_GetParticipation_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AnswerParticipation",
|
||||
Handler: _EveningDetectiveServer_AnswerParticipation_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Ping",
|
||||
Handler: _EveningDetectiveServer_Ping_Handler,
|
||||
|
||||
Reference in New Issue
Block a user