Documentation
¶
Overview ¶
Package auth is a generated protocol buffer package.
It is generated from these files:
auth.proto
It has these top-level messages:
LoginRequest LoginResponse User
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s *grpc.Server, srv AuthServer)
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 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 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 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 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"` }
The user message containing the user.
func (*User) Descriptor ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.