Documentation ¶
Index ¶
- type Grpc
- func (a *Grpc) GetErrors(ctx context.Context, req *pb_error.ErrorRequest) (*pb_error.Errors, error)
- func (a *Grpc) Login(ctx context.Context, loginRequest *pb_authentication.LoginRequest) (*pb_authentication.Token, error)
- func (a *Grpc) Logout(ctx context.Context, token *pb_authentication.Token) (*pb_authentication.LogoutResponse, error)
- func (a *Grpc) Refresh(ctx context.Context, token *pb_authentication.Token) (*pb_authentication.Token, error)
- func (a *Grpc) Serve(port string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Grpc ¶
type Grpc struct { pb_error.UnimplementedErorrSvcServer pb_user.UnimplementedUserSvcServer pb_authentication.UnimplementedAuthenticationSvcServer // contains filtered or unexported fields }
Grpc is the gRPC API for the application
func NewGrpc ¶
func NewGrpc(qh pp_query.QueryPort, ch pp_command.CommandPort) *Grpc
NewGrpc creates a new instance of Grpc
func (*Grpc) Login ¶
func (a *Grpc) Login(ctx context.Context, loginRequest *pb_authentication.LoginRequest) (*pb_authentication.Token, error)
Login generates an authentication token if the given user values are valid.
func (*Grpc) Logout ¶
func (a *Grpc) Logout(ctx context.Context, token *pb_authentication.Token) (*pb_authentication.LogoutResponse, error)
Logout clears some footprints for the user.
func (*Grpc) Refresh ¶
func (a *Grpc) Refresh(ctx context.Context, token *pb_authentication.Token) (*pb_authentication.Token, error)
Refresh regenerate an authentication token.
Click to show internal directories.
Click to hide internal directories.