Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthClient ¶
type AuthClient interface { // LogIn logs in LogIn(r *pb.LogInRequest) (*pb.AuthResponse, error) // Validate validates Validate(r *pb.CredentialsRequest) (*pb.AuthResponse, error) }
AuthClient abstracts grpc and rest clients
func NewGrpcClient ¶
func NewGrpcClient(endpoint string) AuthClient
NewGrpcClient creates a new grpc client for given endpoint
func NewRestClient ¶
func NewRestClient(endpoint string) AuthClient
NewRestClient creates a new rest client for given endpoint
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
GrpcClient is a GRPC implementation of AuthClient
func (GrpcClient) LogIn ¶
func (g GrpcClient) LogIn(r *pb.LogInRequest) (*pb.AuthResponse, error)
LogIn logs in
func (GrpcClient) Validate ¶
func (g GrpcClient) Validate(r *pb.CredentialsRequest) (*pb.AuthResponse, error)
Validate validates
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
RestClient is a REST implementation of AuthClient
func (RestClient) LogIn ¶
func (c RestClient) LogIn(r *pb.LogInRequest) (*pb.AuthResponse, error)
LogIn logs in
func (RestClient) Validate ¶
func (c RestClient) Validate(r *pb.CredentialsRequest) (*pb.AuthResponse, error)
Validate validates
Click to show internal directories.
Click to hide internal directories.