Documentation
¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by devnw.dev/apic version (devel) DO NOT EDIT.
Index ¶
- Constants
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func NewCreatePetRequest(server string, body CreatePetJSONRequestBody) (*http.Request, error)
- func NewCreatePetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error)
- func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteUserRequest(server string, userId ID) (*http.Request, error)
- func NewEchoRequest(server string, body EchoJSONRequestBody) (*http.Request, error)
- func NewEchoRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetCurrentUserRequest(server string) (*http.Request, error)
- func NewGetUserByIdRequest(server string, userId ID) (*http.Request, error)
- func NewListPetsRequest(server string) (*http.Request, error)
- func NewListUsersRequest(server string) (*http.Request, error)
- func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error)
- func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewLogoutUserRequest(server string) (*http.Request, error)
- func NewRefreshTokenRequest(server string, body RefreshTokenJSONRequestBody) (*http.Request, error)
- func NewRefreshTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error)
- func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewShowPetByIdRequest(server string, petId ID) (*http.Request, error)
- func NewUpdateUserRequest(server string, userId ID, body UpdateUserJSONRequestBody) (*http.Request, error)
- func NewUpdateUserRequestWithBody(server string, userId ID, contentType string, body io.Reader) (*http.Request, error)
- type BadRequest
- type Claims
- type Client
- func (c *Client) CreatePet(ctx context.Context, body CreatePetJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteUser(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Echo(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) EchoWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetUserById(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RefreshToken(ctx context.Context, body RefreshTokenJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ShowPetById(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateUser(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpdateUserWithBody(ctx context.Context, userId ID, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreatePetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreatePetResponse, error)
- func (c *ClientWithResponses) CreatePetWithResponse(ctx context.Context, body CreatePetJSONRequestBody, ...) (*CreatePetResponse, error)
- func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
- func (c *ClientWithResponses) EchoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*EchoResponse, error)
- func (c *ClientWithResponses) EchoWithResponse(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*EchoResponse, error)
- func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
- func (c *ClientWithResponses) GetUserByIdWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*GetUserByIdResponse, error)
- func (c *ClientWithResponses) ListPetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPetsResponse, error)
- func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
- func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*LoginUserResponse, error)
- func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, ...) (*LoginUserResponse, error)
- func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error)
- func (c *ClientWithResponses) RefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RefreshTokenResponse, error)
- func (c *ClientWithResponses) RefreshTokenWithResponse(ctx context.Context, body RefreshTokenJSONRequestBody, ...) (*RefreshTokenResponse, error)
- func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RegisterUserResponse, error)
- func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, ...) (*RegisterUserResponse, error)
- func (c *ClientWithResponses) ShowPetByIdWithResponse(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*ShowPetByIdResponse, error)
- func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, userId ID, contentType string, body io.Reader, ...) (*UpdateUserResponse, error)
- func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, ...) (*UpdateUserResponse, error)
- type ClientWithResponsesInterface
- type Conflict
- type CreatePetJSONRequestBody
- type CreatePetResponse
- func (r CreatePetResponse) ContentType() string
- func (r CreatePetResponse) GetBody() []byte
- func (r CreatePetResponse) GetJSON201() *Pet
- func (r CreatePetResponse) GetJSON400() *BadRequest
- func (r CreatePetResponse) GetJSON401() *Unauthorized
- func (r CreatePetResponse) GetJSON403() *Forbidden
- func (r CreatePetResponse) GetJSON404() *NotFound
- func (r CreatePetResponse) GetJSON429() *TooManyRequests
- func (r CreatePetResponse) GetJSON500() *InternalServerError
- func (r CreatePetResponse) GetJSONDefault() *UnexpectedError
- func (r CreatePetResponse) Status() string
- func (r CreatePetResponse) StatusCode() int
- type CreatePetResponse201Headers
- type CreatePetResponse400Headers
- type CreatePetResponse401Headers
- type CreatePetResponse403Headers
- type CreatePetResponse404Headers
- type CreatePetResponse429Headers
- type CreatePetResponse500Headers
- type CreatePetResponseDefaultHeaders
- type CreateUserJSONRequestBody
- type CreateUserResponse
- func (r CreateUserResponse) ContentType() string
- func (r CreateUserResponse) GetBody() []byte
- func (r CreateUserResponse) GetJSON201() *User
- func (r CreateUserResponse) GetJSON400() *BadRequest
- func (r CreateUserResponse) GetJSON401() *Unauthorized
- func (r CreateUserResponse) GetJSON403() *Forbidden
- func (r CreateUserResponse) GetJSON409() *Conflict
- func (r CreateUserResponse) GetJSON429() *TooManyRequests
- func (r CreateUserResponse) GetJSON500() *InternalServerError
- func (r CreateUserResponse) GetJSONDefault() *UnexpectedError
- func (r CreateUserResponse) Status() string
- func (r CreateUserResponse) StatusCode() int
- type CreateUserResponse201Headers
- type CreateUserResponse400Headers
- type CreateUserResponse401Headers
- type CreateUserResponse403Headers
- type CreateUserResponse409Headers
- type CreateUserResponse429Headers
- type CreateUserResponse500Headers
- type CreateUserResponseDefaultHeaders
- type DeleteUserResponse
- func (r DeleteUserResponse) ContentType() string
- func (r DeleteUserResponse) GetBody() []byte
- func (r DeleteUserResponse) GetJSON400() *BadRequest
- func (r DeleteUserResponse) GetJSON401() *Unauthorized
- func (r DeleteUserResponse) GetJSON403() *Forbidden
- func (r DeleteUserResponse) GetJSON404() *NotFound
- func (r DeleteUserResponse) GetJSON429() *TooManyRequests
- func (r DeleteUserResponse) GetJSON500() *InternalServerError
- func (r DeleteUserResponse) GetJSONDefault() *UnexpectedError
- func (r DeleteUserResponse) Status() string
- func (r DeleteUserResponse) StatusCode() int
- type DeleteUserResponse204Headers
- type DeleteUserResponse400Headers
- type DeleteUserResponse401Headers
- type DeleteUserResponse403Headers
- type DeleteUserResponse404Headers
- type DeleteUserResponse429Headers
- type DeleteUserResponse500Headers
- type DeleteUserResponseDefaultHeaders
- type EchoJSONRequestBody
- type EchoMsg
- type EchoReq
- type EchoResp
- type EchoResponse
- func (r EchoResponse) ContentType() string
- func (r EchoResponse) GetBody() []byte
- func (r EchoResponse) GetJSON200() *EchoResp
- func (r EchoResponse) GetJSON400() *BadRequest
- func (r EchoResponse) GetJSON401() *Unauthorized
- func (r EchoResponse) GetJSON429() *TooManyRequests
- func (r EchoResponse) GetJSON500() *InternalServerError
- func (r EchoResponse) Status() string
- func (r EchoResponse) StatusCode() int
- type EchoResponse200Headers
- type EchoResponse400Headers
- type EchoResponse401Headers
- type EchoResponse429Headers
- type EchoResponse500Headers
- type Error
- type Forbidden
- type GetCurrentUserResponse
- func (r GetCurrentUserResponse) ContentType() string
- func (r GetCurrentUserResponse) GetBody() []byte
- func (r GetCurrentUserResponse) GetJSON200() *User
- func (r GetCurrentUserResponse) GetJSON400() *BadRequest
- func (r GetCurrentUserResponse) GetJSON401() *Unauthorized
- func (r GetCurrentUserResponse) GetJSON403() *Forbidden
- func (r GetCurrentUserResponse) GetJSON429() *TooManyRequests
- func (r GetCurrentUserResponse) GetJSON500() *InternalServerError
- func (r GetCurrentUserResponse) GetJSONDefault() *UnexpectedError
- func (r GetCurrentUserResponse) Status() string
- func (r GetCurrentUserResponse) StatusCode() int
- type GetCurrentUserResponse200Headers
- type GetCurrentUserResponse400Headers
- type GetCurrentUserResponse401Headers
- type GetCurrentUserResponse403Headers
- type GetCurrentUserResponse429Headers
- type GetCurrentUserResponse500Headers
- type GetCurrentUserResponseDefaultHeaders
- type GetUserByIdResponse
- func (r GetUserByIdResponse) ContentType() string
- func (r GetUserByIdResponse) GetBody() []byte
- func (r GetUserByIdResponse) GetJSON200() *User
- func (r GetUserByIdResponse) GetJSON400() *BadRequest
- func (r GetUserByIdResponse) GetJSON401() *Unauthorized
- func (r GetUserByIdResponse) GetJSON403() *Forbidden
- func (r GetUserByIdResponse) GetJSON404() *NotFound
- func (r GetUserByIdResponse) GetJSON429() *TooManyRequests
- func (r GetUserByIdResponse) GetJSON500() *InternalServerError
- func (r GetUserByIdResponse) GetJSONDefault() *UnexpectedError
- func (r GetUserByIdResponse) Status() string
- func (r GetUserByIdResponse) StatusCode() int
- type GetUserByIdResponse200Headers
- type GetUserByIdResponse400Headers
- type GetUserByIdResponse401Headers
- type GetUserByIdResponse403Headers
- type GetUserByIdResponse404Headers
- type GetUserByIdResponse429Headers
- type GetUserByIdResponse500Headers
- type GetUserByIdResponseDefaultHeaders
- type HttpRequestDoer
- type ID
- type InternalServerError
- type InvalidParamFormatError
- type ListPetsResponse
- func (r ListPetsResponse) ContentType() string
- func (r ListPetsResponse) GetBody() []byte
- func (r ListPetsResponse) GetJSON200() *[]Pet
- func (r ListPetsResponse) GetJSON400() *BadRequest
- func (r ListPetsResponse) GetJSON401() *Unauthorized
- func (r ListPetsResponse) GetJSON403() *Forbidden
- func (r ListPetsResponse) GetJSON404() *NotFound
- func (r ListPetsResponse) GetJSON429() *TooManyRequests
- func (r ListPetsResponse) GetJSON500() *InternalServerError
- func (r ListPetsResponse) GetJSONDefault() *UnexpectedError
- func (r ListPetsResponse) Status() string
- func (r ListPetsResponse) StatusCode() int
- type ListPetsResponse200Headers
- type ListPetsResponse400Headers
- type ListPetsResponse401Headers
- type ListPetsResponse403Headers
- type ListPetsResponse404Headers
- type ListPetsResponse429Headers
- type ListPetsResponse500Headers
- type ListPetsResponseDefaultHeaders
- type ListUsersResponse
- func (r ListUsersResponse) ContentType() string
- func (r ListUsersResponse) GetBody() []byte
- func (r ListUsersResponse) GetJSON200() *[]User
- func (r ListUsersResponse) GetJSON400() *BadRequest
- func (r ListUsersResponse) GetJSON401() *Unauthorized
- func (r ListUsersResponse) GetJSON403() *Forbidden
- func (r ListUsersResponse) GetJSON429() *TooManyRequests
- func (r ListUsersResponse) GetJSON500() *InternalServerError
- func (r ListUsersResponse) GetJSONDefault() *UnexpectedError
- func (r ListUsersResponse) Status() string
- func (r ListUsersResponse) StatusCode() int
- type ListUsersResponse200Headers
- type ListUsersResponse400Headers
- type ListUsersResponse401Headers
- type ListUsersResponse403Headers
- type ListUsersResponse429Headers
- type ListUsersResponse500Headers
- type ListUsersResponseDefaultHeaders
- type Login
- type LoginUserJSONRequestBody
- type LoginUserResponse
- func (r LoginUserResponse) ContentType() string
- func (r LoginUserResponse) GetBody() []byte
- func (r LoginUserResponse) GetJSON200() *Token
- func (r LoginUserResponse) GetJSON400() *BadRequest
- func (r LoginUserResponse) GetJSON401() *Unauthorized
- func (r LoginUserResponse) GetJSON429() *TooManyRequests
- func (r LoginUserResponse) GetJSON500() *InternalServerError
- func (r LoginUserResponse) GetJSONDefault() *UnexpectedError
- func (r LoginUserResponse) Status() string
- func (r LoginUserResponse) StatusCode() int
- type LoginUserResponse200Headers
- type LoginUserResponse400Headers
- type LoginUserResponse401Headers
- type LoginUserResponse429Headers
- type LoginUserResponse500Headers
- type LoginUserResponseDefaultHeaders
- type LogoutUserResponse
- func (r LogoutUserResponse) ContentType() string
- func (r LogoutUserResponse) GetBody() []byte
- func (r LogoutUserResponse) GetJSON200() ...
- func (r LogoutUserResponse) GetJSON400() *BadRequest
- func (r LogoutUserResponse) GetJSON401() *Unauthorized
- func (r LogoutUserResponse) GetJSON429() *TooManyRequests
- func (r LogoutUserResponse) GetJSON500() *InternalServerError
- func (r LogoutUserResponse) GetJSONDefault() *UnexpectedError
- func (r LogoutUserResponse) Status() string
- func (r LogoutUserResponse) StatusCode() int
- type LogoutUserResponse200Headers
- type LogoutUserResponse204Headers
- type LogoutUserResponse400Headers
- type LogoutUserResponse401Headers
- type LogoutUserResponse429Headers
- type LogoutUserResponse500Headers
- type LogoutUserResponseDefaultHeaders
- type MiddlewareFunc
- type NotFound
- type Password
- type Pet
- type RefreshTokenJSONBody
- type RefreshTokenJSONRequestBody
- type RefreshTokenResponse
- func (r RefreshTokenResponse) ContentType() string
- func (r RefreshTokenResponse) GetBody() []byte
- func (r RefreshTokenResponse) GetJSON200() *Token
- func (r RefreshTokenResponse) GetJSON400() *BadRequest
- func (r RefreshTokenResponse) GetJSON401() *Unauthorized
- func (r RefreshTokenResponse) GetJSON429() *TooManyRequests
- func (r RefreshTokenResponse) GetJSON500() *InternalServerError
- func (r RefreshTokenResponse) GetJSONDefault() *UnexpectedError
- func (r RefreshTokenResponse) Status() string
- func (r RefreshTokenResponse) StatusCode() int
- type RefreshTokenResponse200Headers
- type RefreshTokenResponse400Headers
- type RefreshTokenResponse401Headers
- type RefreshTokenResponse429Headers
- type RefreshTokenResponse500Headers
- type RefreshTokenResponseDefaultHeaders
- type RegisterUserJSONRequestBody
- type RegisterUserResponse
- func (r RegisterUserResponse) ContentType() string
- func (r RegisterUserResponse) GetBody() []byte
- func (r RegisterUserResponse) GetJSON201() *User
- func (r RegisterUserResponse) GetJSON400() *BadRequest
- func (r RegisterUserResponse) GetJSON401() *Unauthorized
- func (r RegisterUserResponse) GetJSON409() *Conflict
- func (r RegisterUserResponse) GetJSON429() *TooManyRequests
- func (r RegisterUserResponse) GetJSON500() *InternalServerError
- func (r RegisterUserResponse) GetJSONDefault() *UnexpectedError
- func (r RegisterUserResponse) Status() string
- func (r RegisterUserResponse) StatusCode() int
- type RegisterUserResponse201Headers
- type RegisterUserResponse400Headers
- type RegisterUserResponse401Headers
- type RegisterUserResponse409Headers
- type RegisterUserResponse429Headers
- type RegisterUserResponse500Headers
- type RegisterUserResponseDefaultHeaders
- type Registration
- type RequestEditorFn
- type RequiredHeaderError
- type RequiredParamError
- type Role
- type ServeMux
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreatePet(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) Echo(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCurrentUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetUserById(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPets(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LoginUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) LogoutUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RefreshToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RegisterUser(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ShowPetById(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request)
- type ShowPetByIdResponse
- func (r ShowPetByIdResponse) ContentType() string
- func (r ShowPetByIdResponse) GetBody() []byte
- func (r ShowPetByIdResponse) GetJSON200() *Pet
- func (r ShowPetByIdResponse) GetJSON201() *Pet
- func (r ShowPetByIdResponse) GetJSON400() *BadRequest
- func (r ShowPetByIdResponse) GetJSON401() *Unauthorized
- func (r ShowPetByIdResponse) GetJSON403() *Forbidden
- func (r ShowPetByIdResponse) GetJSON404() *NotFound
- func (r ShowPetByIdResponse) GetJSON429() *TooManyRequests
- func (r ShowPetByIdResponse) GetJSON500() *InternalServerError
- func (r ShowPetByIdResponse) GetJSONDefault() *UnexpectedError
- func (r ShowPetByIdResponse) Status() string
- func (r ShowPetByIdResponse) StatusCode() int
- type ShowPetByIdResponse200Headers
- type ShowPetByIdResponse201Headers
- type ShowPetByIdResponse400Headers
- type ShowPetByIdResponse401Headers
- type ShowPetByIdResponse403Headers
- type ShowPetByIdResponse404Headers
- type ShowPetByIdResponse429Headers
- type ShowPetByIdResponse500Headers
- type ShowPetByIdResponseDefaultHeaders
- type StdHTTPServerOptions
- type Token
- type TooManyRequests
- type TooManyValuesForParamError
- type Unauthorized
- type UnescapedCookieParamError
- type UnexpectedError
- type UnmarshalingParamError
- type UpdateUserJSONBody
- type UpdateUserJSONRequestBody
- type UpdateUserResponse
- func (r UpdateUserResponse) ContentType() string
- func (r UpdateUserResponse) GetBody() []byte
- func (r UpdateUserResponse) GetJSON200() *User
- func (r UpdateUserResponse) GetJSON400() *BadRequest
- func (r UpdateUserResponse) GetJSON401() *Unauthorized
- func (r UpdateUserResponse) GetJSON403() *Forbidden
- func (r UpdateUserResponse) GetJSON404() *NotFound
- func (r UpdateUserResponse) GetJSON429() *TooManyRequests
- func (r UpdateUserResponse) GetJSON500() *InternalServerError
- func (r UpdateUserResponse) GetJSONDefault() *UnexpectedError
- func (r UpdateUserResponse) Status() string
- func (r UpdateUserResponse) StatusCode() int
- type UpdateUserResponse200Headers
- type UpdateUserResponse400Headers
- type UpdateUserResponse401Headers
- type UpdateUserResponse403Headers
- type UpdateUserResponse404Headers
- type UpdateUserResponse429Headers
- type UpdateUserResponse500Headers
- type UpdateUserResponseDefaultHeaders
- type User
- type Username
Constants ¶
const ( BearerAuthScopes bearerAuthContextKey = "bearerAuth.Scopes" MutualTLSAuthScopes mutualTLSAuthContextKey = "mutualTLSAuth.Scopes" Oauth2AuthScopes oauth2AuthContextKey = "oauth2Auth.Scopes" OpenIdConnectAuthScopes openIdConnectAuthContextKey = "openIdConnectAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMuxWithBaseURL ¶
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
func NewCreatePetRequest ¶
func NewCreatePetRequest(server string, body CreatePetJSONRequestBody) (*http.Request, error)
NewCreatePetRequest calls the generic CreatePet builder with application/json body
func NewCreatePetRequestWithBody ¶
func NewCreatePetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreatePetRequestWithBody constructs an http.Request for the CreatePet method, with any body, and a specified content type
func NewCreateUserRequest ¶
func NewCreateUserRequest(server string, body CreateUserJSONRequestBody) (*http.Request, error)
NewCreateUserRequest calls the generic CreateUser builder with application/json body
func NewCreateUserRequestWithBody ¶
func NewCreateUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateUserRequestWithBody constructs an http.Request for the CreateUser method, with any body, and a specified content type
func NewDeleteUserRequest ¶
NewDeleteUserRequest constructs an http.Request for the DeleteUser method
func NewEchoRequest ¶
func NewEchoRequest(server string, body EchoJSONRequestBody) (*http.Request, error)
NewEchoRequest calls the generic Echo builder with application/json body
func NewEchoRequestWithBody ¶
func NewEchoRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewEchoRequestWithBody constructs an http.Request for the Echo method, with any body, and a specified content type
func NewGetCurrentUserRequest ¶
NewGetCurrentUserRequest constructs an http.Request for the GetCurrentUser method
func NewGetUserByIdRequest ¶
NewGetUserByIdRequest constructs an http.Request for the GetUserById method
func NewListPetsRequest ¶
NewListPetsRequest constructs an http.Request for the ListPets method
func NewListUsersRequest ¶
NewListUsersRequest constructs an http.Request for the ListUsers method
func NewLoginUserRequest ¶
func NewLoginUserRequest(server string, body LoginUserJSONRequestBody) (*http.Request, error)
NewLoginUserRequest calls the generic LoginUser builder with application/json body
func NewLoginUserRequestWithBody ¶
func NewLoginUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewLoginUserRequestWithBody constructs an http.Request for the LoginUser method, with any body, and a specified content type
func NewLogoutUserRequest ¶
NewLogoutUserRequest constructs an http.Request for the LogoutUser method
func NewRefreshTokenRequest ¶
func NewRefreshTokenRequest(server string, body RefreshTokenJSONRequestBody) (*http.Request, error)
NewRefreshTokenRequest calls the generic RefreshToken builder with application/json body
func NewRefreshTokenRequestWithBody ¶
func NewRefreshTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRefreshTokenRequestWithBody constructs an http.Request for the RefreshToken method, with any body, and a specified content type
func NewRegisterUserRequest ¶
func NewRegisterUserRequest(server string, body RegisterUserJSONRequestBody) (*http.Request, error)
NewRegisterUserRequest calls the generic RegisterUser builder with application/json body
func NewRegisterUserRequestWithBody ¶
func NewRegisterUserRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRegisterUserRequestWithBody constructs an http.Request for the RegisterUser method, with any body, and a specified content type
func NewShowPetByIdRequest ¶
NewShowPetByIdRequest constructs an http.Request for the ShowPetById method
func NewUpdateUserRequest ¶
func NewUpdateUserRequest(server string, userId ID, body UpdateUserJSONRequestBody) (*http.Request, error)
NewUpdateUserRequest calls the generic UpdateUser builder with application/json body
Types ¶
type BadRequest ¶
type BadRequest = Error
BadRequest Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type Claims ¶
type Claims struct {
// AdditionalData Any extra claim data
AdditionalData *map[string]interface{} `json:"additionalData,omitempty"`
// Roles Examples: ["admin","user"]
Roles *[]Role `json:"roles,omitempty"`
}
Claims Additional claims for extended user profile or permissions
Examples: {"additionalData":{"department":"IT"},"roles":["admin","user"]}
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreatePet ¶
func (c *Client) CreatePet(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePet Create a pet
Create a new pet in the server’s database.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/pets (the `CreatePet` operationId).
func (*Client) CreatePetWithBody ¶
func (c *Client) CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePetWithBody Create a pet
Create a new pet in the server’s database.
Takes any type of body and a specified content type.
Corresponds with POST /v1/pets (the `CreatePet` operationId).
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUser Create a user
Register a new user at an admin level. Typically requires elevated permissions.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/users (the `CreateUser` operationId).
func (*Client) CreateUserWithBody ¶
func (c *Client) CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUserWithBody Create a user
Register a new user at an admin level. Typically requires elevated permissions.
Takes any type of body and a specified content type.
Corresponds with POST /v1/users (the `CreateUser` operationId).
func (*Client) DeleteUser ¶
func (c *Client) DeleteUser(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteUser Delete a user
Remove the user record (soft or hard delete).
SECURITY (SEC-0027 / BOLA, CWE-639): object-scoped route keyed on userId. The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId}. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) — or any authenticated user can delete any other user.
Corresponds with DELETE /v1/users/{userId} (the `DeleteUser` operationId).
func (*Client) Echo ¶
func (c *Client) Echo(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
Echo Echo
Echo the provided message.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/echo (the `Echo` operationId).
func (*Client) EchoWithBody ¶
func (c *Client) EchoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
EchoWithBody Echo
Echo the provided message.
Takes any type of body and a specified content type.
Corresponds with POST /v1/echo (the `Echo` operationId).
func (*Client) GetCurrentUser ¶
func (c *Client) GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetCurrentUser Get current user info
Retrieve the user profile data (including roles/claims) from the current session/token.
Corresponds with GET /v1/auth/me (the `GetCurrentUser` operationId).
func (*Client) GetUserById ¶
func (c *Client) GetUserById(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
GetUserById Get a specific user
Retrieve data for a user by their ID.
SECURITY (SEC-0027 / BOLA, CWE-639): this is an object-scoped route keyed on userId. The generated wrapper performs authentication only (BearerAuth presence); it does NOT verify that the caller owns {userId}. The ServerInterface implementation MUST enforce object-level ownership — e.g. gate the route with securex.RequireOwnership (JWT sub == userId) — or an IDOR / horizontal privilege escalation results.
Corresponds with GET /v1/users/{userId} (the `GetUserById` operationId).
func (*Client) ListPets ¶
func (c *Client) ListPets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListPets List all pets
Retrieve a list (paged) of pets from the server.
Corresponds with GET /v1/pets (the `ListPets` operationId).
func (*Client) ListUsers ¶
func (c *Client) ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListUsers List all users
Retrieve a list (paged) of registered users.
Corresponds with GET /v1/users (the `ListUsers` operationId).
func (*Client) LoginUser ¶
func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
LoginUser User login
Log in with username/password to obtain an access token (JWT or OAuth2).
Takes a body of the `application/json` content type.
Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
func (*Client) LoginUserWithBody ¶
func (c *Client) LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
LoginUserWithBody User login
Log in with username/password to obtain an access token (JWT or OAuth2).
Takes any type of body and a specified content type.
Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
func (*Client) LogoutUser ¶
func (c *Client) LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
LogoutUser Logout user
Invalidate the current token or session.
Corresponds with POST /v1/auth/logout (the `LogoutUser` operationId).
func (*Client) RefreshToken ¶
func (c *Client) RefreshToken(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RefreshToken Refresh user token
Obtain a new token using a valid refresh token.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
func (*Client) RefreshTokenWithBody ¶
func (c *Client) RefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RefreshTokenWithBody Refresh user token
Obtain a new token using a valid refresh token.
Takes any type of body and a specified content type.
Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
func (*Client) RegisterUser ¶
func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RegisterUser User registration
Register a new user with username/password.
Takes a body of the `application/json` content type.
Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
func (*Client) RegisterUserWithBody ¶
func (c *Client) RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RegisterUserWithBody User registration
Register a new user with username/password.
Takes any type of body and a specified content type.
Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
func (*Client) ShowPetById ¶
func (c *Client) ShowPetById(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
ShowPetById Show a specific pet
Retrieve data for the specified pet by its unique ID.
Corresponds with GET /v1/pets/{petId} (the `ShowPetById` operationId).
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateUser Update a specific user
Perform a partial update (e.g., roles, password) for an existing user.
SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed on userId that also exposes roles/password (vertical privilege-escalation surface). The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId} nor that role changes are authorized. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change authorization check, or IDOR / privilege escalation results.
Takes a body of the `application/json` content type.
Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
func (*Client) UpdateUserWithBody ¶
func (c *Client) UpdateUserWithBody(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateUserWithBody Update a specific user
Perform a partial update (e.g., roles, password) for an existing user.
SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed on userId that also exposes roles/password (vertical privilege-escalation surface). The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId} nor that role changes are authorized. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change authorization check, or IDOR / privilege escalation results.
Takes any type of body and a specified content type.
Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
type ClientInterface ¶
type ClientInterface interface {
// LoginUserWithBody User login
//
// Log in with username/password to obtain an access token (JWT or OAuth2).
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// LoginUser User login
//
// Log in with username/password to obtain an access token (JWT or OAuth2).
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// LogoutUser Logout user
//
// Invalidate the current token or session.
//
// Corresponds with POST /v1/auth/logout (the `LogoutUser` operationId).
LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCurrentUser Get current user info
//
// Retrieve the user profile data (including roles/claims) from the current session/token.
//
// Corresponds with GET /v1/auth/me (the `GetCurrentUser` operationId).
GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RefreshTokenWithBody Refresh user token
//
// Obtain a new token using a valid refresh token.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
RefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RefreshToken Refresh user token
//
// Obtain a new token using a valid refresh token.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
RefreshToken(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegisterUserWithBody User registration
//
// Register a new user with username/password.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegisterUser User registration
//
// Register a new user with username/password.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// EchoWithBody Echo
//
// Echo the provided message.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/echo (the `Echo` operationId).
EchoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// Echo Echo
//
// Echo the provided message.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/echo (the `Echo` operationId).
Echo(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPets List all pets
//
// Retrieve a list (paged) of pets from the server.
//
// Corresponds with GET /v1/pets (the `ListPets` operationId).
ListPets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePetWithBody Create a pet
//
// Create a new pet in the server’s database.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/pets (the `CreatePet` operationId).
CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePet Create a pet
//
// Create a new pet in the server’s database.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/pets (the `CreatePet` operationId).
CreatePet(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ShowPetById Show a specific pet
//
// Retrieve data for the specified pet by its unique ID.
//
// Corresponds with GET /v1/pets/{petId} (the `ShowPetById` operationId).
ShowPetById(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUsers List all users
//
// Retrieve a list (paged) of registered users.
//
// Corresponds with GET /v1/users (the `ListUsers` operationId).
ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUserWithBody Create a user
//
// Register a new user at an admin level. Typically requires elevated permissions.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /v1/users (the `CreateUser` operationId).
CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUser Create a user
//
// Register a new user at an admin level. Typically requires elevated permissions.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /v1/users (the `CreateUser` operationId).
CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteUser Delete a user
//
// Remove the user record (soft or hard delete).
//
// SECURITY (SEC-0027 / BOLA, CWE-639): object-scoped route keyed on userId.
// The generated wrapper authenticates only (BearerAuth presence); it does
// NOT verify the caller owns {userId}. The ServerInterface implementation
// MUST enforce object-level ownership (securex.RequireOwnership, JWT
// sub == userId) — or any authenticated user can delete any other user.
//
// Corresponds with DELETE /v1/users/{userId} (the `DeleteUser` operationId).
DeleteUser(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUserById Get a specific user
//
// Retrieve data for a user by their ID.
//
// SECURITY (SEC-0027 / BOLA, CWE-639): this is an object-scoped route keyed
// on userId. The generated wrapper performs authentication only (BearerAuth
// presence); it does NOT verify that the caller owns {userId}. The
// ServerInterface implementation MUST enforce object-level ownership — e.g.
// gate the route with securex.RequireOwnership (JWT sub == userId) — or an
// IDOR / horizontal privilege escalation results.
//
// Corresponds with GET /v1/users/{userId} (the `GetUserById` operationId).
GetUserById(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateUserWithBody Update a specific user
//
// Perform a partial update (e.g., roles, password) for an existing user.
//
// SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed
// on userId that also exposes roles/password (vertical privilege-escalation
// surface). The generated wrapper authenticates only (BearerAuth presence);
// it does NOT verify the caller owns {userId} nor that role changes are
// authorized. The ServerInterface implementation MUST enforce object-level
// ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change
// authorization check, or IDOR / privilege escalation results.
//
// Takes any type of body and a specified content type.
//
// Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
UpdateUserWithBody(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateUser Update a specific user
//
// Perform a partial update (e.g., roles, password) for an existing user.
//
// SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed
// on userId that also exposes roles/password (vertical privilege-escalation
// surface). The generated wrapper authenticates only (BearerAuth presence);
// it does NOT verify the caller owns {userId} nor that role changes are
// authorized. The ServerInterface implementation MUST enforce object-level
// ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change
// authorization check, or IDOR / privilege escalation results.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
UpdateUser(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreatePetWithBodyWithResponse ¶
func (c *ClientWithResponses) CreatePetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
CreatePetWithBodyWithResponse Create a pet
Create a new pet in the server’s database.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/pets (the `CreatePet` operationId).
func (*ClientWithResponses) CreatePetWithResponse ¶
func (c *ClientWithResponses) CreatePetWithResponse(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
CreatePetWithResponse Create a pet
Create a new pet in the server’s database.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/pets (the `CreatePet` operationId).
func (*ClientWithResponses) CreateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithBodyWithResponse Create a user
Register a new user at an admin level. Typically requires elevated permissions.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/users (the `CreateUser` operationId).
func (*ClientWithResponses) CreateUserWithResponse ¶
func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithResponse Create a user
Register a new user at an admin level. Typically requires elevated permissions.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/users (the `CreateUser` operationId).
func (*ClientWithResponses) DeleteUserWithResponse ¶
func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
DeleteUserWithResponse Delete a user
Remove the user record (soft or hard delete).
SECURITY (SEC-0027 / BOLA, CWE-639): object-scoped route keyed on userId. The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId}. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) — or any authenticated user can delete any other user.
Returns a wrapper object for the known response body format(s).
Corresponds with DELETE /v1/users/{userId} (the `DeleteUser` operationId).
func (*ClientWithResponses) EchoWithBodyWithResponse ¶
func (c *ClientWithResponses) EchoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EchoResponse, error)
EchoWithBodyWithResponse Echo
Echo the provided message.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/echo (the `Echo` operationId).
func (*ClientWithResponses) EchoWithResponse ¶
func (c *ClientWithResponses) EchoWithResponse(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*EchoResponse, error)
EchoWithResponse Echo
Echo the provided message.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/echo (the `Echo` operationId).
func (*ClientWithResponses) GetCurrentUserWithResponse ¶
func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
GetCurrentUserWithResponse Get current user info
Retrieve the user profile data (including roles/claims) from the current session/token.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/auth/me (the `GetCurrentUser` operationId).
func (*ClientWithResponses) GetUserByIdWithResponse ¶
func (c *ClientWithResponses) GetUserByIdWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*GetUserByIdResponse, error)
GetUserByIdWithResponse Get a specific user
Retrieve data for a user by their ID.
SECURITY (SEC-0027 / BOLA, CWE-639): this is an object-scoped route keyed on userId. The generated wrapper performs authentication only (BearerAuth presence); it does NOT verify that the caller owns {userId}. The ServerInterface implementation MUST enforce object-level ownership — e.g. gate the route with securex.RequireOwnership (JWT sub == userId) — or an IDOR / horizontal privilege escalation results.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/users/{userId} (the `GetUserById` operationId).
func (*ClientWithResponses) ListPetsWithResponse ¶
func (c *ClientWithResponses) ListPetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPetsResponse, error)
ListPetsWithResponse List all pets
Retrieve a list (paged) of pets from the server.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/pets (the `ListPets` operationId).
func (*ClientWithResponses) ListUsersWithResponse ¶
func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
ListUsersWithResponse List all users
Retrieve a list (paged) of registered users.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/users (the `ListUsers` operationId).
func (*ClientWithResponses) LoginUserWithBodyWithResponse ¶
func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
LoginUserWithBodyWithResponse User login
Log in with username/password to obtain an access token (JWT or OAuth2).
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
func (*ClientWithResponses) LoginUserWithResponse ¶
func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
LoginUserWithResponse User login
Log in with username/password to obtain an access token (JWT or OAuth2).
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
func (*ClientWithResponses) LogoutUserWithResponse ¶
func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error)
LogoutUserWithResponse Logout user
Invalidate the current token or session.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/logout (the `LogoutUser` operationId).
func (*ClientWithResponses) RefreshTokenWithBodyWithResponse ¶
func (c *ClientWithResponses) RefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
RefreshTokenWithBodyWithResponse Refresh user token
Obtain a new token using a valid refresh token.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
func (*ClientWithResponses) RefreshTokenWithResponse ¶
func (c *ClientWithResponses) RefreshTokenWithResponse(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
RefreshTokenWithResponse Refresh user token
Obtain a new token using a valid refresh token.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
func (*ClientWithResponses) RegisterUserWithBodyWithResponse ¶
func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
RegisterUserWithBodyWithResponse User registration
Register a new user with username/password.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
func (*ClientWithResponses) RegisterUserWithResponse ¶
func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
RegisterUserWithResponse User registration
Register a new user with username/password.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
func (*ClientWithResponses) ShowPetByIdWithResponse ¶
func (c *ClientWithResponses) ShowPetByIdWithResponse(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*ShowPetByIdResponse, error)
ShowPetByIdWithResponse Show a specific pet
Retrieve data for the specified pet by its unique ID.
Returns a wrapper object for the known response body format(s).
Corresponds with GET /v1/pets/{petId} (the `ShowPetById` operationId).
func (*ClientWithResponses) UpdateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
UpdateUserWithBodyWithResponse Update a specific user
Perform a partial update (e.g., roles, password) for an existing user.
SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed on userId that also exposes roles/password (vertical privilege-escalation surface). The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId} nor that role changes are authorized. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change authorization check, or IDOR / privilege escalation results.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
func (*ClientWithResponses) UpdateUserWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
UpdateUserWithResponse Update a specific user
Perform a partial update (e.g., roles, password) for an existing user.
SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed on userId that also exposes roles/password (vertical privilege-escalation surface). The generated wrapper authenticates only (BearerAuth presence); it does NOT verify the caller owns {userId} nor that role changes are authorized. The ServerInterface implementation MUST enforce object-level ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change authorization check, or IDOR / privilege escalation results.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// LoginUserWithBodyWithResponse User login
//
// Log in with username/password to obtain an access token (JWT or OAuth2).
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
// LoginUserWithResponse User login
//
// Log in with username/password to obtain an access token (JWT or OAuth2).
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/login (the `LoginUser` operationId).
LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
// LogoutUserWithResponse Logout user
//
// Invalidate the current token or session.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/logout (the `LogoutUser` operationId).
LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error)
// GetCurrentUserWithResponse Get current user info
//
// Retrieve the user profile data (including roles/claims) from the current session/token.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/auth/me (the `GetCurrentUser` operationId).
GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
// RefreshTokenWithBodyWithResponse Refresh user token
//
// Obtain a new token using a valid refresh token.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
RefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
// RefreshTokenWithResponse Refresh user token
//
// Obtain a new token using a valid refresh token.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/refresh (the `RefreshToken` operationId).
RefreshTokenWithResponse(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
// RegisterUserWithBodyWithResponse User registration
//
// Register a new user with username/password.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
// RegisterUserWithResponse User registration
//
// Register a new user with username/password.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/auth/register (the `RegisterUser` operationId).
RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
// EchoWithBodyWithResponse Echo
//
// Echo the provided message.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/echo (the `Echo` operationId).
EchoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EchoResponse, error)
// EchoWithResponse Echo
//
// Echo the provided message.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/echo (the `Echo` operationId).
EchoWithResponse(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*EchoResponse, error)
// ListPetsWithResponse List all pets
//
// Retrieve a list (paged) of pets from the server.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/pets (the `ListPets` operationId).
ListPetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPetsResponse, error)
// CreatePetWithBodyWithResponse Create a pet
//
// Create a new pet in the server’s database.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/pets (the `CreatePet` operationId).
CreatePetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
// CreatePetWithResponse Create a pet
//
// Create a new pet in the server’s database.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/pets (the `CreatePet` operationId).
CreatePetWithResponse(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
// ShowPetByIdWithResponse Show a specific pet
//
// Retrieve data for the specified pet by its unique ID.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/pets/{petId} (the `ShowPetById` operationId).
ShowPetByIdWithResponse(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*ShowPetByIdResponse, error)
// ListUsersWithResponse List all users
//
// Retrieve a list (paged) of registered users.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/users (the `ListUsers` operationId).
ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
// CreateUserWithBodyWithResponse Create a user
//
// Register a new user at an admin level. Typically requires elevated permissions.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/users (the `CreateUser` operationId).
CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
// CreateUserWithResponse Create a user
//
// Register a new user at an admin level. Typically requires elevated permissions.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /v1/users (the `CreateUser` operationId).
CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
// DeleteUserWithResponse Delete a user
//
// Remove the user record (soft or hard delete).
//
// SECURITY (SEC-0027 / BOLA, CWE-639): object-scoped route keyed on userId.
// The generated wrapper authenticates only (BearerAuth presence); it does
// NOT verify the caller owns {userId}. The ServerInterface implementation
// MUST enforce object-level ownership (securex.RequireOwnership, JWT
// sub == userId) — or any authenticated user can delete any other user.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with DELETE /v1/users/{userId} (the `DeleteUser` operationId).
DeleteUserWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
// GetUserByIdWithResponse Get a specific user
//
// Retrieve data for a user by their ID.
//
// SECURITY (SEC-0027 / BOLA, CWE-639): this is an object-scoped route keyed
// on userId. The generated wrapper performs authentication only (BearerAuth
// presence); it does NOT verify that the caller owns {userId}. The
// ServerInterface implementation MUST enforce object-level ownership — e.g.
// gate the route with securex.RequireOwnership (JWT sub == userId) — or an
// IDOR / horizontal privilege escalation results.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /v1/users/{userId} (the `GetUserById` operationId).
GetUserByIdWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*GetUserByIdResponse, error)
// UpdateUserWithBodyWithResponse Update a specific user
//
// Perform a partial update (e.g., roles, password) for an existing user.
//
// SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed
// on userId that also exposes roles/password (vertical privilege-escalation
// surface). The generated wrapper authenticates only (BearerAuth presence);
// it does NOT verify the caller owns {userId} nor that role changes are
// authorized. The ServerInterface implementation MUST enforce object-level
// ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change
// authorization check, or IDOR / privilege escalation results.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
UpdateUserWithBodyWithResponse(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
// UpdateUserWithResponse Update a specific user
//
// Perform a partial update (e.g., roles, password) for an existing user.
//
// SECURITY (SEC-0027 / BOLA, CWE-639 + CWE-862): object-scoped route keyed
// on userId that also exposes roles/password (vertical privilege-escalation
// surface). The generated wrapper authenticates only (BearerAuth presence);
// it does NOT verify the caller owns {userId} nor that role changes are
// authorized. The ServerInterface implementation MUST enforce object-level
// ownership (securex.RequireOwnership, JWT sub == userId) AND a role-change
// authorization check, or IDOR / privilege escalation results.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with PATCH /v1/users/{userId} (the `UpdateUser` operationId).
UpdateUserWithResponse(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Conflict ¶
type Conflict = Error
Conflict Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type CreatePetJSONRequestBody ¶
type CreatePetJSONRequestBody = Pet
CreatePetJSONRequestBody defines body for CreatePet for application/json ContentType.
type CreatePetResponse ¶
type CreatePetResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Pet
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers201 the parsed response headers for an HTTP 201 response
Headers201 *CreatePetResponse201Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *CreatePetResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *CreatePetResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *CreatePetResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *CreatePetResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *CreatePetResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *CreatePetResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *CreatePetResponseDefaultHeaders
}
func ParseCreatePetResponse ¶
func ParseCreatePetResponse(rsp *http.Response) (*CreatePetResponse, error)
ParseCreatePetResponse parses an HTTP response from a CreatePetWithResponse call
func (CreatePetResponse) ContentType ¶ added in v0.18.3
func (r CreatePetResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreatePetResponse) GetBody ¶ added in v0.18.3
func (r CreatePetResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreatePetResponse) GetJSON201 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON201() *Pet
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreatePetResponse) GetJSON400 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreatePetResponse) GetJSON401 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CreatePetResponse) GetJSON403 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreatePetResponse) GetJSON404 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (CreatePetResponse) GetJSON429 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (CreatePetResponse) GetJSON500 ¶ added in v0.18.3
func (r CreatePetResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (CreatePetResponse) GetJSONDefault ¶ added in v0.18.3
func (r CreatePetResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreatePetResponse) Status ¶
func (r CreatePetResponse) Status() string
Status returns HTTPResponse.Status
func (CreatePetResponse) StatusCode ¶
func (r CreatePetResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreatePetResponse201Headers ¶ added in v0.18.3
type CreatePetResponse201Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse201Headers the declared response headers of an HTTP 201 response for CreatePet
type CreatePetResponse400Headers ¶ added in v0.18.3
type CreatePetResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse400Headers the declared response headers of an HTTP 400 response for CreatePet
type CreatePetResponse401Headers ¶ added in v0.18.3
type CreatePetResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse401Headers the declared response headers of an HTTP 401 response for CreatePet
type CreatePetResponse403Headers ¶ added in v0.18.3
type CreatePetResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse403Headers the declared response headers of an HTTP 403 response for CreatePet
type CreatePetResponse404Headers ¶ added in v0.18.3
type CreatePetResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse404Headers the declared response headers of an HTTP 404 response for CreatePet
type CreatePetResponse429Headers ¶ added in v0.18.3
type CreatePetResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse429Headers the declared response headers of an HTTP 429 response for CreatePet
type CreatePetResponse500Headers ¶ added in v0.18.3
type CreatePetResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponse500Headers the declared response headers of an HTTP 500 response for CreatePet
type CreatePetResponseDefaultHeaders ¶ added in v0.18.3
type CreatePetResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreatePetResponseDefaultHeaders the declared response headers of an HTTP default response for CreatePet
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = Registration
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserResponse ¶
type CreateUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *Conflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers201 the parsed response headers for an HTTP 201 response
Headers201 *CreateUserResponse201Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *CreateUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *CreateUserResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *CreateUserResponse403Headers
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *CreateUserResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *CreateUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *CreateUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *CreateUserResponseDefaultHeaders
}
func ParseCreateUserResponse ¶
func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)
ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call
func (CreateUserResponse) ContentType ¶ added in v0.18.3
func (r CreateUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateUserResponse) GetBody ¶ added in v0.18.3
func (r CreateUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateUserResponse) GetJSON201 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON201() *User
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (CreateUserResponse) GetJSON400 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateUserResponse) GetJSON401 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CreateUserResponse) GetJSON403 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateUserResponse) GetJSON409 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON409() *Conflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateUserResponse) GetJSON429 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (CreateUserResponse) GetJSON500 ¶ added in v0.18.3
func (r CreateUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (CreateUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r CreateUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (CreateUserResponse) Status ¶
func (r CreateUserResponse) Status() string
Status returns HTTPResponse.Status
func (CreateUserResponse) StatusCode ¶
func (r CreateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateUserResponse201Headers ¶ added in v0.18.3
type CreateUserResponse201Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse201Headers the declared response headers of an HTTP 201 response for CreateUser
type CreateUserResponse400Headers ¶ added in v0.18.3
type CreateUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse400Headers the declared response headers of an HTTP 400 response for CreateUser
type CreateUserResponse401Headers ¶ added in v0.18.3
type CreateUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse401Headers the declared response headers of an HTTP 401 response for CreateUser
type CreateUserResponse403Headers ¶ added in v0.18.3
type CreateUserResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse403Headers the declared response headers of an HTTP 403 response for CreateUser
type CreateUserResponse409Headers ¶ added in v0.18.3
type CreateUserResponse409Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse409Headers the declared response headers of an HTTP 409 response for CreateUser
type CreateUserResponse429Headers ¶ added in v0.18.3
type CreateUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse429Headers the declared response headers of an HTTP 429 response for CreateUser
type CreateUserResponse500Headers ¶ added in v0.18.3
type CreateUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponse500Headers the declared response headers of an HTTP 500 response for CreateUser
type CreateUserResponseDefaultHeaders ¶ added in v0.18.3
type CreateUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
CreateUserResponseDefaultHeaders the declared response headers of an HTTP default response for CreateUser
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers204 the parsed response headers for an HTTP 204 response
Headers204 *DeleteUserResponse204Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *DeleteUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *DeleteUserResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *DeleteUserResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *DeleteUserResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *DeleteUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *DeleteUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *DeleteUserResponseDefaultHeaders
}
func ParseDeleteUserResponse ¶
func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)
ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call
func (DeleteUserResponse) ContentType ¶ added in v0.18.3
func (r DeleteUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (DeleteUserResponse) GetBody ¶ added in v0.18.3
func (r DeleteUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (DeleteUserResponse) GetJSON400 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (DeleteUserResponse) GetJSON401 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (DeleteUserResponse) GetJSON403 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (DeleteUserResponse) GetJSON404 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (DeleteUserResponse) GetJSON429 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (DeleteUserResponse) GetJSON500 ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (DeleteUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r DeleteUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (DeleteUserResponse) Status ¶
func (r DeleteUserResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteUserResponse) StatusCode ¶
func (r DeleteUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteUserResponse204Headers ¶ added in v0.18.3
type DeleteUserResponse204Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse204Headers the declared response headers of an HTTP 204 response for DeleteUser
type DeleteUserResponse400Headers ¶ added in v0.18.3
type DeleteUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse400Headers the declared response headers of an HTTP 400 response for DeleteUser
type DeleteUserResponse401Headers ¶ added in v0.18.3
type DeleteUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse401Headers the declared response headers of an HTTP 401 response for DeleteUser
type DeleteUserResponse403Headers ¶ added in v0.18.3
type DeleteUserResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse403Headers the declared response headers of an HTTP 403 response for DeleteUser
type DeleteUserResponse404Headers ¶ added in v0.18.3
type DeleteUserResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse404Headers the declared response headers of an HTTP 404 response for DeleteUser
type DeleteUserResponse429Headers ¶ added in v0.18.3
type DeleteUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse429Headers the declared response headers of an HTTP 429 response for DeleteUser
type DeleteUserResponse500Headers ¶ added in v0.18.3
type DeleteUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponse500Headers the declared response headers of an HTTP 500 response for DeleteUser
type DeleteUserResponseDefaultHeaders ¶ added in v0.18.3
type DeleteUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
DeleteUserResponseDefaultHeaders the declared response headers of an HTTP default response for DeleteUser
type EchoJSONRequestBody ¶
type EchoJSONRequestBody = EchoReq
EchoJSONRequestBody defines body for Echo for application/json ContentType.
type EchoMsg ¶
type EchoMsg struct {
// Msg Examples: hello
Msg string `json:"msg"`
}
EchoMsg WebSocket echo message payload
type EchoReq ¶
type EchoReq struct {
// Msg Examples: hello
Msg string `json:"msg"`
}
EchoReq Schema for the echo endpoint request body
type EchoResp ¶
type EchoResp struct {
// Msg Examples: hello
Msg string `json:"msg"`
}
EchoResp Echo response payload
type EchoResponse ¶
type EchoResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *EchoResp
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *EchoResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *EchoResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *EchoResponse401Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *EchoResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *EchoResponse500Headers
}
func ParseEchoResponse ¶
func ParseEchoResponse(rsp *http.Response) (*EchoResponse, error)
ParseEchoResponse parses an HTTP response from a EchoWithResponse call
func (EchoResponse) ContentType ¶ added in v0.18.3
func (r EchoResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (EchoResponse) GetBody ¶ added in v0.18.3
func (r EchoResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (EchoResponse) GetJSON200 ¶ added in v0.18.3
func (r EchoResponse) GetJSON200() *EchoResp
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (EchoResponse) GetJSON400 ¶ added in v0.18.3
func (r EchoResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (EchoResponse) GetJSON401 ¶ added in v0.18.3
func (r EchoResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (EchoResponse) GetJSON429 ¶ added in v0.18.3
func (r EchoResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (EchoResponse) GetJSON500 ¶ added in v0.18.3
func (r EchoResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (EchoResponse) Status ¶
func (r EchoResponse) Status() string
Status returns HTTPResponse.Status
func (EchoResponse) StatusCode ¶
func (r EchoResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type EchoResponse200Headers ¶ added in v0.18.3
type EchoResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
EchoResponse200Headers the declared response headers of an HTTP 200 response for Echo
type EchoResponse400Headers ¶ added in v0.18.3
type EchoResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
EchoResponse400Headers the declared response headers of an HTTP 400 response for Echo
type EchoResponse401Headers ¶ added in v0.18.3
type EchoResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
EchoResponse401Headers the declared response headers of an HTTP 401 response for Echo
type EchoResponse429Headers ¶ added in v0.18.3
type EchoResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
EchoResponse429Headers the declared response headers of an HTTP 429 response for Echo
type EchoResponse500Headers ¶ added in v0.18.3
type EchoResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
EchoResponse500Headers the declared response headers of an HTTP 500 response for Echo
type Error ¶
type Error struct {
// Error Error code
//
// Examples: ERR_INVALID_REQUEST
Error string `json:"error"`
// Id id for the Record
//
// Examples: 123e4567-e89b-12d3-a456-426614174000
Id *ID `json:"id,omitempty"`
// Message Error message
//
// Examples: Something went wrong.
Message string `json:"message"`
}
Error Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type Forbidden ¶
type Forbidden = Error
Forbidden Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type GetCurrentUserResponse ¶
type GetCurrentUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *GetCurrentUserResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *GetCurrentUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *GetCurrentUserResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *GetCurrentUserResponse403Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *GetCurrentUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *GetCurrentUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetCurrentUserResponseDefaultHeaders
}
func ParseGetCurrentUserResponse ¶
func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error)
ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call
func (GetCurrentUserResponse) ContentType ¶ added in v0.18.3
func (r GetCurrentUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetCurrentUserResponse) GetBody ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetCurrentUserResponse) GetJSON200 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON200() *User
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetCurrentUserResponse) GetJSON400 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetCurrentUserResponse) GetJSON401 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetCurrentUserResponse) GetJSON403 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetCurrentUserResponse) GetJSON429 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (GetCurrentUserResponse) GetJSON500 ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (GetCurrentUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r GetCurrentUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetCurrentUserResponse) Status ¶
func (r GetCurrentUserResponse) Status() string
Status returns HTTPResponse.Status
func (GetCurrentUserResponse) StatusCode ¶
func (r GetCurrentUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCurrentUserResponse200Headers ¶ added in v0.18.3
type GetCurrentUserResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse200Headers the declared response headers of an HTTP 200 response for GetCurrentUser
type GetCurrentUserResponse400Headers ¶ added in v0.18.3
type GetCurrentUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse400Headers the declared response headers of an HTTP 400 response for GetCurrentUser
type GetCurrentUserResponse401Headers ¶ added in v0.18.3
type GetCurrentUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse401Headers the declared response headers of an HTTP 401 response for GetCurrentUser
type GetCurrentUserResponse403Headers ¶ added in v0.18.3
type GetCurrentUserResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse403Headers the declared response headers of an HTTP 403 response for GetCurrentUser
type GetCurrentUserResponse429Headers ¶ added in v0.18.3
type GetCurrentUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse429Headers the declared response headers of an HTTP 429 response for GetCurrentUser
type GetCurrentUserResponse500Headers ¶ added in v0.18.3
type GetCurrentUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponse500Headers the declared response headers of an HTTP 500 response for GetCurrentUser
type GetCurrentUserResponseDefaultHeaders ¶ added in v0.18.3
type GetCurrentUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetCurrentUserResponseDefaultHeaders the declared response headers of an HTTP default response for GetCurrentUser
type GetUserByIdResponse ¶
type GetUserByIdResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *GetUserByIdResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *GetUserByIdResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *GetUserByIdResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *GetUserByIdResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *GetUserByIdResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *GetUserByIdResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *GetUserByIdResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *GetUserByIdResponseDefaultHeaders
}
func ParseGetUserByIdResponse ¶
func ParseGetUserByIdResponse(rsp *http.Response) (*GetUserByIdResponse, error)
ParseGetUserByIdResponse parses an HTTP response from a GetUserByIdWithResponse call
func (GetUserByIdResponse) ContentType ¶ added in v0.18.3
func (r GetUserByIdResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetUserByIdResponse) GetBody ¶ added in v0.18.3
func (r GetUserByIdResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetUserByIdResponse) GetJSON200 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON200() *User
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetUserByIdResponse) GetJSON400 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetUserByIdResponse) GetJSON401 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetUserByIdResponse) GetJSON403 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetUserByIdResponse) GetJSON404 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetUserByIdResponse) GetJSON429 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (GetUserByIdResponse) GetJSON500 ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (GetUserByIdResponse) GetJSONDefault ¶ added in v0.18.3
func (r GetUserByIdResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (GetUserByIdResponse) Status ¶
func (r GetUserByIdResponse) Status() string
Status returns HTTPResponse.Status
func (GetUserByIdResponse) StatusCode ¶
func (r GetUserByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUserByIdResponse200Headers ¶ added in v0.18.3
type GetUserByIdResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse200Headers the declared response headers of an HTTP 200 response for GetUserById
type GetUserByIdResponse400Headers ¶ added in v0.18.3
type GetUserByIdResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse400Headers the declared response headers of an HTTP 400 response for GetUserById
type GetUserByIdResponse401Headers ¶ added in v0.18.3
type GetUserByIdResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse401Headers the declared response headers of an HTTP 401 response for GetUserById
type GetUserByIdResponse403Headers ¶ added in v0.18.3
type GetUserByIdResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse403Headers the declared response headers of an HTTP 403 response for GetUserById
type GetUserByIdResponse404Headers ¶ added in v0.18.3
type GetUserByIdResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse404Headers the declared response headers of an HTTP 404 response for GetUserById
type GetUserByIdResponse429Headers ¶ added in v0.18.3
type GetUserByIdResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse429Headers the declared response headers of an HTTP 429 response for GetUserById
type GetUserByIdResponse500Headers ¶ added in v0.18.3
type GetUserByIdResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponse500Headers the declared response headers of an HTTP 500 response for GetUserById
type GetUserByIdResponseDefaultHeaders ¶ added in v0.18.3
type GetUserByIdResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
GetUserByIdResponseDefaultHeaders the declared response headers of an HTTP default response for GetUserById
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError = Error
InternalServerError Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListPetsResponse ¶
type ListPetsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]Pet
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *ListPetsResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *ListPetsResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *ListPetsResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *ListPetsResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *ListPetsResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *ListPetsResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *ListPetsResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ListPetsResponseDefaultHeaders
}
func ParseListPetsResponse ¶
func ParseListPetsResponse(rsp *http.Response) (*ListPetsResponse, error)
ParseListPetsResponse parses an HTTP response from a ListPetsWithResponse call
func (ListPetsResponse) ContentType ¶ added in v0.18.3
func (r ListPetsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListPetsResponse) GetBody ¶ added in v0.18.3
func (r ListPetsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListPetsResponse) GetJSON200 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON200() *[]Pet
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListPetsResponse) GetJSON400 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListPetsResponse) GetJSON401 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListPetsResponse) GetJSON403 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListPetsResponse) GetJSON404 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ListPetsResponse) GetJSON429 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (ListPetsResponse) GetJSON500 ¶ added in v0.18.3
func (r ListPetsResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (ListPetsResponse) GetJSONDefault ¶ added in v0.18.3
func (r ListPetsResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListPetsResponse) Status ¶
func (r ListPetsResponse) Status() string
Status returns HTTPResponse.Status
func (ListPetsResponse) StatusCode ¶
func (r ListPetsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListPetsResponse200Headers ¶ added in v0.18.3
type ListPetsResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse200Headers the declared response headers of an HTTP 200 response for ListPets
type ListPetsResponse400Headers ¶ added in v0.18.3
type ListPetsResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse400Headers the declared response headers of an HTTP 400 response for ListPets
type ListPetsResponse401Headers ¶ added in v0.18.3
type ListPetsResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse401Headers the declared response headers of an HTTP 401 response for ListPets
type ListPetsResponse403Headers ¶ added in v0.18.3
type ListPetsResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse403Headers the declared response headers of an HTTP 403 response for ListPets
type ListPetsResponse404Headers ¶ added in v0.18.3
type ListPetsResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse404Headers the declared response headers of an HTTP 404 response for ListPets
type ListPetsResponse429Headers ¶ added in v0.18.3
type ListPetsResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse429Headers the declared response headers of an HTTP 429 response for ListPets
type ListPetsResponse500Headers ¶ added in v0.18.3
type ListPetsResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponse500Headers the declared response headers of an HTTP 500 response for ListPets
type ListPetsResponseDefaultHeaders ¶ added in v0.18.3
type ListPetsResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListPetsResponseDefaultHeaders the declared response headers of an HTTP default response for ListPets
type ListUsersResponse ¶
type ListUsersResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *ListUsersResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *ListUsersResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *ListUsersResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *ListUsersResponse403Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *ListUsersResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *ListUsersResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ListUsersResponseDefaultHeaders
}
func ParseListUsersResponse ¶
func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error)
ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call
func (ListUsersResponse) ContentType ¶ added in v0.18.3
func (r ListUsersResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListUsersResponse) GetBody ¶ added in v0.18.3
func (r ListUsersResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListUsersResponse) GetJSON200 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON200() *[]User
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListUsersResponse) GetJSON400 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListUsersResponse) GetJSON401 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListUsersResponse) GetJSON403 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListUsersResponse) GetJSON429 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (ListUsersResponse) GetJSON500 ¶ added in v0.18.3
func (r ListUsersResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (ListUsersResponse) GetJSONDefault ¶ added in v0.18.3
func (r ListUsersResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ListUsersResponse) Status ¶
func (r ListUsersResponse) Status() string
Status returns HTTPResponse.Status
func (ListUsersResponse) StatusCode ¶
func (r ListUsersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUsersResponse200Headers ¶ added in v0.18.3
type ListUsersResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse200Headers the declared response headers of an HTTP 200 response for ListUsers
type ListUsersResponse400Headers ¶ added in v0.18.3
type ListUsersResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse400Headers the declared response headers of an HTTP 400 response for ListUsers
type ListUsersResponse401Headers ¶ added in v0.18.3
type ListUsersResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse401Headers the declared response headers of an HTTP 401 response for ListUsers
type ListUsersResponse403Headers ¶ added in v0.18.3
type ListUsersResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse403Headers the declared response headers of an HTTP 403 response for ListUsers
type ListUsersResponse429Headers ¶ added in v0.18.3
type ListUsersResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse429Headers the declared response headers of an HTTP 429 response for ListUsers
type ListUsersResponse500Headers ¶ added in v0.18.3
type ListUsersResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponse500Headers the declared response headers of an HTTP 500 response for ListUsers
type ListUsersResponseDefaultHeaders ¶ added in v0.18.3
type ListUsersResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ListUsersResponseDefaultHeaders the declared response headers of an HTTP default response for ListUsers
type Login ¶
type Login struct {
// Password Password for authentication
//
// Examples: My Password is a Passphrase 123!
Password Password `` /* 137-byte string literal not displayed */
// Username Username for authentication
//
// Examples: username123
Username Username `json:"username" safe-to-log:"true" validate:"required,min=10,max=50,regexp=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]{10,50}$"`
}
Login Login object containing username and password
Examples: {"password":"My Password is a Passphrase 123!","username":"username123"}
type LoginUserJSONRequestBody ¶
type LoginUserJSONRequestBody = Login
LoginUserJSONRequestBody defines body for LoginUser for application/json ContentType.
type LoginUserResponse ¶
type LoginUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Token
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *LoginUserResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *LoginUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *LoginUserResponse401Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *LoginUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *LoginUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *LoginUserResponseDefaultHeaders
}
func ParseLoginUserResponse ¶
func ParseLoginUserResponse(rsp *http.Response) (*LoginUserResponse, error)
ParseLoginUserResponse parses an HTTP response from a LoginUserWithResponse call
func (LoginUserResponse) ContentType ¶ added in v0.18.3
func (r LoginUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (LoginUserResponse) GetBody ¶ added in v0.18.3
func (r LoginUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (LoginUserResponse) GetJSON200 ¶ added in v0.18.3
func (r LoginUserResponse) GetJSON200() *Token
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (LoginUserResponse) GetJSON400 ¶ added in v0.18.3
func (r LoginUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (LoginUserResponse) GetJSON401 ¶ added in v0.18.3
func (r LoginUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (LoginUserResponse) GetJSON429 ¶ added in v0.18.3
func (r LoginUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (LoginUserResponse) GetJSON500 ¶ added in v0.18.3
func (r LoginUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (LoginUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r LoginUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (LoginUserResponse) Status ¶
func (r LoginUserResponse) Status() string
Status returns HTTPResponse.Status
func (LoginUserResponse) StatusCode ¶
func (r LoginUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LoginUserResponse200Headers ¶ added in v0.18.3
type LoginUserResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponse200Headers the declared response headers of an HTTP 200 response for LoginUser
type LoginUserResponse400Headers ¶ added in v0.18.3
type LoginUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponse400Headers the declared response headers of an HTTP 400 response for LoginUser
type LoginUserResponse401Headers ¶ added in v0.18.3
type LoginUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponse401Headers the declared response headers of an HTTP 401 response for LoginUser
type LoginUserResponse429Headers ¶ added in v0.18.3
type LoginUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponse429Headers the declared response headers of an HTTP 429 response for LoginUser
type LoginUserResponse500Headers ¶ added in v0.18.3
type LoginUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponse500Headers the declared response headers of an HTTP 500 response for LoginUser
type LoginUserResponseDefaultHeaders ¶ added in v0.18.3
type LoginUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LoginUserResponseDefaultHeaders the declared response headers of an HTTP default response for LoginUser
type LogoutUserResponse ¶
type LogoutUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *struct {
// Message Examples: Logout successful
Message *string `json:"message,omitempty"`
}
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *LogoutUserResponse200Headers
// Headers204 the parsed response headers for an HTTP 204 response
Headers204 *LogoutUserResponse204Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *LogoutUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *LogoutUserResponse401Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *LogoutUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *LogoutUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *LogoutUserResponseDefaultHeaders
}
func ParseLogoutUserResponse ¶
func ParseLogoutUserResponse(rsp *http.Response) (*LogoutUserResponse, error)
ParseLogoutUserResponse parses an HTTP response from a LogoutUserWithResponse call
func (LogoutUserResponse) ContentType ¶ added in v0.18.3
func (r LogoutUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (LogoutUserResponse) GetBody ¶ added in v0.18.3
func (r LogoutUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (LogoutUserResponse) GetJSON200 ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSON200() *struct { // Message Examples: Logout successful Message *string `json:"message,omitempty"` }
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (LogoutUserResponse) GetJSON400 ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (LogoutUserResponse) GetJSON401 ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (LogoutUserResponse) GetJSON429 ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (LogoutUserResponse) GetJSON500 ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (LogoutUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r LogoutUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (LogoutUserResponse) Status ¶
func (r LogoutUserResponse) Status() string
Status returns HTTPResponse.Status
func (LogoutUserResponse) StatusCode ¶
func (r LogoutUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LogoutUserResponse200Headers ¶ added in v0.18.3
type LogoutUserResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse200Headers the declared response headers of an HTTP 200 response for LogoutUser
type LogoutUserResponse204Headers ¶ added in v0.18.3
type LogoutUserResponse204Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse204Headers the declared response headers of an HTTP 204 response for LogoutUser
type LogoutUserResponse400Headers ¶ added in v0.18.3
type LogoutUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse400Headers the declared response headers of an HTTP 400 response for LogoutUser
type LogoutUserResponse401Headers ¶ added in v0.18.3
type LogoutUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse401Headers the declared response headers of an HTTP 401 response for LogoutUser
type LogoutUserResponse429Headers ¶ added in v0.18.3
type LogoutUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse429Headers the declared response headers of an HTTP 429 response for LogoutUser
type LogoutUserResponse500Headers ¶ added in v0.18.3
type LogoutUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponse500Headers the declared response headers of an HTTP 500 response for LogoutUser
type LogoutUserResponseDefaultHeaders ¶ added in v0.18.3
type LogoutUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
LogoutUserResponseDefaultHeaders the declared response headers of an HTTP default response for LogoutUser
type NotFound ¶
type NotFound = Error
NotFound Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type Password ¶
type Password = string
Password Password for authentication
Examples: My Password is a Passphrase 123!
type Pet ¶
type Pet struct {
// Id id for the Record
//
// Examples: 123e4567-e89b-12d3-a456-426614174000
Id *ID `json:"id,omitempty"`
// Name Name of the pet
//
// Examples: Fluffy
Name string `json:"name"`
// Tag Tag or label for the pet
//
// Examples: furry
Tag *string `json:"tag,omitempty"`
}
Pet A pet entity
type RefreshTokenJSONBody ¶
type RefreshTokenJSONBody struct {
// RefreshToken JWT or similar token for refresh
//
// Examples: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refreshPayload.refreshSig
RefreshToken *string `json:"refreshToken,omitempty"`
}
RefreshTokenJSONBody defines parameters for RefreshToken.
type RefreshTokenJSONRequestBody ¶
type RefreshTokenJSONRequestBody RefreshTokenJSONBody
RefreshTokenJSONRequestBody defines body for RefreshToken for application/json ContentType.
type RefreshTokenResponse ¶
type RefreshTokenResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Token
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *RefreshTokenResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *RefreshTokenResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *RefreshTokenResponse401Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *RefreshTokenResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *RefreshTokenResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *RefreshTokenResponseDefaultHeaders
}
func ParseRefreshTokenResponse ¶
func ParseRefreshTokenResponse(rsp *http.Response) (*RefreshTokenResponse, error)
ParseRefreshTokenResponse parses an HTTP response from a RefreshTokenWithResponse call
func (RefreshTokenResponse) ContentType ¶ added in v0.18.3
func (r RefreshTokenResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RefreshTokenResponse) GetBody ¶ added in v0.18.3
func (r RefreshTokenResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RefreshTokenResponse) GetJSON200 ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSON200() *Token
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RefreshTokenResponse) GetJSON400 ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RefreshTokenResponse) GetJSON401 ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (RefreshTokenResponse) GetJSON429 ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (RefreshTokenResponse) GetJSON500 ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (RefreshTokenResponse) GetJSONDefault ¶ added in v0.18.3
func (r RefreshTokenResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RefreshTokenResponse) Status ¶
func (r RefreshTokenResponse) Status() string
Status returns HTTPResponse.Status
func (RefreshTokenResponse) StatusCode ¶
func (r RefreshTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RefreshTokenResponse200Headers ¶ added in v0.18.3
type RefreshTokenResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponse200Headers the declared response headers of an HTTP 200 response for RefreshToken
type RefreshTokenResponse400Headers ¶ added in v0.18.3
type RefreshTokenResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponse400Headers the declared response headers of an HTTP 400 response for RefreshToken
type RefreshTokenResponse401Headers ¶ added in v0.18.3
type RefreshTokenResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponse401Headers the declared response headers of an HTTP 401 response for RefreshToken
type RefreshTokenResponse429Headers ¶ added in v0.18.3
type RefreshTokenResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponse429Headers the declared response headers of an HTTP 429 response for RefreshToken
type RefreshTokenResponse500Headers ¶ added in v0.18.3
type RefreshTokenResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponse500Headers the declared response headers of an HTTP 500 response for RefreshToken
type RefreshTokenResponseDefaultHeaders ¶ added in v0.18.3
type RefreshTokenResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RefreshTokenResponseDefaultHeaders the declared response headers of an HTTP default response for RefreshToken
type RegisterUserJSONRequestBody ¶
type RegisterUserJSONRequestBody = Registration
RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType.
type RegisterUserResponse ¶
type RegisterUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *Conflict
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers201 the parsed response headers for an HTTP 201 response
Headers201 *RegisterUserResponse201Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *RegisterUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *RegisterUserResponse401Headers
// Headers409 the parsed response headers for an HTTP 409 response
Headers409 *RegisterUserResponse409Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *RegisterUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *RegisterUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *RegisterUserResponseDefaultHeaders
}
func ParseRegisterUserResponse ¶
func ParseRegisterUserResponse(rsp *http.Response) (*RegisterUserResponse, error)
ParseRegisterUserResponse parses an HTTP response from a RegisterUserWithResponse call
func (RegisterUserResponse) ContentType ¶ added in v0.18.3
func (r RegisterUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RegisterUserResponse) GetBody ¶ added in v0.18.3
func (r RegisterUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RegisterUserResponse) GetJSON201 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON201() *User
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (RegisterUserResponse) GetJSON400 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RegisterUserResponse) GetJSON401 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (RegisterUserResponse) GetJSON409 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON409() *Conflict
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (RegisterUserResponse) GetJSON429 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (RegisterUserResponse) GetJSON500 ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (RegisterUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r RegisterUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (RegisterUserResponse) Status ¶
func (r RegisterUserResponse) Status() string
Status returns HTTPResponse.Status
func (RegisterUserResponse) StatusCode ¶
func (r RegisterUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RegisterUserResponse201Headers ¶ added in v0.18.3
type RegisterUserResponse201Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse201Headers the declared response headers of an HTTP 201 response for RegisterUser
type RegisterUserResponse400Headers ¶ added in v0.18.3
type RegisterUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse400Headers the declared response headers of an HTTP 400 response for RegisterUser
type RegisterUserResponse401Headers ¶ added in v0.18.3
type RegisterUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse401Headers the declared response headers of an HTTP 401 response for RegisterUser
type RegisterUserResponse409Headers ¶ added in v0.18.3
type RegisterUserResponse409Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse409Headers the declared response headers of an HTTP 409 response for RegisterUser
type RegisterUserResponse429Headers ¶ added in v0.18.3
type RegisterUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse429Headers the declared response headers of an HTTP 429 response for RegisterUser
type RegisterUserResponse500Headers ¶ added in v0.18.3
type RegisterUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponse500Headers the declared response headers of an HTTP 500 response for RegisterUser
type RegisterUserResponseDefaultHeaders ¶ added in v0.18.3
type RegisterUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
RegisterUserResponseDefaultHeaders the declared response headers of an HTTP default response for RegisterUser
type Registration ¶
type Registration struct {
// Password Password for authentication
//
// Examples: My Password is a Passphrase 123!
Password Password `` /* 137-byte string literal not displayed */
// Username Username for authentication
//
// Examples: username123
Username Username `json:"username" safe-to-log:"true" validate:"required,min=10,max=50,regexp=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]{10,50}$"`
}
Registration Registration object containing username and password
Examples: {"password":"My Password is a Passphrase 123!","username":"username123"}
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ServeMux ¶
type ServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
http.Handler
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// LoginUser User login
// (POST /v1/auth/login)
LoginUser(w http.ResponseWriter, r *http.Request)
// LogoutUser Logout user
// (POST /v1/auth/logout)
LogoutUser(w http.ResponseWriter, r *http.Request)
// GetCurrentUser Get current user info
// (GET /v1/auth/me)
GetCurrentUser(w http.ResponseWriter, r *http.Request)
// RefreshToken Refresh user token
// (POST /v1/auth/refresh)
RefreshToken(w http.ResponseWriter, r *http.Request)
// RegisterUser User registration
// (POST /v1/auth/register)
RegisterUser(w http.ResponseWriter, r *http.Request)
// Echo Echo
// (POST /v1/echo)
Echo(w http.ResponseWriter, r *http.Request)
// ListPets List all pets
// (GET /v1/pets)
ListPets(w http.ResponseWriter, r *http.Request)
// CreatePet Create a pet
// (POST /v1/pets)
CreatePet(w http.ResponseWriter, r *http.Request)
// ShowPetById Show a specific pet
// (GET /v1/pets/{petId})
ShowPetById(w http.ResponseWriter, r *http.Request, petId ID)
// ListUsers List all users
// (GET /v1/users)
ListUsers(w http.ResponseWriter, r *http.Request)
// CreateUser Create a user
// (POST /v1/users)
CreateUser(w http.ResponseWriter, r *http.Request)
// DeleteUser Delete a user
// (DELETE /v1/users/{userId})
DeleteUser(w http.ResponseWriter, r *http.Request, userId ID)
// GetUserById Get a specific user
// (GET /v1/users/{userId})
GetUserById(w http.ResponseWriter, r *http.Request, userId ID)
// UpdateUser Update a specific user
// (PATCH /v1/users/{userId})
UpdateUser(w http.ResponseWriter, r *http.Request, userId ID)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CreatePet ¶
func (siw *ServerInterfaceWrapper) CreatePet(w http.ResponseWriter, r *http.Request)
CreatePet operation middleware
func (*ServerInterfaceWrapper) CreateUser ¶
func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser operation middleware
func (*ServerInterfaceWrapper) DeleteUser ¶
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser operation middleware
func (*ServerInterfaceWrapper) Echo ¶
func (siw *ServerInterfaceWrapper) Echo(w http.ResponseWriter, r *http.Request)
Echo operation middleware
func (*ServerInterfaceWrapper) GetCurrentUser ¶
func (siw *ServerInterfaceWrapper) GetCurrentUser(w http.ResponseWriter, r *http.Request)
GetCurrentUser operation middleware
func (*ServerInterfaceWrapper) GetUserById ¶
func (siw *ServerInterfaceWrapper) GetUserById(w http.ResponseWriter, r *http.Request)
GetUserById operation middleware
func (*ServerInterfaceWrapper) ListPets ¶
func (siw *ServerInterfaceWrapper) ListPets(w http.ResponseWriter, r *http.Request)
ListPets operation middleware
func (*ServerInterfaceWrapper) ListUsers ¶
func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request)
ListUsers operation middleware
func (*ServerInterfaceWrapper) LoginUser ¶
func (siw *ServerInterfaceWrapper) LoginUser(w http.ResponseWriter, r *http.Request)
LoginUser operation middleware
func (*ServerInterfaceWrapper) LogoutUser ¶
func (siw *ServerInterfaceWrapper) LogoutUser(w http.ResponseWriter, r *http.Request)
LogoutUser operation middleware
func (*ServerInterfaceWrapper) RefreshToken ¶
func (siw *ServerInterfaceWrapper) RefreshToken(w http.ResponseWriter, r *http.Request)
RefreshToken operation middleware
func (*ServerInterfaceWrapper) RegisterUser ¶
func (siw *ServerInterfaceWrapper) RegisterUser(w http.ResponseWriter, r *http.Request)
RegisterUser operation middleware
func (*ServerInterfaceWrapper) ShowPetById ¶
func (siw *ServerInterfaceWrapper) ShowPetById(w http.ResponseWriter, r *http.Request)
ShowPetById operation middleware
func (*ServerInterfaceWrapper) UpdateUser ¶
func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser operation middleware
type ShowPetByIdResponse ¶
type ShowPetByIdResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Pet
// JSON201 the response for an HTTP 201 `application/json` response
JSON201 *Pet
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *ShowPetByIdResponse200Headers
// Headers201 the parsed response headers for an HTTP 201 response
Headers201 *ShowPetByIdResponse201Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *ShowPetByIdResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *ShowPetByIdResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *ShowPetByIdResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *ShowPetByIdResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *ShowPetByIdResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *ShowPetByIdResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *ShowPetByIdResponseDefaultHeaders
}
func ParseShowPetByIdResponse ¶
func ParseShowPetByIdResponse(rsp *http.Response) (*ShowPetByIdResponse, error)
ParseShowPetByIdResponse parses an HTTP response from a ShowPetByIdWithResponse call
func (ShowPetByIdResponse) ContentType ¶ added in v0.18.3
func (r ShowPetByIdResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ShowPetByIdResponse) GetBody ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ShowPetByIdResponse) GetJSON200 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON200() *Pet
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ShowPetByIdResponse) GetJSON201 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON201() *Pet
GetJSON201 returns the response for an HTTP 201 `application/json` response
func (ShowPetByIdResponse) GetJSON400 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ShowPetByIdResponse) GetJSON401 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ShowPetByIdResponse) GetJSON403 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ShowPetByIdResponse) GetJSON404 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ShowPetByIdResponse) GetJSON429 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (ShowPetByIdResponse) GetJSON500 ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (ShowPetByIdResponse) GetJSONDefault ¶ added in v0.18.3
func (r ShowPetByIdResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (ShowPetByIdResponse) Status ¶
func (r ShowPetByIdResponse) Status() string
Status returns HTTPResponse.Status
func (ShowPetByIdResponse) StatusCode ¶
func (r ShowPetByIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ShowPetByIdResponse200Headers ¶ added in v0.18.3
type ShowPetByIdResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse200Headers the declared response headers of an HTTP 200 response for ShowPetById
type ShowPetByIdResponse201Headers ¶ added in v0.18.3
type ShowPetByIdResponse201Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse201Headers the declared response headers of an HTTP 201 response for ShowPetById
type ShowPetByIdResponse400Headers ¶ added in v0.18.3
type ShowPetByIdResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse400Headers the declared response headers of an HTTP 400 response for ShowPetById
type ShowPetByIdResponse401Headers ¶ added in v0.18.3
type ShowPetByIdResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse401Headers the declared response headers of an HTTP 401 response for ShowPetById
type ShowPetByIdResponse403Headers ¶ added in v0.18.3
type ShowPetByIdResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse403Headers the declared response headers of an HTTP 403 response for ShowPetById
type ShowPetByIdResponse404Headers ¶ added in v0.18.3
type ShowPetByIdResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse404Headers the declared response headers of an HTTP 404 response for ShowPetById
type ShowPetByIdResponse429Headers ¶ added in v0.18.3
type ShowPetByIdResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse429Headers the declared response headers of an HTTP 429 response for ShowPetById
type ShowPetByIdResponse500Headers ¶ added in v0.18.3
type ShowPetByIdResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponse500Headers the declared response headers of an HTTP 500 response for ShowPetById
type ShowPetByIdResponseDefaultHeaders ¶ added in v0.18.3
type ShowPetByIdResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
ShowPetByIdResponseDefaultHeaders the declared response headers of an HTTP default response for ShowPetById
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct {
BaseURL string
BaseRouter ServeMux
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type Token ¶
type Token struct {
// ExpiresIn Token expiration in seconds
//
// Examples: 3600
ExpiresIn *int64 `json:"expiresIn,omitempty"`
// Token JWT or OAuth2 access token
//
// Examples: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Token *string `json:"token,omitempty"`
}
Token Token object containing JWT or OAuth2 access token
Examples: {"expiresIn":3600,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.examplePayload.exampleSig"}
type TooManyRequests ¶
type TooManyRequests = Error
TooManyRequests Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type Unauthorized ¶
type Unauthorized = Error
Unauthorized Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnexpectedError ¶
type UnexpectedError = Error
UnexpectedError Error response
Examples: {"error":"ERR_INVALID_REQUEST","id":"123e4567-e89b-12d3-a456-426614174000","message":"An error occurred"}
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateUserJSONBody ¶
type UpdateUserJSONBody struct {
// Password Password for authentication
//
// Examples: My Password is a Passphrase 123!
Password *Password `` /* 147-byte string literal not displayed */
// Roles New roles to assign
//
// Examples: ["admin","user"]
Roles *[]Role `json:"roles,omitempty"`
}
UpdateUserJSONBody defines parameters for UpdateUser.
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody UpdateUserJSONBody
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserResponse ¶
type UpdateUserResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *User
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *BadRequest
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *Unauthorized
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *Forbidden
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *NotFound
// JSON429 the response for an HTTP 429 `application/json` response
JSON429 *TooManyRequests
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSONDefault the response for an HTTP default `application/json` response
JSONDefault *UnexpectedError
// Headers200 the parsed response headers for an HTTP 200 response
Headers200 *UpdateUserResponse200Headers
// Headers400 the parsed response headers for an HTTP 400 response
Headers400 *UpdateUserResponse400Headers
// Headers401 the parsed response headers for an HTTP 401 response
Headers401 *UpdateUserResponse401Headers
// Headers403 the parsed response headers for an HTTP 403 response
Headers403 *UpdateUserResponse403Headers
// Headers404 the parsed response headers for an HTTP 404 response
Headers404 *UpdateUserResponse404Headers
// Headers429 the parsed response headers for an HTTP 429 response
Headers429 *UpdateUserResponse429Headers
// Headers500 the parsed response headers for an HTTP 500 response
Headers500 *UpdateUserResponse500Headers
// HeadersDefault the parsed response headers for an HTTP default response
HeadersDefault *UpdateUserResponseDefaultHeaders
}
func ParseUpdateUserResponse ¶
func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error)
ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call
func (UpdateUserResponse) ContentType ¶ added in v0.18.3
func (r UpdateUserResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (UpdateUserResponse) GetBody ¶ added in v0.18.3
func (r UpdateUserResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (UpdateUserResponse) GetJSON200 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON200() *User
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (UpdateUserResponse) GetJSON400 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON400() *BadRequest
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (UpdateUserResponse) GetJSON401 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON401() *Unauthorized
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (UpdateUserResponse) GetJSON403 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON403() *Forbidden
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (UpdateUserResponse) GetJSON404 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON404() *NotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (UpdateUserResponse) GetJSON429 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON429() *TooManyRequests
GetJSON429 returns the response for an HTTP 429 `application/json` response
func (UpdateUserResponse) GetJSON500 ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (UpdateUserResponse) GetJSONDefault ¶ added in v0.18.3
func (r UpdateUserResponse) GetJSONDefault() *UnexpectedError
GetJSONDefault returns the response for an HTTP default `application/json` response
func (UpdateUserResponse) Status ¶
func (r UpdateUserResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateUserResponse) StatusCode ¶
func (r UpdateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateUserResponse200Headers ¶ added in v0.18.3
type UpdateUserResponse200Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse200Headers the declared response headers of an HTTP 200 response for UpdateUser
type UpdateUserResponse400Headers ¶ added in v0.18.3
type UpdateUserResponse400Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse400Headers the declared response headers of an HTTP 400 response for UpdateUser
type UpdateUserResponse401Headers ¶ added in v0.18.3
type UpdateUserResponse401Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse401Headers the declared response headers of an HTTP 401 response for UpdateUser
type UpdateUserResponse403Headers ¶ added in v0.18.3
type UpdateUserResponse403Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse403Headers the declared response headers of an HTTP 403 response for UpdateUser
type UpdateUserResponse404Headers ¶ added in v0.18.3
type UpdateUserResponse404Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse404Headers the declared response headers of an HTTP 404 response for UpdateUser
type UpdateUserResponse429Headers ¶ added in v0.18.3
type UpdateUserResponse429Headers struct {
RetryAfter *int32
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse429Headers the declared response headers of an HTTP 429 response for UpdateUser
type UpdateUserResponse500Headers ¶ added in v0.18.3
type UpdateUserResponse500Headers struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponse500Headers the declared response headers of an HTTP 500 response for UpdateUser
type UpdateUserResponseDefaultHeaders ¶ added in v0.18.3
type UpdateUserResponseDefaultHeaders struct {
XRateLimitLimit *int32
XRateLimitRemaining *int32
XRateLimitReset *time.Time
}
UpdateUserResponseDefaultHeaders the declared response headers of an HTTP default response for UpdateUser
type User ¶
type User struct {
// Claims Additional claims for extended user profile or permissions
//
// Examples: {"additionalData":{"department":"IT"},"roles":["admin","user"]}
Claims *Claims `json:"claims,omitempty"`
// CreatedAt When the user was created
CreatedAt time.Time `json:"createdAt"`
// Id id for the Record
//
// Examples: 123e4567-e89b-12d3-a456-426614174000
Id *ID `json:"id,omitempty"`
Roles []Role `json:"roles"`
// UpdatedAt When the user was last updated
UpdatedAt time.Time `json:"updatedAt"`
// Username Username for authentication
//
// Examples: username123
Username Username `json:"username" safe-to-log:"true" validate:"required,min=10,max=50,regexp=^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9]{10,50}$"`
}
User Complete user record with roles and claims
Examples: {"claims":{"additionalData":{"department":"IT"},"roles":["admin","user"]},"createdAt":"2023-10-01T10:00:00Z","id":"123e4567-e89b-12d3-a456-426614174000","roles":["admin","user"],"updatedAt":"2023-10-01T10:30:00Z","username":"username123"}