softplayer-go-proto/pkg/accounts/accounts_v1_grpc.pb.go

247 lines
8.9 KiB
Go
Raw Normal View History

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"
2024-05-21 22:08:55 +00:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
2024-03-18 10:15:28 +00:00
)
// 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-05-21 22:08:55 +00:00
ResetPassword(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*emptypb.Empty, error)
NewPassword(ctx context.Context, in *AccountWithPasswordAndCode, opts ...grpc.CallOption) (*emptypb.Empty, error)
IsEmailVerified(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*EmailVerified, 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
}
2024-05-21 22:08:55 +00:00
func (c *accountsClient) ResetPassword(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/accounts.Accounts/ResetPassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) NewPassword(ctx context.Context, in *AccountWithPasswordAndCode, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/accounts.Accounts/NewPassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *accountsClient) IsEmailVerified(ctx context.Context, in *AccountData, opts ...grpc.CallOption) (*EmailVerified, error) {
out := new(EmailVerified)
err := c.cc.Invoke(ctx, "/accounts.Accounts/IsEmailVerified", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-03-18 10:15:28 +00:00
// 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-05-21 22:08:55 +00:00
ResetPassword(context.Context, *AccountData) (*emptypb.Empty, error)
NewPassword(context.Context, *AccountWithPasswordAndCode) (*emptypb.Empty, error)
IsEmailVerified(context.Context, *AccountData) (*EmailVerified, 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
}
2024-05-21 22:08:55 +00:00
func (UnimplementedAccountsServer) ResetPassword(context.Context, *AccountData) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented")
}
func (UnimplementedAccountsServer) NewPassword(context.Context, *AccountWithPasswordAndCode) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method NewPassword not implemented")
}
func (UnimplementedAccountsServer) IsEmailVerified(context.Context, *AccountData) (*EmailVerified, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsEmailVerified 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)
}
2024-05-21 22:08:55 +00:00
func _Accounts_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).ResetPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/ResetPassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).ResetPassword(ctx, req.(*AccountData))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_NewPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountWithPasswordAndCode)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).NewPassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/NewPassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).NewPassword(ctx, req.(*AccountWithPasswordAndCode))
}
return interceptor(ctx, in, info, handler)
}
func _Accounts_IsEmailVerified_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountData)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AccountsServer).IsEmailVerified(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/accounts.Accounts/IsEmailVerified",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AccountsServer).IsEmailVerified(ctx, req.(*AccountData))
}
return interceptor(ctx, in, info, handler)
}
2024-03-18 10:15:28 +00:00
// 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-05-21 22:08:55 +00:00
{
MethodName: "ResetPassword",
Handler: _Accounts_ResetPassword_Handler,
},
{
MethodName: "NewPassword",
Handler: _Accounts_NewPassword_Handler,
},
{
MethodName: "IsEmailVerified",
Handler: _Accounts_IsEmailVerified_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",
}