Documentation ¶
Overview ¶
Package hello is a generated protocol buffer package.
It is generated from these files:
hello.proto
It has these top-level messages:
Request Response LoginRequest LoginResponse User
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
func RegisterHelloServer ¶
func RegisterHelloServer(s *grpc.Server, srv HelloServer)
Types ¶
type AuthClient ¶
type AuthClient interface {
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
}
func NewAuthClient ¶
func NewAuthClient(cc *grpc.ClientConn) AuthClient
type AuthServer ¶
type AuthServer interface {
Login(context.Context, *LoginRequest) (*LoginResponse, error)
}
type HelloClient ¶
type HelloClient interface { // Sends a greeting. Say(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) }
func NewHelloClient ¶
func NewHelloClient(cc *grpc.ClientConn) HelloClient
type HelloServer ¶
type LoginRequest ¶
type LoginRequest struct { Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` }
The login request message containing the username and password.
func (*LoginRequest) Descriptor ¶
func (*LoginRequest) Descriptor() ([]byte, []int)
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) Reset ¶
func (m *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (m *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct {
Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}
The login response message containing the JWT token.
func (*LoginResponse) Descriptor ¶
func (*LoginResponse) Descriptor() ([]byte, []int)
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) Reset ¶
func (m *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (m *LoginResponse) String() string
type Request ¶
type Request struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
The request message containing the user's name.
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
type Response ¶
type Response struct {
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
The response message containing the greeting.
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
type User ¶
type User struct { Email string `protobuf:"bytes,1,opt,name=email" json:"email,omitempty"` Username string `protobuf:"bytes,2,opt,name=username" json:"username,omitempty"` PasswordHash string `protobuf:"bytes,3,opt,name=passwordHash" json:"passwordHash,omitempty"` IsAdmin bool `protobuf:"varint,4,opt,name=isAdmin" json:"isAdmin,omitempty"` }
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.