Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBankServer(s grpc.ServiceRegistrar, srv BankServer)
- type BankClient
- type BankServer
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetFullname() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetUsername() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- type LoginUserRequest
- func (*LoginUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginUserRequest) GetPassword() string
- func (x *LoginUserRequest) GetUsername() string
- func (*LoginUserRequest) ProtoMessage()
- func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
- func (x *LoginUserRequest) Reset()
- func (x *LoginUserRequest) String() string
- type LoginUserResponse
- type UnimplementedBankServer
- type UnsafeBankServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetFullname() string
- func (x *User) GetPasswordChangedAt() *timestamppb.Timestamp
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
const ( Bank_CreateUser_FullMethodName = "/pb.Bank/CreateUser" Bank_LoginUser_FullMethodName = "/pb.Bank/LoginUser" )
Variables ¶
var Bank_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Bank", HandlerType: (*BankServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateUser", Handler: _Bank_CreateUser_Handler, }, { MethodName: "LoginUser", Handler: _Bank_LoginUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "bank_service.proto", }
Bank_ServiceDesc is the grpc.ServiceDesc for Bank service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bank_service_proto protoreflect.FileDescriptor
var File_rpc_create_user_proto protoreflect.FileDescriptor
var File_rpc_login_user_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBankServer ¶
func RegisterBankServer(s grpc.ServiceRegistrar, srv BankServer)
Types ¶
type BankClient ¶
type BankClient interface { CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) LoginUser(ctx context.Context, in *LoginUserRequest, opts ...grpc.CallOption) (*LoginUserResponse, error) }
BankClient is the client API for Bank 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 NewBankClient ¶
func NewBankClient(cc grpc.ClientConnInterface) BankClient
type BankServer ¶
type BankServer interface { CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error) // contains filtered or unexported methods }
BankServer is the server API for Bank service. All implementations must embed UnimplementedBankServer for forward compatibility
type CreateUserRequest ¶
type CreateUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetFullname ¶
func (x *CreateUserRequest) GetFullname() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetUsername ¶
func (x *CreateUserRequest) GetUsername() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type LoginUserRequest ¶
type LoginUserRequest struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginUserRequest) Descriptor
deprecated
func (*LoginUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginUserRequest.ProtoReflect.Descriptor instead.
func (*LoginUserRequest) GetPassword ¶
func (x *LoginUserRequest) GetPassword() string
func (*LoginUserRequest) GetUsername ¶
func (x *LoginUserRequest) GetUsername() string
func (*LoginUserRequest) ProtoMessage ¶
func (*LoginUserRequest) ProtoMessage()
func (*LoginUserRequest) ProtoReflect ¶
func (x *LoginUserRequest) ProtoReflect() protoreflect.Message
func (*LoginUserRequest) Reset ¶
func (x *LoginUserRequest) Reset()
func (*LoginUserRequest) String ¶
func (x *LoginUserRequest) String() string
type LoginUserResponse ¶
type LoginUserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*LoginUserResponse) Descriptor
deprecated
func (*LoginUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginUserResponse.ProtoReflect.Descriptor instead.
func (*LoginUserResponse) GetUser ¶
func (x *LoginUserResponse) GetUser() *User
func (*LoginUserResponse) ProtoMessage ¶
func (*LoginUserResponse) ProtoMessage()
func (*LoginUserResponse) ProtoReflect ¶
func (x *LoginUserResponse) ProtoReflect() protoreflect.Message
func (*LoginUserResponse) Reset ¶
func (x *LoginUserResponse) Reset()
func (*LoginUserResponse) String ¶
func (x *LoginUserResponse) String() string
type UnimplementedBankServer ¶
type UnimplementedBankServer struct { }
UnimplementedBankServer must be embedded to have forward compatible implementations.
func (UnimplementedBankServer) CreateUser ¶
func (UnimplementedBankServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedBankServer) LoginUser ¶
func (UnimplementedBankServer) LoginUser(context.Context, *LoginUserRequest) (*LoginUserResponse, error)
type UnsafeBankServer ¶
type UnsafeBankServer interface {
// contains filtered or unexported methods
}
UnsafeBankServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BankServer will result in compilation errors.
type User ¶
type User struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Fullname string `protobuf:"bytes,2,opt,name=fullname,proto3" json:"fullname,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` PasswordChangedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=password_changed_at,json=passwordChangedAt,proto3" json:"password_changed_at,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetFullname ¶
func (*User) GetPasswordChangedAt ¶
func (x *User) GetPasswordChangedAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message