Documentation ¶
Index ¶
- Constants
- type PostOauth2Token
- type PostOauth2TokenHandler
- type PostOauth2TokenHandlerFunc
- type PostOauth2TokenInternalServerError
- func (o *PostOauth2TokenInternalServerError) SetPayload(payload *models.Error)
- func (o *PostOauth2TokenInternalServerError) WithPayload(payload *models.Error) *PostOauth2TokenInternalServerError
- func (o *PostOauth2TokenInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type PostOauth2TokenOK
- type PostOauth2TokenOKBody
- type PostOauth2TokenParams
- type PostOauth2TokenURL
- func (o *PostOauth2TokenURL) Build() (*url.URL, error)
- func (o *PostOauth2TokenURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PostOauth2TokenURL) Must(u *url.URL, err error) *url.URL
- func (o *PostOauth2TokenURL) SetBasePath(bp string)
- func (o *PostOauth2TokenURL) String() string
- func (o *PostOauth2TokenURL) StringFull(scheme, host string) string
- func (o *PostOauth2TokenURL) WithBasePath(bp string) *PostOauth2TokenURL
- type PostOauth2TokenUnauthorized
Constants ¶
const PostOauth2TokenInternalServerErrorCode int = 500
PostOauth2TokenInternalServerErrorCode is the HTTP code returned for type PostOauth2TokenInternalServerError
const PostOauth2TokenOKCode int = 200
PostOauth2TokenOKCode is the HTTP code returned for type PostOauth2TokenOK
PostOauth2TokenUnauthorizedCode is the HTTP code returned for type PostOauth2TokenUnauthorized
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostOauth2Token ¶
type PostOauth2Token struct { Context *middleware.Context Handler PostOauth2TokenHandler }
PostOauth2Token swagger:route POST /oauth2/token Authorization postOauth2Token
Get an access token ¶
This operation can be used to get an access token by providing the username and password in the autherization header
func NewPostOauth2Token ¶
func NewPostOauth2Token(ctx *middleware.Context, handler PostOauth2TokenHandler) *PostOauth2Token
NewPostOauth2Token creates a new http.Handler for the post oauth2 token operation
func (*PostOauth2Token) ServeHTTP ¶
func (o *PostOauth2Token) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PostOauth2TokenHandler ¶
type PostOauth2TokenHandler interface {
Handle(PostOauth2TokenParams) middleware.Responder
}
PostOauth2TokenHandler interface for that can handle valid post oauth2 token params
type PostOauth2TokenHandlerFunc ¶
type PostOauth2TokenHandlerFunc func(PostOauth2TokenParams) middleware.Responder
PostOauth2TokenHandlerFunc turns a function with the right signature into a post oauth2 token handler
func (PostOauth2TokenHandlerFunc) Handle ¶
func (fn PostOauth2TokenHandlerFunc) Handle(params PostOauth2TokenParams) middleware.Responder
Handle executing the request and returning a response
type PostOauth2TokenInternalServerError ¶
type PostOauth2TokenInternalServerError struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` }
PostOauth2TokenInternalServerError Internal Server Error.
swagger:response postOauth2TokenInternalServerError
func NewPostOauth2TokenInternalServerError ¶
func NewPostOauth2TokenInternalServerError() *PostOauth2TokenInternalServerError
NewPostOauth2TokenInternalServerError creates PostOauth2TokenInternalServerError with default headers values
func (*PostOauth2TokenInternalServerError) SetPayload ¶
func (o *PostOauth2TokenInternalServerError) SetPayload(payload *models.Error)
SetPayload sets the payload to the post oauth2 token internal server error response
func (*PostOauth2TokenInternalServerError) WithPayload ¶
func (o *PostOauth2TokenInternalServerError) WithPayload(payload *models.Error) *PostOauth2TokenInternalServerError
WithPayload adds the payload to the post oauth2 token internal server error response
func (*PostOauth2TokenInternalServerError) WriteResponse ¶
func (o *PostOauth2TokenInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostOauth2TokenOK ¶
type PostOauth2TokenOK struct { /* In: Body */ Payload *PostOauth2TokenOKBody `json:"body,omitempty"` }
PostOauth2TokenOK Authentication successful. Returns an access token.
swagger:response postOauth2TokenOK
func NewPostOauth2TokenOK ¶
func NewPostOauth2TokenOK() *PostOauth2TokenOK
NewPostOauth2TokenOK creates PostOauth2TokenOK with default headers values
func (*PostOauth2TokenOK) SetPayload ¶
func (o *PostOauth2TokenOK) SetPayload(payload *PostOauth2TokenOKBody)
SetPayload sets the payload to the post oauth2 token o k response
func (*PostOauth2TokenOK) WithPayload ¶
func (o *PostOauth2TokenOK) WithPayload(payload *PostOauth2TokenOKBody) *PostOauth2TokenOK
WithPayload adds the payload to the post oauth2 token o k response
func (*PostOauth2TokenOK) WriteResponse ¶
func (o *PostOauth2TokenOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostOauth2TokenOKBody ¶
type PostOauth2TokenOKBody struct { // access token AccessToken string `json:"accessToken,omitempty"` }
PostOauth2TokenOKBody post oauth2 token o k body
swagger:model PostOauth2TokenOKBody
func (*PostOauth2TokenOKBody) ContextValidate ¶
ContextValidate validates this post oauth2 token o k body based on context it is used
func (*PostOauth2TokenOKBody) MarshalBinary ¶
func (o *PostOauth2TokenOKBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*PostOauth2TokenOKBody) UnmarshalBinary ¶
func (o *PostOauth2TokenOKBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type PostOauth2TokenParams ¶
type PostOauth2TokenParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /*Credentials of the microgateway REST API user Required: true In: body */ Credentials *models.Credentials }
PostOauth2TokenParams contains all the bound params for the post oauth2 token operation typically these are obtained from a http.Request
swagger:parameters PostOauth2Token
func NewPostOauth2TokenParams ¶
func NewPostOauth2TokenParams() PostOauth2TokenParams
NewPostOauth2TokenParams creates a new PostOauth2TokenParams object
There are no default values defined in the spec.
func (*PostOauth2TokenParams) BindRequest ¶
func (o *PostOauth2TokenParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewPostOauth2TokenParams() beforehand.
type PostOauth2TokenURL ¶
type PostOauth2TokenURL struct {
// contains filtered or unexported fields
}
PostOauth2TokenURL generates an URL for the post oauth2 token operation
func (*PostOauth2TokenURL) Build ¶
func (o *PostOauth2TokenURL) Build() (*url.URL, error)
Build a url path and query string
func (*PostOauth2TokenURL) BuildFull ¶
func (o *PostOauth2TokenURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PostOauth2TokenURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*PostOauth2TokenURL) SetBasePath ¶
func (o *PostOauth2TokenURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*PostOauth2TokenURL) String ¶
func (o *PostOauth2TokenURL) String() string
String returns the string representation of the path with query string
func (*PostOauth2TokenURL) StringFull ¶
func (o *PostOauth2TokenURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PostOauth2TokenURL) WithBasePath ¶
func (o *PostOauth2TokenURL) WithBasePath(bp string) *PostOauth2TokenURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
type PostOauth2TokenUnauthorized ¶
PostOauth2TokenUnauthorized Unauthorized. Invalid authentication credentials.
swagger:response postOauth2TokenUnauthorized
func NewPostOauth2TokenUnauthorized ¶
func NewPostOauth2TokenUnauthorized() *PostOauth2TokenUnauthorized
NewPostOauth2TokenUnauthorized creates PostOauth2TokenUnauthorized with default headers values
func (*PostOauth2TokenUnauthorized) SetPayload ¶
func (o *PostOauth2TokenUnauthorized) SetPayload(payload *models.Error)
SetPayload sets the payload to the post oauth2 token unauthorized response
func (*PostOauth2TokenUnauthorized) WithPayload ¶
func (o *PostOauth2TokenUnauthorized) WithPayload(payload *models.Error) *PostOauth2TokenUnauthorized
WithPayload adds the payload to the post oauth2 token unauthorized response
func (*PostOauth2TokenUnauthorized) WriteResponse ¶
func (o *PostOauth2TokenUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client