schnutibox/pkg/api/v1/schnutibox_grpc.pb.go

220 lines
7.7 KiB
Go
Raw Permalink Normal View History

2021-05-05 08:32:35 +02:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package v1
import (
context "context"
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
// IdentifierServiceClient is the client API for IdentifierService service.
2021-05-05 08:32:35 +02:00
//
// 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 IdentifierServiceClient interface {
Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*IdentifyResponse, error)
2021-05-05 08:32:35 +02:00
}
type identifierServiceClient struct {
2021-05-05 08:32:35 +02:00
cc grpc.ClientConnInterface
}
func NewIdentifierServiceClient(cc grpc.ClientConnInterface) IdentifierServiceClient {
return &identifierServiceClient{cc}
2021-05-05 08:32:35 +02:00
}
func (c *identifierServiceClient) Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*IdentifyResponse, error) {
out := new(IdentifyResponse)
err := c.cc.Invoke(ctx, "/schnutibox.v1.IdentifierService/Identify", in, out, opts...)
2021-05-05 08:32:35 +02:00
if err != nil {
return nil, err
}
return out, nil
}
// IdentifierServiceServer is the server API for IdentifierService service.
// All implementations should embed UnimplementedIdentifierServiceServer
2021-05-05 08:32:35 +02:00
// for forward compatibility
type IdentifierServiceServer interface {
Identify(context.Context, *IdentifyRequest) (*IdentifyResponse, error)
2021-05-05 08:32:35 +02:00
}
// UnimplementedIdentifierServiceServer should be embedded to have forward compatible implementations.
type UnimplementedIdentifierServiceServer struct {
2021-05-05 08:32:35 +02:00
}
func (UnimplementedIdentifierServiceServer) Identify(context.Context, *IdentifyRequest) (*IdentifyResponse, error) {
2021-05-05 08:32:35 +02:00
return nil, status.Errorf(codes.Unimplemented, "method Identify not implemented")
}
// UnsafeIdentifierServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IdentifierServiceServer will
2021-05-05 08:32:35 +02:00
// result in compilation errors.
type UnsafeIdentifierServiceServer interface {
mustEmbedUnimplementedIdentifierServiceServer()
2021-05-05 08:32:35 +02:00
}
func RegisterIdentifierServiceServer(s grpc.ServiceRegistrar, srv IdentifierServiceServer) {
s.RegisterService(&IdentifierService_ServiceDesc, srv)
2021-05-05 08:32:35 +02:00
}
func _IdentifierService_Identify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2021-05-05 08:32:35 +02:00
in := new(IdentifyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IdentifierServiceServer).Identify(ctx, in)
2021-05-05 08:32:35 +02:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/schnutibox.v1.IdentifierService/Identify",
2021-05-05 08:32:35 +02:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IdentifierServiceServer).Identify(ctx, req.(*IdentifyRequest))
2021-05-05 08:32:35 +02:00
}
return interceptor(ctx, in, info, handler)
}
// IdentifierService_ServiceDesc is the grpc.ServiceDesc for IdentifierService service.
2021-05-05 08:32:35 +02:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IdentifierService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "schnutibox.v1.IdentifierService",
HandlerType: (*IdentifierServiceServer)(nil),
2021-05-05 08:32:35 +02:00
Methods: []grpc.MethodDesc{
{
MethodName: "Identify",
Handler: _IdentifierService_Identify_Handler,
2021-05-05 08:32:35 +02:00
},
},
Streams: []grpc.StreamDesc{},
Metadata: "schnutibox.proto",
}
2021-08-05 09:43:35 +02:00
// TimerServiceClient is the client API for TimerService 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 TimerServiceClient interface {
Create(ctx context.Context, in *Timer, opts ...grpc.CallOption) (*Timer, error)
Get(ctx context.Context, in *TimerEmpty, opts ...grpc.CallOption) (*Timer, error)
}
type timerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTimerServiceClient(cc grpc.ClientConnInterface) TimerServiceClient {
return &timerServiceClient{cc}
}
func (c *timerServiceClient) Create(ctx context.Context, in *Timer, opts ...grpc.CallOption) (*Timer, error) {
out := new(Timer)
err := c.cc.Invoke(ctx, "/schnutibox.v1.TimerService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *timerServiceClient) Get(ctx context.Context, in *TimerEmpty, opts ...grpc.CallOption) (*Timer, error) {
out := new(Timer)
err := c.cc.Invoke(ctx, "/schnutibox.v1.TimerService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TimerServiceServer is the server API for TimerService service.
// All implementations should embed UnimplementedTimerServiceServer
// for forward compatibility
type TimerServiceServer interface {
Create(context.Context, *Timer) (*Timer, error)
Get(context.Context, *TimerEmpty) (*Timer, error)
}
// UnimplementedTimerServiceServer should be embedded to have forward compatible implementations.
type UnimplementedTimerServiceServer struct {
}
func (UnimplementedTimerServiceServer) Create(context.Context, *Timer) (*Timer, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedTimerServiceServer) Get(context.Context, *TimerEmpty) (*Timer, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
// UnsafeTimerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TimerServiceServer will
// result in compilation errors.
type UnsafeTimerServiceServer interface {
mustEmbedUnimplementedTimerServiceServer()
}
func RegisterTimerServiceServer(s grpc.ServiceRegistrar, srv TimerServiceServer) {
s.RegisterService(&TimerService_ServiceDesc, srv)
}
func _TimerService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Timer)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TimerServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/schnutibox.v1.TimerService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TimerServiceServer).Create(ctx, req.(*Timer))
}
return interceptor(ctx, in, info, handler)
}
func _TimerService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TimerEmpty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TimerServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/schnutibox.v1.TimerService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TimerServiceServer).Get(ctx, req.(*TimerEmpty))
}
return interceptor(ctx, in, info, handler)
}
// TimerService_ServiceDesc is the grpc.ServiceDesc for TimerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TimerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "schnutibox.v1.TimerService",
HandlerType: (*TimerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _TimerService_Create_Handler,
},
{
MethodName: "Get",
Handler: _TimerService_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "schnutibox.proto",
}