Documentation
¶
Index ¶
- func AuthenticateDiscoursePath() string
- func BuildAuthenticatePayload(discourseAuthenticateBody string, discourseAuthenticateToken string) (*discourse.AuthenticatePayload, error)
- func DecodeAuthenticateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func EncodeAuthenticateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func NewAuthenticateBadRequest(body *AuthenticateBadRequestResponseBody) *goa.ServiceError
- func NewAuthenticateForbidden(body *AuthenticateForbiddenResponseBody) *goa.ServiceError
- func NewAuthenticateNotFound(body *AuthenticateNotFoundResponseBody) *goa.ServiceError
- func NewAuthenticateResultOK(body *AuthenticateResponseBody) *discourse.AuthenticateResult
- func NewAuthenticateUnauthorized(body *AuthenticateUnauthorizedResponseBody) *goa.ServiceError
- func NewAuthenticateUserUnverified(body *AuthenticateUserUnverifiedResponseBody) *goa.ServiceError
- func ValidateAuthenticateBadRequestResponseBody(body *AuthenticateBadRequestResponseBody) (err error)
- func ValidateAuthenticateForbiddenResponseBody(body *AuthenticateForbiddenResponseBody) (err error)
- func ValidateAuthenticateNotFoundResponseBody(body *AuthenticateNotFoundResponseBody) (err error)
- func ValidateAuthenticateResponseBody(body *AuthenticateResponseBody) (err error)
- func ValidateAuthenticateUnauthorizedResponseBody(body *AuthenticateUnauthorizedResponseBody) (err error)
- func ValidateAuthenticateUserUnverifiedResponseBody(body *AuthenticateUserUnverifiedResponseBody) (err error)
- type AuthenticateBadRequestResponseBody
- type AuthenticateForbiddenResponseBody
- type AuthenticateNotFoundResponseBody
- type AuthenticateRequestBody
- type AuthenticateResponseBody
- type AuthenticateUnauthorizedResponseBody
- type AuthenticateUserUnverifiedResponseBody
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateDiscoursePath ¶
func AuthenticateDiscoursePath() string
AuthenticateDiscoursePath returns the URL path to the discourse service authenticate HTTP endpoint.
func BuildAuthenticatePayload ¶
func BuildAuthenticatePayload(discourseAuthenticateBody string, discourseAuthenticateToken string) (*discourse.AuthenticatePayload, error)
BuildAuthenticatePayload builds the payload for the discourse authenticate endpoint from CLI flags.
func DecodeAuthenticateResponse ¶
func DecodeAuthenticateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeAuthenticateResponse returns a decoder for responses returned by the discourse authenticate endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeAuthenticateResponse may return the following errors:
- "user-unverified" (type *goa.ServiceError): http.StatusForbidden
- "forbidden" (type *goa.ServiceError): http.StatusForbidden
- "unauthorized" (type *goa.ServiceError): http.StatusUnauthorized
- "not-found" (type *goa.ServiceError): http.StatusNotFound
- "bad-request" (type *goa.ServiceError): http.StatusBadRequest
- error: internal error
func EncodeAuthenticateRequest ¶
func EncodeAuthenticateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeAuthenticateRequest returns an encoder for requests sent to the discourse authenticate server.
func NewAuthenticateBadRequest ¶
func NewAuthenticateBadRequest(body *AuthenticateBadRequestResponseBody) *goa.ServiceError
NewAuthenticateBadRequest builds a discourse service authenticate endpoint bad-request error.
func NewAuthenticateForbidden ¶
func NewAuthenticateForbidden(body *AuthenticateForbiddenResponseBody) *goa.ServiceError
NewAuthenticateForbidden builds a discourse service authenticate endpoint forbidden error.
func NewAuthenticateNotFound ¶
func NewAuthenticateNotFound(body *AuthenticateNotFoundResponseBody) *goa.ServiceError
NewAuthenticateNotFound builds a discourse service authenticate endpoint not-found error.
func NewAuthenticateResultOK ¶
func NewAuthenticateResultOK(body *AuthenticateResponseBody) *discourse.AuthenticateResult
NewAuthenticateResultOK builds a "discourse" service "authenticate" endpoint result from a HTTP "OK" response.
func NewAuthenticateUnauthorized ¶
func NewAuthenticateUnauthorized(body *AuthenticateUnauthorizedResponseBody) *goa.ServiceError
NewAuthenticateUnauthorized builds a discourse service authenticate endpoint unauthorized error.
func NewAuthenticateUserUnverified ¶
func NewAuthenticateUserUnverified(body *AuthenticateUserUnverifiedResponseBody) *goa.ServiceError
NewAuthenticateUserUnverified builds a discourse service authenticate endpoint user-unverified error.
func ValidateAuthenticateBadRequestResponseBody ¶
func ValidateAuthenticateBadRequestResponseBody(body *AuthenticateBadRequestResponseBody) (err error)
ValidateAuthenticateBadRequestResponseBody runs the validations defined on authenticate_bad-request_response_body
func ValidateAuthenticateForbiddenResponseBody ¶
func ValidateAuthenticateForbiddenResponseBody(body *AuthenticateForbiddenResponseBody) (err error)
ValidateAuthenticateForbiddenResponseBody runs the validations defined on authenticate_forbidden_response_body
func ValidateAuthenticateNotFoundResponseBody ¶
func ValidateAuthenticateNotFoundResponseBody(body *AuthenticateNotFoundResponseBody) (err error)
ValidateAuthenticateNotFoundResponseBody runs the validations defined on authenticate_not-found_response_body
func ValidateAuthenticateResponseBody ¶
func ValidateAuthenticateResponseBody(body *AuthenticateResponseBody) (err error)
ValidateAuthenticateResponseBody runs the validations defined on AuthenticateResponseBody
func ValidateAuthenticateUnauthorizedResponseBody ¶
func ValidateAuthenticateUnauthorizedResponseBody(body *AuthenticateUnauthorizedResponseBody) (err error)
ValidateAuthenticateUnauthorizedResponseBody runs the validations defined on authenticate_unauthorized_response_body
func ValidateAuthenticateUserUnverifiedResponseBody ¶
func ValidateAuthenticateUserUnverifiedResponseBody(body *AuthenticateUserUnverifiedResponseBody) (err error)
ValidateAuthenticateUserUnverifiedResponseBody runs the validations defined on authenticate_user-unverified_response_body
Types ¶
type AuthenticateBadRequestResponseBody ¶
type AuthenticateBadRequestResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
AuthenticateBadRequestResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body for the "bad-request" error.
type AuthenticateForbiddenResponseBody ¶
type AuthenticateForbiddenResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
AuthenticateForbiddenResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body for the "forbidden" error.
type AuthenticateNotFoundResponseBody ¶
type AuthenticateNotFoundResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
AuthenticateNotFoundResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body for the "not-found" error.
type AuthenticateRequestBody ¶
type AuthenticateRequestBody struct {
Sso string `form:"sso" json:"sso" xml:"sso"`
Sig string `form:"sig" json:"sig" xml:"sig"`
Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"`
Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
}
AuthenticateRequestBody is the type of the "discourse" service "authenticate" endpoint HTTP request body.
func NewAuthenticateRequestBody ¶
func NewAuthenticateRequestBody(p *discourse.AuthenticatePayload) *AuthenticateRequestBody
NewAuthenticateRequestBody builds the HTTP request body from the payload of the "authenticate" endpoint of the "discourse" service.
type AuthenticateResponseBody ¶
type AuthenticateResponseBody struct {
Location *string `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"`
Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"`
Header *string `form:"header,omitempty" json:"header,omitempty" xml:"header,omitempty"`
}
AuthenticateResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body.
type AuthenticateUnauthorizedResponseBody ¶
type AuthenticateUnauthorizedResponseBody struct {
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
AuthenticateUnauthorizedResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body for the "unauthorized" error.
type AuthenticateUserUnverifiedResponseBody ¶
type AuthenticateUserUnverifiedResponseBody struct {
// Name is the name of this class of errors.
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// ID is a unique identifier for this particular occurrence of the problem.
ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
// Message is a human-readable explanation specific to this occurrence of the
// problem.
Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"`
// Is the error temporary?
Temporary *bool `form:"temporary,omitempty" json:"temporary,omitempty" xml:"temporary,omitempty"`
// Is the error a timeout?
Timeout *bool `form:"timeout,omitempty" json:"timeout,omitempty" xml:"timeout,omitempty"`
// Is the error a server-side fault?
Fault *bool `form:"fault,omitempty" json:"fault,omitempty" xml:"fault,omitempty"`
}
AuthenticateUserUnverifiedResponseBody is the type of the "discourse" service "authenticate" endpoint HTTP response body for the "user-unverified" error.
type Client ¶
type Client struct {
// Authenticate Doer is the HTTP client used to make requests to the
// authenticate endpoint.
AuthenticateDoer goahttp.Doer
// CORS Doer is the HTTP client used to make requests to the endpoint.
CORSDoer 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 discourse 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 discourse service servers.
func (*Client) Authenticate ¶
Authenticate returns an endpoint that makes HTTP requests to the discourse service authenticate server.