Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetEmail() string
- func (x *Account) GetId() uint64
- func (x *Account) GetName() string
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- type AccountResponse
- type AccountServiceClient
- type AccountServiceServer
- type AuthResponse
- type GetAccountRequest
- type GetAccountsRequest
- func (*GetAccountsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountsRequest) GetSkip() uint64
- func (x *GetAccountsRequest) GetTake() uint64
- func (*GetAccountsRequest) ProtoMessage()
- func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message
- func (x *GetAccountsRequest) Reset()
- func (x *GetAccountsRequest) String() string
- type GetAccountsResponse
- func (*GetAccountsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountsResponse) GetAccounts() []*Account
- func (*GetAccountsResponse) ProtoMessage()
- func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message
- func (x *GetAccountsResponse) Reset()
- func (x *GetAccountsResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetEmail() string
- func (x *RegisterRequest) GetName() string
- func (x *RegisterRequest) GetPassword() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type UnimplementedAccountServiceServer
- func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*AccountResponse, error)
- func (UnimplementedAccountServiceServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
- func (UnimplementedAccountServiceServer) Login(context.Context, *LoginRequest) (*AuthResponse, error)
- func (UnimplementedAccountServiceServer) Register(context.Context, *RegisterRequest) (*AuthResponse, error)
- type UnsafeAccountServiceServer
Constants ¶
const ( AccountService_Register_FullMethodName = "/pb.AccountService/Register" AccountService_Login_FullMethodName = "/pb.AccountService/Login" AccountService_GetAccount_FullMethodName = "/pb.AccountService/GetAccount" AccountService_GetAccounts_FullMethodName = "/pb.AccountService/GetAccounts" )
Variables ¶
var AccountService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.AccountService", HandlerType: (*AccountServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _AccountService_Register_Handler, }, { MethodName: "Login", Handler: _AccountService_Login_Handler, }, { MethodName: "GetAccount", Handler: _AccountService_GetAccount_Handler, }, { MethodName: "GetAccounts", Handler: _AccountService_GetAccounts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "account.proto", }
AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_account_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAccountServiceServer ¶
func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer)
Types ¶
type Account ¶
type Account struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type AccountResponse ¶
type AccountResponse struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*AccountResponse) Descriptor
deprecated
func (*AccountResponse) Descriptor() ([]byte, []int)
Deprecated: Use AccountResponse.ProtoReflect.Descriptor instead.
func (*AccountResponse) GetAccount ¶
func (x *AccountResponse) GetAccount() *Account
func (*AccountResponse) ProtoMessage ¶
func (*AccountResponse) ProtoMessage()
func (*AccountResponse) ProtoReflect ¶
func (x *AccountResponse) ProtoReflect() protoreflect.Message
func (*AccountResponse) Reset ¶
func (x *AccountResponse) Reset()
func (*AccountResponse) String ¶
func (x *AccountResponse) String() string
type AccountServiceClient ¶
type AccountServiceClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*AuthResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*AuthResponse, error) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*AccountResponse, error) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error) }
AccountServiceClient is the client API for AccountService 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.
func NewAccountServiceClient ¶
func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient
type AccountServiceServer ¶
type AccountServiceServer interface { Register(context.Context, *RegisterRequest) (*AuthResponse, error) Login(context.Context, *LoginRequest) (*AuthResponse, error) GetAccount(context.Context, *GetAccountRequest) (*AccountResponse, error) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) // contains filtered or unexported methods }
AccountServiceServer is the server API for AccountService service. All implementations must embed UnimplementedAccountServiceServer for forward compatibility.
type AuthResponse ¶
type AuthResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*AuthResponse) Descriptor
deprecated
func (*AuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
func (*AuthResponse) GetToken ¶
func (x *AuthResponse) GetToken() string
func (*AuthResponse) ProtoMessage ¶
func (*AuthResponse) ProtoMessage()
func (*AuthResponse) ProtoReflect ¶
func (x *AuthResponse) ProtoReflect() protoreflect.Message
func (*AuthResponse) Reset ¶
func (x *AuthResponse) Reset()
func (*AuthResponse) String ¶
func (x *AuthResponse) String() string
type GetAccountRequest ¶
type GetAccountRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetAccountRequest) Descriptor
deprecated
func (*GetAccountRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.
func (*GetAccountRequest) GetId ¶
func (x *GetAccountRequest) GetId() string
func (*GetAccountRequest) ProtoMessage ¶
func (*GetAccountRequest) ProtoMessage()
func (*GetAccountRequest) ProtoReflect ¶
func (x *GetAccountRequest) ProtoReflect() protoreflect.Message
func (*GetAccountRequest) Reset ¶
func (x *GetAccountRequest) Reset()
func (*GetAccountRequest) String ¶
func (x *GetAccountRequest) String() string
type GetAccountsRequest ¶
type GetAccountsRequest struct { Skip uint64 `protobuf:"varint,1,opt,name=skip,proto3" json:"skip,omitempty"` Take uint64 `protobuf:"varint,2,opt,name=take,proto3" json:"take,omitempty"` // contains filtered or unexported fields }
func (*GetAccountsRequest) Descriptor
deprecated
func (*GetAccountsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountsRequest.ProtoReflect.Descriptor instead.
func (*GetAccountsRequest) GetSkip ¶
func (x *GetAccountsRequest) GetSkip() uint64
func (*GetAccountsRequest) GetTake ¶
func (x *GetAccountsRequest) GetTake() uint64
func (*GetAccountsRequest) ProtoMessage ¶
func (*GetAccountsRequest) ProtoMessage()
func (*GetAccountsRequest) ProtoReflect ¶
func (x *GetAccountsRequest) ProtoReflect() protoreflect.Message
func (*GetAccountsRequest) Reset ¶
func (x *GetAccountsRequest) Reset()
func (*GetAccountsRequest) String ¶
func (x *GetAccountsRequest) String() string
type GetAccountsResponse ¶
type GetAccountsResponse struct { Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // contains filtered or unexported fields }
func (*GetAccountsResponse) Descriptor
deprecated
func (*GetAccountsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead.
func (*GetAccountsResponse) GetAccounts ¶
func (x *GetAccountsResponse) GetAccounts() []*Account
func (*GetAccountsResponse) ProtoMessage ¶
func (*GetAccountsResponse) ProtoMessage()
func (*GetAccountsResponse) ProtoReflect ¶
func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message
func (*GetAccountsResponse) Reset ¶
func (x *GetAccountsResponse) Reset()
func (*GetAccountsResponse) String ¶
func (x *GetAccountsResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type RegisterRequest ¶
type RegisterRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetEmail ¶
func (x *RegisterRequest) GetEmail() string
func (*RegisterRequest) GetName ¶
func (x *RegisterRequest) GetName() string
func (*RegisterRequest) GetPassword ¶
func (x *RegisterRequest) GetPassword() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type UnimplementedAccountServiceServer ¶
type UnimplementedAccountServiceServer struct{}
UnimplementedAccountServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAccountServiceServer) GetAccount ¶
func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*AccountResponse, error)
func (UnimplementedAccountServiceServer) GetAccounts ¶
func (UnimplementedAccountServiceServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
func (UnimplementedAccountServiceServer) Login ¶
func (UnimplementedAccountServiceServer) Login(context.Context, *LoginRequest) (*AuthResponse, error)
func (UnimplementedAccountServiceServer) Register ¶
func (UnimplementedAccountServiceServer) Register(context.Context, *RegisterRequest) (*AuthResponse, error)
type UnsafeAccountServiceServer ¶
type UnsafeAccountServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccountServiceServer will result in compilation errors.