2022-07-17 06:23:51 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
2022-10-29 04:45:02 +00:00
// - protoc v3.12.4
2022-07-17 06:23:51 +00:00
// source: times.proto
package times
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
// TimesServiceClient is the client API for TimesService 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 TimesServiceClient interface {
Create ( ctx context . Context , in * TimeRequest , opts ... grpc . CallOption ) ( * IdMessage , error )
Update ( ctx context . Context , in * TimeRequest , opts ... grpc . CallOption ) ( * NullResponse , error )
Delete ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * NullResponse , error )
Get ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * TimeResponse , error )
List ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * TimeList , error )
Rank ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * RankResponse , error )
}
type timesServiceClient struct {
cc grpc . ClientConnInterface
}
func NewTimesServiceClient ( cc grpc . ClientConnInterface ) TimesServiceClient {
return & timesServiceClient { cc }
}
func ( c * timesServiceClient ) Create ( ctx context . Context , in * TimeRequest , opts ... grpc . CallOption ) ( * IdMessage , error ) {
out := new ( IdMessage )
err := c . cc . Invoke ( ctx , "/times.TimesService/Create" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * timesServiceClient ) Update ( ctx context . Context , in * TimeRequest , opts ... grpc . CallOption ) ( * NullResponse , error ) {
out := new ( NullResponse )
err := c . cc . Invoke ( ctx , "/times.TimesService/Update" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * timesServiceClient ) Delete ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * NullResponse , error ) {
out := new ( NullResponse )
err := c . cc . Invoke ( ctx , "/times.TimesService/Delete" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * timesServiceClient ) Get ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * TimeResponse , error ) {
out := new ( TimeResponse )
err := c . cc . Invoke ( ctx , "/times.TimesService/Get" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * timesServiceClient ) List ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * TimeList , error ) {
out := new ( TimeList )
err := c . cc . Invoke ( ctx , "/times.TimesService/List" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * timesServiceClient ) Rank ( ctx context . Context , in * IdMessage , opts ... grpc . CallOption ) ( * RankResponse , error ) {
out := new ( RankResponse )
err := c . cc . Invoke ( ctx , "/times.TimesService/Rank" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// TimesServiceServer is the server API for TimesService service.
// All implementations must embed UnimplementedTimesServiceServer
// for forward compatibility
type TimesServiceServer interface {
Create ( context . Context , * TimeRequest ) ( * IdMessage , error )
Update ( context . Context , * TimeRequest ) ( * NullResponse , error )
Delete ( context . Context , * IdMessage ) ( * NullResponse , error )
Get ( context . Context , * IdMessage ) ( * TimeResponse , error )
List ( context . Context , * ListRequest ) ( * TimeList , error )
Rank ( context . Context , * IdMessage ) ( * RankResponse , error )
mustEmbedUnimplementedTimesServiceServer ( )
}
// UnimplementedTimesServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTimesServiceServer struct {
}
func ( UnimplementedTimesServiceServer ) Create ( context . Context , * TimeRequest ) ( * IdMessage , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Create not implemented" )
}
func ( UnimplementedTimesServiceServer ) Update ( context . Context , * TimeRequest ) ( * NullResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Update not implemented" )
}
func ( UnimplementedTimesServiceServer ) Delete ( context . Context , * IdMessage ) ( * NullResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Delete not implemented" )
}
func ( UnimplementedTimesServiceServer ) Get ( context . Context , * IdMessage ) ( * TimeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Get not implemented" )
}
func ( UnimplementedTimesServiceServer ) List ( context . Context , * ListRequest ) ( * TimeList , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method List not implemented" )
}
func ( UnimplementedTimesServiceServer ) Rank ( context . Context , * IdMessage ) ( * RankResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Rank not implemented" )
}
func ( UnimplementedTimesServiceServer ) mustEmbedUnimplementedTimesServiceServer ( ) { }
// UnsafeTimesServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TimesServiceServer will
// result in compilation errors.
type UnsafeTimesServiceServer interface {
mustEmbedUnimplementedTimesServiceServer ( )
}
func RegisterTimesServiceServer ( s grpc . ServiceRegistrar , srv TimesServiceServer ) {
s . RegisterService ( & TimesService_ServiceDesc , srv )
}
func _TimesService_Create_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TimeRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . Create ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/Create" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . Create ( ctx , req . ( * TimeRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _TimesService_Update_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TimeRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . Update ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/Update" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . Update ( ctx , req . ( * TimeRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _TimesService_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/Delete" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . Delete ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _TimesService_Get_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . Get ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/Get" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . Get ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _TimesService_List_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . List ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/List" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . List ( ctx , req . ( * ListRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _TimesService_Rank_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( IdMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( TimesServiceServer ) . Rank ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/times.TimesService/Rank" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( TimesServiceServer ) . Rank ( ctx , req . ( * IdMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
// TimesService_ServiceDesc is the grpc.ServiceDesc for TimesService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TimesService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "times.TimesService" ,
HandlerType : ( * TimesServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Create" ,
Handler : _TimesService_Create_Handler ,
} ,
{
MethodName : "Update" ,
Handler : _TimesService_Update_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _TimesService_Delete_Handler ,
} ,
{
MethodName : "Get" ,
Handler : _TimesService_Get_Handler ,
} ,
{
MethodName : "List" ,
Handler : _TimesService_List_Handler ,
} ,
{
MethodName : "Rank" ,
Handler : _TimesService_Rank_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "times.proto" ,
}