2024-03-18 10:15:28 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package accounts
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
// AccountsClient is the client API for Accounts 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 AccountsClient interface {
2024-03-19 15:46:15 +00:00
SignUp ( ctx context . Context , in * AccountWithPassword , opts ... grpc . CallOption ) ( * AccountFullWithToken , error )
SignIn ( ctx context . Context , in * AccountWithPassword , opts ... grpc . CallOption ) ( * AccountFullWithToken , error )
2024-03-18 10:15:28 +00:00
}
type accountsClient struct {
cc grpc . ClientConnInterface
}
func NewAccountsClient ( cc grpc . ClientConnInterface ) AccountsClient {
return & accountsClient { cc }
}
2024-03-19 15:46:15 +00:00
func ( c * accountsClient ) SignUp ( ctx context . Context , in * AccountWithPassword , opts ... grpc . CallOption ) ( * AccountFullWithToken , error ) {
out := new ( AccountFullWithToken )
2024-03-18 11:17:22 +00:00
err := c . cc . Invoke ( ctx , "/accounts.Accounts/SignUp" , in , out , opts ... )
2024-03-18 10:15:28 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-03-19 15:46:15 +00:00
func ( c * accountsClient ) SignIn ( ctx context . Context , in * AccountWithPassword , opts ... grpc . CallOption ) ( * AccountFullWithToken , error ) {
out := new ( AccountFullWithToken )
2024-03-18 11:17:22 +00:00
err := c . cc . Invoke ( ctx , "/accounts.Accounts/SignIn" , in , out , opts ... )
2024-03-18 10:15:28 +00:00
if err != nil {
return nil , err
}
return out , nil
}
// AccountsServer is the server API for Accounts service.
// All implementations must embed UnimplementedAccountsServer
// for forward compatibility
type AccountsServer interface {
2024-03-19 15:46:15 +00:00
SignUp ( context . Context , * AccountWithPassword ) ( * AccountFullWithToken , error )
SignIn ( context . Context , * AccountWithPassword ) ( * AccountFullWithToken , error )
2024-03-18 10:15:28 +00:00
mustEmbedUnimplementedAccountsServer ( )
}
// UnimplementedAccountsServer must be embedded to have forward compatible implementations.
type UnimplementedAccountsServer struct {
}
2024-03-19 15:46:15 +00:00
func ( UnimplementedAccountsServer ) SignUp ( context . Context , * AccountWithPassword ) ( * AccountFullWithToken , error ) {
2024-03-18 11:17:22 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method SignUp not implemented" )
2024-03-18 10:15:28 +00:00
}
2024-03-19 15:46:15 +00:00
func ( UnimplementedAccountsServer ) SignIn ( context . Context , * AccountWithPassword ) ( * AccountFullWithToken , error ) {
2024-03-18 11:17:22 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method SignIn not implemented" )
2024-03-18 10:15:28 +00:00
}
func ( UnimplementedAccountsServer ) mustEmbedUnimplementedAccountsServer ( ) { }
// UnsafeAccountsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountsServer will
// result in compilation errors.
type UnsafeAccountsServer interface {
mustEmbedUnimplementedAccountsServer ( )
}
func RegisterAccountsServer ( s grpc . ServiceRegistrar , srv AccountsServer ) {
s . RegisterService ( & Accounts_ServiceDesc , srv )
}
2024-03-18 11:17:22 +00:00
func _Accounts_SignUp_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( AccountWithPassword )
2024-03-18 10:15:28 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-03-18 11:17:22 +00:00
return srv . ( AccountsServer ) . SignUp ( ctx , in )
2024-03-18 10:15:28 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-03-18 11:17:22 +00:00
FullMethod : "/accounts.Accounts/SignUp" ,
2024-03-18 10:15:28 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-03-18 11:17:22 +00:00
return srv . ( AccountsServer ) . SignUp ( ctx , req . ( * AccountWithPassword ) )
2024-03-18 10:15:28 +00:00
}
return interceptor ( ctx , in , info , handler )
}
2024-03-18 11:17:22 +00:00
func _Accounts_SignIn_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( AccountWithPassword )
2024-03-18 10:15:28 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2024-03-18 11:17:22 +00:00
return srv . ( AccountsServer ) . SignIn ( ctx , in )
2024-03-18 10:15:28 +00:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-03-18 11:17:22 +00:00
FullMethod : "/accounts.Accounts/SignIn" ,
2024-03-18 10:15:28 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-03-18 11:17:22 +00:00
return srv . ( AccountsServer ) . SignIn ( ctx , req . ( * AccountWithPassword ) )
2024-03-18 10:15:28 +00:00
}
return interceptor ( ctx , in , info , handler )
}
// Accounts_ServiceDesc is the grpc.ServiceDesc for Accounts service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Accounts_ServiceDesc = grpc . ServiceDesc {
ServiceName : "accounts.Accounts" ,
HandlerType : ( * AccountsServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
2024-03-18 11:17:22 +00:00
MethodName : "SignUp" ,
Handler : _Accounts_SignUp_Handler ,
2024-03-18 10:15:28 +00:00
} ,
{
2024-03-18 11:17:22 +00:00
MethodName : "SignIn" ,
Handler : _Accounts_SignIn_Handler ,
2024-03-18 10:15:28 +00:00
} ,
} ,
2024-03-18 11:17:22 +00:00
Streams : [ ] grpc . StreamDesc { } ,
2024-03-18 10:15:28 +00:00
Metadata : "accounts/accounts_v1.proto" ,
}