Documentation ¶
Index ¶
- func LoggingMiddleware(method string) endpoint.Middleware
- func MakeSigninEndpoint(svc service.IdentityService) endpoint.Endpoint
- func MakeSignupEndpoint(svc service.IdentityService) endpoint.Endpoint
- func ValidateMiddleware(validate *validator.Validate, trans ut.Translator) endpoint.Middleware
- type Endpoints
- type SigninRequest
- type SigninResponse
- type SignupRequest
- type SignupResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingMiddleware ¶
func LoggingMiddleware(method string) endpoint.Middleware
LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.
func MakeSigninEndpoint ¶
func MakeSigninEndpoint(svc service.IdentityService) endpoint.Endpoint
MakeSigninEndpoint make signin endpoint
func MakeSignupEndpoint ¶
func MakeSignupEndpoint(svc service.IdentityService) endpoint.Endpoint
MakeSignupEndpoint make signup endpoint
func ValidateMiddleware ¶
func ValidateMiddleware(validate *validator.Validate, trans ut.Translator) endpoint.Middleware
ValidateMiddleware returns an endpoint middleware that validate each invocation, and the resulting error, if any.
Types ¶
type SigninRequest ¶
type SigninRequest struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` IPAddress string `json:"ip_address"` Platform string `json:"platform"` IdpProvider string `json:"idp_provider"` Device entity.Device `json:"device"` }
SigninRequest define signin request
type SigninResponse ¶
type SigninResponse struct { IDToken string `json:"id_token"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
SigninResponse define signup response
type SignupRequest ¶
type SignupRequest struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Nickname string `json:"nickname,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Email string `json:"email,omitempty"` Platform string `json:"platform,omitempty"` IPAddress string `json:"ip_address,omitempty"` Device entity.Device `json:"device"` }
SignupRequest define signup response
type SignupResponse ¶
type SignupResponse struct { IDToken string `json:"id_token"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
SignupResponse define signup response
Click to show internal directories.
Click to hide internal directories.