Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func MakeUserUnverified(err error) *goa.ServiceError
- func NewAuthenticateEndpoint(s Service) goa.Endpoint
- type AuthenticateDiscourseFields
- type AuthenticatePayload
- type AuthenticateResult
- type Client
- type Endpoints
- type Service
Constants ¶
const ServiceName = "discourse"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [1]string{"authenticate"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func MakeUserUnverified ¶
func MakeUserUnverified(err error) *goa.ServiceError
MakeUserUnverified builds a goa.ServiceError from an error.
func NewAuthenticateEndpoint ¶
NewAuthenticateEndpoint returns an endpoint function that calls the method "authenticate" of service "discourse".
Types ¶
type AuthenticatePayload ¶
type AuthenticatePayload struct { Token *string Login *AuthenticateDiscourseFields }
AuthenticatePayload is the payload type of the discourse service authenticate method.
type AuthenticateResult ¶
AuthenticateResult is the result type of the discourse service authenticate method.
type Client ¶
Client is the "discourse" service client.
func (*Client) Authenticate ¶
func (c *Client) Authenticate(ctx context.Context, p *AuthenticatePayload) (res *AuthenticateResult, err error)
Authenticate calls the "authenticate" endpoint of the "discourse" service.
type Endpoints ¶
Endpoints wraps the "discourse" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "discourse" service with endpoints.
type Service ¶
type Service interface { // Authenticate implements authenticate. Authenticate(context.Context, *AuthenticatePayload) (res *AuthenticateResult, err error) }
Service is the discourse service interface.