2021-12-19 15:30:21 +07:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package codequest
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
// AuthServiceClient is the client API for AuthService 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 AuthServiceClient interface {
OAuthCode ( ctx context . Context , in * OAuthCodeRequest , opts ... grpc . CallOption ) ( * OAuthCodeResponse , error )
Token ( ctx context . Context , in * TokenRequest , opts ... grpc . CallOption ) ( * Token , error )
DeleteToken ( ctx context . Context , in * DeleteTokenRequest , opts ... grpc . CallOption ) ( * emptypb . Empty , error )
}
type authServiceClient struct {
cc grpc . ClientConnInterface
}
func NewAuthServiceClient ( cc grpc . ClientConnInterface ) AuthServiceClient {
return & authServiceClient { cc }
}
func ( c * authServiceClient ) OAuthCode ( ctx context . Context , in * OAuthCodeRequest , opts ... grpc . CallOption ) ( * OAuthCodeResponse , error ) {
out := new ( OAuthCodeResponse )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.AuthService/OAuthCode" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authServiceClient ) Token ( ctx context . Context , in * TokenRequest , opts ... grpc . CallOption ) ( * Token , error ) {
out := new ( Token )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.AuthService/Token" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * authServiceClient ) DeleteToken ( ctx context . Context , in * DeleteTokenRequest , opts ... grpc . CallOption ) ( * emptypb . Empty , error ) {
out := new ( emptypb . Empty )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.AuthService/DeleteToken" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// AuthServiceServer is the server API for AuthService service.
// All implementations must embed UnimplementedAuthServiceServer
// for forward compatibility
type AuthServiceServer interface {
OAuthCode ( context . Context , * OAuthCodeRequest ) ( * OAuthCodeResponse , error )
Token ( context . Context , * TokenRequest ) ( * Token , error )
DeleteToken ( context . Context , * DeleteTokenRequest ) ( * emptypb . Empty , error )
mustEmbedUnimplementedAuthServiceServer ( )
}
// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
type UnimplementedAuthServiceServer struct {
}
func ( UnimplementedAuthServiceServer ) OAuthCode ( context . Context , * OAuthCodeRequest ) ( * OAuthCodeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method OAuthCode not implemented" )
}
func ( UnimplementedAuthServiceServer ) Token ( context . Context , * TokenRequest ) ( * Token , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Token not implemented" )
}
func ( UnimplementedAuthServiceServer ) DeleteToken ( context . Context , * DeleteTokenRequest ) ( * emptypb . Empty , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteToken not implemented" )
}
func ( UnimplementedAuthServiceServer ) mustEmbedUnimplementedAuthServiceServer ( ) { }
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthServiceServer will
// result in compilation errors.
type UnsafeAuthServiceServer interface {
mustEmbedUnimplementedAuthServiceServer ( )
}
func RegisterAuthServiceServer ( s grpc . ServiceRegistrar , srv AuthServiceServer ) {
s . RegisterService ( & AuthService_ServiceDesc , srv )
}
func _AuthService_OAuthCode_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( OAuthCodeRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( AuthServiceServer ) . OAuthCode ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.AuthService/OAuthCode" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( AuthServiceServer ) . OAuthCode ( ctx , req . ( * OAuthCodeRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _AuthService_Token_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( TokenRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( AuthServiceServer ) . Token ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.AuthService/Token" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( AuthServiceServer ) . Token ( ctx , req . ( * TokenRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _AuthService_DeleteToken_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteTokenRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( AuthServiceServer ) . DeleteToken ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.AuthService/DeleteToken" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( AuthServiceServer ) . DeleteToken ( ctx , req . ( * DeleteTokenRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuthService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "hhhapz.codequest.v1.AuthService" ,
HandlerType : ( * AuthServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "OAuthCode" ,
Handler : _AuthService_OAuthCode_Handler ,
} ,
{
MethodName : "Token" ,
Handler : _AuthService_Token_Handler ,
} ,
{
MethodName : "DeleteToken" ,
Handler : _AuthService_DeleteToken_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "github.com/hhhapz/codequest/api/v1/all.proto" ,
}
2021-12-21 10:18:12 +07:00
// QuestServiceClient is the client API for QuestService 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 QuestServiceClient interface {
Questions ( ctx context . Context , in * emptypb . Empty , opts ... grpc . CallOption ) ( * QuestionsResponse , error )
QuestionByID ( ctx context . Context , in * QuestionByIDRequest , opts ... grpc . CallOption ) ( * Question , error )
QuestionInput ( ctx context . Context , in * QuestionInputRequest , opts ... grpc . CallOption ) ( * QuestionInput , error )
Submit ( ctx context . Context , in * SubmitRequest , opts ... grpc . CallOption ) ( * SubmitResponse , error )
}
type questServiceClient struct {
cc grpc . ClientConnInterface
}
func NewQuestServiceClient ( cc grpc . ClientConnInterface ) QuestServiceClient {
return & questServiceClient { cc }
}
func ( c * questServiceClient ) Questions ( ctx context . Context , in * emptypb . Empty , opts ... grpc . CallOption ) ( * QuestionsResponse , error ) {
out := new ( QuestionsResponse )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.QuestService/Questions" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * questServiceClient ) QuestionByID ( ctx context . Context , in * QuestionByIDRequest , opts ... grpc . CallOption ) ( * Question , error ) {
out := new ( Question )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.QuestService/QuestionByID" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * questServiceClient ) QuestionInput ( ctx context . Context , in * QuestionInputRequest , opts ... grpc . CallOption ) ( * QuestionInput , error ) {
out := new ( QuestionInput )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.QuestService/QuestionInput" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * questServiceClient ) Submit ( ctx context . Context , in * SubmitRequest , opts ... grpc . CallOption ) ( * SubmitResponse , error ) {
out := new ( SubmitResponse )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.QuestService/Submit" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// QuestServiceServer is the server API for QuestService service.
// All implementations must embed UnimplementedQuestServiceServer
// for forward compatibility
type QuestServiceServer interface {
Questions ( context . Context , * emptypb . Empty ) ( * QuestionsResponse , error )
QuestionByID ( context . Context , * QuestionByIDRequest ) ( * Question , error )
QuestionInput ( context . Context , * QuestionInputRequest ) ( * QuestionInput , error )
Submit ( context . Context , * SubmitRequest ) ( * SubmitResponse , error )
mustEmbedUnimplementedQuestServiceServer ( )
}
// UnimplementedQuestServiceServer must be embedded to have forward compatible implementations.
type UnimplementedQuestServiceServer struct {
}
func ( UnimplementedQuestServiceServer ) Questions ( context . Context , * emptypb . Empty ) ( * QuestionsResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Questions not implemented" )
}
func ( UnimplementedQuestServiceServer ) QuestionByID ( context . Context , * QuestionByIDRequest ) ( * Question , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method QuestionByID not implemented" )
}
func ( UnimplementedQuestServiceServer ) QuestionInput ( context . Context , * QuestionInputRequest ) ( * QuestionInput , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method QuestionInput not implemented" )
}
func ( UnimplementedQuestServiceServer ) Submit ( context . Context , * SubmitRequest ) ( * SubmitResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Submit not implemented" )
}
func ( UnimplementedQuestServiceServer ) mustEmbedUnimplementedQuestServiceServer ( ) { }
// UnsafeQuestServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QuestServiceServer will
// result in compilation errors.
type UnsafeQuestServiceServer interface {
mustEmbedUnimplementedQuestServiceServer ( )
}
func RegisterQuestServiceServer ( s grpc . ServiceRegistrar , srv QuestServiceServer ) {
s . RegisterService ( & QuestService_ServiceDesc , srv )
}
func _QuestService_Questions_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( emptypb . Empty )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QuestServiceServer ) . Questions ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.QuestService/Questions" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QuestServiceServer ) . Questions ( ctx , req . ( * emptypb . Empty ) )
}
return interceptor ( ctx , in , info , handler )
}
func _QuestService_QuestionByID_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QuestionByIDRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QuestServiceServer ) . QuestionByID ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.QuestService/QuestionByID" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QuestServiceServer ) . QuestionByID ( ctx , req . ( * QuestionByIDRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _QuestService_QuestionInput_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( QuestionInputRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QuestServiceServer ) . QuestionInput ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.QuestService/QuestionInput" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QuestServiceServer ) . QuestionInput ( ctx , req . ( * QuestionInputRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _QuestService_Submit_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SubmitRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( QuestServiceServer ) . Submit ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.QuestService/Submit" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( QuestServiceServer ) . Submit ( ctx , req . ( * SubmitRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// QuestService_ServiceDesc is the grpc.ServiceDesc for QuestService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var QuestService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "hhhapz.codequest.v1.QuestService" ,
HandlerType : ( * QuestServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Questions" ,
Handler : _QuestService_Questions_Handler ,
} ,
{
MethodName : "QuestionByID" ,
Handler : _QuestService_QuestionByID_Handler ,
} ,
{
MethodName : "QuestionInput" ,
Handler : _QuestService_QuestionInput_Handler ,
} ,
{
MethodName : "Submit" ,
Handler : _QuestService_Submit_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "github.com/hhhapz/codequest/api/v1/all.proto" ,
}
2021-12-19 15:30:21 +07:00
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
User ( ctx context . Context , in * UserRequest , opts ... grpc . CallOption ) ( * User , error )
UserByEmail ( ctx context . Context , in * UserByEmailRequest , opts ... grpc . CallOption ) ( * User , error )
AllUsers ( ctx context . Context , in * AllUsersRequest , opts ... grpc . CallOption ) ( * AllUsersResponse , error )
UpdateUser ( ctx context . Context , in * UpdateUserRequest , opts ... grpc . CallOption ) ( * User , error )
AdminUpdateUser ( ctx context . Context , in * UpdateUserRequest , opts ... grpc . CallOption ) ( * User , error )
DeleteUser ( ctx context . Context , in * DeleteUserRequest , opts ... grpc . CallOption ) ( * User , error )
}
type userServiceClient struct {
cc grpc . ClientConnInterface
}
func NewUserServiceClient ( cc grpc . ClientConnInterface ) UserServiceClient {
return & userServiceClient { cc }
}
func ( c * userServiceClient ) User ( ctx context . Context , in * UserRequest , opts ... grpc . CallOption ) ( * User , error ) {
out := new ( User )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/User" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) UserByEmail ( ctx context . Context , in * UserByEmailRequest , opts ... grpc . CallOption ) ( * User , error ) {
out := new ( User )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/UserByEmail" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) AllUsers ( ctx context . Context , in * AllUsersRequest , opts ... grpc . CallOption ) ( * AllUsersResponse , error ) {
out := new ( AllUsersResponse )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/AllUsers" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) UpdateUser ( ctx context . Context , in * UpdateUserRequest , opts ... grpc . CallOption ) ( * User , error ) {
out := new ( User )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/UpdateUser" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) AdminUpdateUser ( ctx context . Context , in * UpdateUserRequest , opts ... grpc . CallOption ) ( * User , error ) {
out := new ( User )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/AdminUpdateUser" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) DeleteUser ( ctx context . Context , in * DeleteUserRequest , opts ... grpc . CallOption ) ( * User , error ) {
out := new ( User )
err := c . cc . Invoke ( ctx , "/hhhapz.codequest.v1.UserService/DeleteUser" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
User ( context . Context , * UserRequest ) ( * User , error )
UserByEmail ( context . Context , * UserByEmailRequest ) ( * User , error )
AllUsers ( context . Context , * AllUsersRequest ) ( * AllUsersResponse , error )
UpdateUser ( context . Context , * UpdateUserRequest ) ( * User , error )
AdminUpdateUser ( context . Context , * UpdateUserRequest ) ( * User , error )
DeleteUser ( context . Context , * DeleteUserRequest ) ( * User , error )
mustEmbedUnimplementedUserServiceServer ( )
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func ( UnimplementedUserServiceServer ) User ( context . Context , * UserRequest ) ( * User , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method User not implemented" )
}
func ( UnimplementedUserServiceServer ) UserByEmail ( context . Context , * UserByEmailRequest ) ( * User , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UserByEmail not implemented" )
}
func ( UnimplementedUserServiceServer ) AllUsers ( context . Context , * AllUsersRequest ) ( * AllUsersResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method AllUsers not implemented" )
}
func ( UnimplementedUserServiceServer ) UpdateUser ( context . Context , * UpdateUserRequest ) ( * User , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UpdateUser not implemented" )
}
func ( UnimplementedUserServiceServer ) AdminUpdateUser ( context . Context , * UpdateUserRequest ) ( * User , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method AdminUpdateUser not implemented" )
}
func ( UnimplementedUserServiceServer ) DeleteUser ( context . Context , * DeleteUserRequest ) ( * User , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteUser not implemented" )
}
func ( UnimplementedUserServiceServer ) mustEmbedUnimplementedUserServiceServer ( ) { }
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer ( )
}
func RegisterUserServiceServer ( s grpc . ServiceRegistrar , srv UserServiceServer ) {
s . RegisterService ( & UserService_ServiceDesc , srv )
}
func _UserService_User_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . User ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/User" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . User ( ctx , req . ( * UserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_UserByEmail_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UserByEmailRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . UserByEmail ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/UserByEmail" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . UserByEmail ( ctx , req . ( * UserByEmailRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_AllUsers_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( AllUsersRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . AllUsers ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/AllUsers" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . AllUsers ( ctx , req . ( * AllUsersRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_UpdateUser_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . UpdateUser ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/UpdateUser" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . UpdateUser ( ctx , req . ( * UpdateUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_AdminUpdateUser_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . AdminUpdateUser ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/AdminUpdateUser" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . AdminUpdateUser ( ctx , req . ( * UpdateUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_DeleteUser_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . DeleteUser ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/hhhapz.codequest.v1.UserService/DeleteUser" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . DeleteUser ( ctx , req . ( * DeleteUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "hhhapz.codequest.v1.UserService" ,
HandlerType : ( * UserServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "User" ,
Handler : _UserService_User_Handler ,
} ,
{
MethodName : "UserByEmail" ,
Handler : _UserService_UserByEmail_Handler ,
} ,
{
MethodName : "AllUsers" ,
Handler : _UserService_AllUsers_Handler ,
} ,
{
MethodName : "UpdateUser" ,
Handler : _UserService_UpdateUser_Handler ,
} ,
{
MethodName : "AdminUpdateUser" ,
Handler : _UserService_AdminUpdateUser_Handler ,
} ,
{
MethodName : "DeleteUser" ,
Handler : _UserService_DeleteUser_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "github.com/hhhapz/codequest/api/v1/all.proto" ,
}