Documentation ¶
Index ¶
- func BuildLoginPayload(authLoginBody string) (*auth.LoginPayload, error)
- func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func DecodeLogoutResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
- func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
- func LoginAuthPath() string
- func LogoutAuthPath() string
- type Client
- type LoginRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLoginPayload ¶
func BuildLoginPayload(authLoginBody string) (*auth.LoginPayload, error)
BuildLoginPayload builds the payload for the Auth Login endpoint from CLI flags.
func DecodeLoginResponse ¶
func DecodeLoginResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeLoginResponse returns a decoder for responses returned by the Auth Login endpoint. restoreBody controls whether the response body should be restored after having been read.
func DecodeLogoutResponse ¶
func DecodeLogoutResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error)
DecodeLogoutResponse returns a decoder for responses returned by the Auth Logout endpoint. restoreBody controls whether the response body should be restored after having been read.
func EncodeLoginRequest ¶
func EncodeLoginRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error
EncodeLoginRequest returns an encoder for requests sent to the Auth Login server.
func LoginAuthPath ¶
func LoginAuthPath() string
LoginAuthPath returns the URL path to the Auth service Login HTTP endpoint.
func LogoutAuthPath ¶
func LogoutAuthPath() string
LogoutAuthPath returns the URL path to the Auth service Logout HTTP endpoint.
Types ¶
type Client ¶
type Client struct { // Login Doer is the HTTP client used to make requests to the Login endpoint. LoginDoer goahttp.Doer // Logout Doer is the HTTP client used to make requests to the Logout endpoint. LogoutDoer goahttp.Doer // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool // contains filtered or unexported fields }
Client lists the Auth service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the Auth service servers.
func (*Client) BuildLoginRequest ¶
BuildLoginRequest instantiates a HTTP request object with method and path set to call the "Auth" service "Login" endpoint
func (*Client) BuildLogoutRequest ¶
BuildLogoutRequest instantiates a HTTP request object with method and path set to call the "Auth" service "Logout" endpoint
type LoginRequestBody ¶
type LoginRequestBody struct { // email Email string `form:"email" json:"email" xml:"email"` // password Password string `form:"password" json:"password" xml:"password"` }
LoginRequestBody is the type of the "Auth" service "Login" endpoint HTTP request body.
func NewLoginRequestBody ¶
func NewLoginRequestBody(p *auth.LoginPayload) *LoginRequestBody
NewLoginRequestBody builds the HTTP request body from the payload of the "Login" endpoint of the "Auth" service.