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
- type CreateUserJSONRequestBody
- type CreateUserResponse
- type DeleteUserResponse
- type EchoJSONRequestBody
- type EchoMsg
- type EchoReq
- type EchoResp
- type EchoResponse
- type Error
- type Forbidden
- type GetCurrentUserResponse
- type GetUserByIdResponse
- type HttpRequestDoer
- type ID
- type InternalServerError
- type InvalidParamFormatError
- type ListPetsResponse
- type ListUsersResponse
- type Login
- type LoginUserJSONRequestBody
- type LoginUserResponse
- type LogoutUserResponse
- type MiddlewareFunc
- type NotFound
- type Password
- type Pet
- type RefreshTokenJSONBody
- type RefreshTokenJSONRequestBody
- type RefreshTokenResponse
- type RegisterUserJSONRequestBody
- type RegisterUserResponse
- 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
- type StdHTTPServerOptions
- type Token
- type TooManyRequests
- type TooManyValuesForParamError
- type Unauthorized
- type UnescapedCookieParamError
- type UnexpectedError
- type UnmarshalingParamError
- type UpdateUserJSONBody
- type UpdateUserJSONRequestBody
- type UpdateUserResponse
- type User
- type Username
Constants ¶
const ( BearerAuthScopes = "bearerAuth.Scopes" MutualTLSAuthScopes = "mutualTLSAuth.Scopes" Oauth2AuthScopes = "oauth2Auth.Scopes" OpenIdConnectAuthScopes = "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 generates requests for CreatePet with any type of body
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 generates requests for CreateUser with any type of body
func NewDeleteUserRequest ¶
NewDeleteUserRequest generates requests for DeleteUser
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 generates requests for Echo with any type of body
func NewGetCurrentUserRequest ¶
NewGetCurrentUserRequest generates requests for GetCurrentUser
func NewGetUserByIdRequest ¶
NewGetUserByIdRequest generates requests for GetUserById
func NewListPetsRequest ¶
NewListPetsRequest generates requests for ListPets
func NewListUsersRequest ¶
NewListUsersRequest generates requests for ListUsers
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 generates requests for LoginUser with any type of body
func NewLogoutUserRequest ¶
NewLogoutUserRequest generates requests for LogoutUser
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 generates requests for RefreshToken with any type of body
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 generates requests for RegisterUser with any type of body
func NewShowPetByIdRequest ¶
NewShowPetByIdRequest generates requests for ShowPetById
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 Claims ¶
type Claims struct {
// AdditionalData Any extra claim data
AdditionalData *map[string]interface{} `json:"additionalData,omitempty"`
Roles *[]Role `json:"roles,omitempty"`
}
Claims Additional claims for extended user profile or permissions
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)
func (*Client) CreatePetWithBody ¶
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateUserWithBody ¶
func (*Client) DeleteUser ¶
func (*Client) Echo ¶
func (c *Client) Echo(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) EchoWithBody ¶
func (*Client) GetCurrentUser ¶
func (*Client) GetUserById ¶
func (*Client) LoginUser ¶
func (c *Client) LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) LoginUserWithBody ¶
func (*Client) LogoutUser ¶
func (*Client) RefreshToken ¶
func (c *Client) RefreshToken(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RefreshTokenWithBody ¶
func (*Client) RegisterUser ¶
func (c *Client) RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RegisterUserWithBody ¶
func (*Client) ShowPetById ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// LoginUserWithBody request with any body
LoginUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
LoginUser(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// LogoutUser request
LogoutUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCurrentUser request
GetCurrentUser(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RefreshTokenWithBody request with any body
RefreshTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RefreshToken(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RegisterUserWithBody request with any body
RegisterUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RegisterUser(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// EchoWithBody request with any body
EchoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Echo(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPets request
ListPets(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreatePetWithBody request with any body
CreatePetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreatePet(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ShowPetById request
ShowPetById(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListUsers request
ListUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateUserWithBody request with any body
CreateUserWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateUser(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteUser request
DeleteUser(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetUserById request
GetUserById(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateUserWithBody request with any body
UpdateUserWithBody(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
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 request with arbitrary body returning *CreatePetResponse
func (*ClientWithResponses) CreatePetWithResponse ¶
func (c *ClientWithResponses) CreatePetWithResponse(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
func (*ClientWithResponses) CreateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse
func (*ClientWithResponses) CreateUserWithResponse ¶
func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
func (*ClientWithResponses) DeleteUserWithResponse ¶
func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
DeleteUserWithResponse request returning *DeleteUserResponse
func (*ClientWithResponses) EchoWithBodyWithResponse ¶
func (c *ClientWithResponses) EchoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EchoResponse, error)
EchoWithBodyWithResponse request with arbitrary body returning *EchoResponse
func (*ClientWithResponses) EchoWithResponse ¶
func (c *ClientWithResponses) EchoWithResponse(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*EchoResponse, error)
func (*ClientWithResponses) GetCurrentUserWithResponse ¶
func (c *ClientWithResponses) GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
GetCurrentUserWithResponse request returning *GetCurrentUserResponse
func (*ClientWithResponses) GetUserByIdWithResponse ¶
func (c *ClientWithResponses) GetUserByIdWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*GetUserByIdResponse, error)
GetUserByIdWithResponse request returning *GetUserByIdResponse
func (*ClientWithResponses) ListPetsWithResponse ¶
func (c *ClientWithResponses) ListPetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPetsResponse, error)
ListPetsWithResponse request returning *ListPetsResponse
func (*ClientWithResponses) ListUsersWithResponse ¶
func (c *ClientWithResponses) ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
ListUsersWithResponse request returning *ListUsersResponse
func (*ClientWithResponses) LoginUserWithBodyWithResponse ¶
func (c *ClientWithResponses) LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
LoginUserWithBodyWithResponse request with arbitrary body returning *LoginUserResponse
func (*ClientWithResponses) LoginUserWithResponse ¶
func (c *ClientWithResponses) LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
func (*ClientWithResponses) LogoutUserWithResponse ¶
func (c *ClientWithResponses) LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error)
LogoutUserWithResponse request returning *LogoutUserResponse
func (*ClientWithResponses) RefreshTokenWithBodyWithResponse ¶
func (c *ClientWithResponses) RefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
RefreshTokenWithBodyWithResponse request with arbitrary body returning *RefreshTokenResponse
func (*ClientWithResponses) RefreshTokenWithResponse ¶
func (c *ClientWithResponses) RefreshTokenWithResponse(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
func (*ClientWithResponses) RegisterUserWithBodyWithResponse ¶
func (c *ClientWithResponses) RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
RegisterUserWithBodyWithResponse request with arbitrary body returning *RegisterUserResponse
func (*ClientWithResponses) RegisterUserWithResponse ¶
func (c *ClientWithResponses) RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
func (*ClientWithResponses) ShowPetByIdWithResponse ¶
func (c *ClientWithResponses) ShowPetByIdWithResponse(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*ShowPetByIdResponse, error)
ShowPetByIdWithResponse request returning *ShowPetByIdResponse
func (*ClientWithResponses) UpdateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
UpdateUserWithBodyWithResponse request with arbitrary body returning *UpdateUserResponse
func (*ClientWithResponses) UpdateUserWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// LoginUserWithBodyWithResponse request with any body
LoginUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
LoginUserWithResponse(ctx context.Context, body LoginUserJSONRequestBody, reqEditors ...RequestEditorFn) (*LoginUserResponse, error)
// LogoutUserWithResponse request
LogoutUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*LogoutUserResponse, error)
// GetCurrentUserWithResponse request
GetCurrentUserWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentUserResponse, error)
// RefreshTokenWithBodyWithResponse request with any body
RefreshTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
RefreshTokenWithResponse(ctx context.Context, body RefreshTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*RefreshTokenResponse, error)
// RegisterUserWithBodyWithResponse request with any body
RegisterUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
RegisterUserWithResponse(ctx context.Context, body RegisterUserJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterUserResponse, error)
// EchoWithBodyWithResponse request with any body
EchoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EchoResponse, error)
EchoWithResponse(ctx context.Context, body EchoJSONRequestBody, reqEditors ...RequestEditorFn) (*EchoResponse, error)
// ListPetsWithResponse request
ListPetsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListPetsResponse, error)
// CreatePetWithBodyWithResponse request with any body
CreatePetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
CreatePetWithResponse(ctx context.Context, body CreatePetJSONRequestBody, reqEditors ...RequestEditorFn) (*CreatePetResponse, error)
// ShowPetByIdWithResponse request
ShowPetByIdWithResponse(ctx context.Context, petId ID, reqEditors ...RequestEditorFn) (*ShowPetByIdResponse, error)
// ListUsersWithResponse request
ListUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUsersResponse, error)
// CreateUserWithBodyWithResponse request with any body
CreateUserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithResponse(ctx context.Context, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
// DeleteUserWithResponse request
DeleteUserWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
// GetUserByIdWithResponse request
GetUserByIdWithResponse(ctx context.Context, userId ID, reqEditors ...RequestEditorFn) (*GetUserByIdResponse, error)
// UpdateUserWithBodyWithResponse request with any body
UpdateUserWithBodyWithResponse(ctx context.Context, userId ID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
UpdateUserWithResponse(ctx context.Context, userId ID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
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 *Pet
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseCreatePetResponse ¶
func ParseCreatePetResponse(rsp *http.Response) (*CreatePetResponse, error)
ParseCreatePetResponse parses an HTTP response from a CreatePetWithResponse call
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 CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = Registration
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserResponse ¶
type CreateUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON409 *Conflict
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseCreateUserResponse ¶
func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)
ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call
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 DeleteUserResponse ¶
type DeleteUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseDeleteUserResponse ¶
func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)
ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call
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 EchoJSONRequestBody ¶
type EchoJSONRequestBody = EchoReq
EchoJSONRequestBody defines body for Echo for application/json ContentType.
type EchoMsg ¶
type EchoMsg struct {
Msg string `json:"msg"`
}
EchoMsg WebSocket echo message payload
type EchoReq ¶
type EchoReq struct {
Msg string `json:"msg"`
}
EchoReq Schema for the echo endpoint request body
type EchoResponse ¶
type EchoResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *EchoResp
JSON400 *BadRequest
JSON401 *Unauthorized
JSON429 *TooManyRequests
JSON500 *InternalServerError
}
func ParseEchoResponse ¶
func ParseEchoResponse(rsp *http.Response) (*EchoResponse, error)
ParseEchoResponse parses an HTTP response from a EchoWithResponse call
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 Error ¶
type Error struct {
// Error Error code
Error string `json:"error"`
// Id id for the Record
Id *ID `json:"id,omitempty"`
// Message Error message
Message string `json:"message"`
}
Error Error response
type GetCurrentUserResponse ¶
type GetCurrentUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseGetCurrentUserResponse ¶
func ParseGetCurrentUserResponse(rsp *http.Response) (*GetCurrentUserResponse, error)
ParseGetCurrentUserResponse parses an HTTP response from a GetCurrentUserWithResponse call
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 GetUserByIdResponse ¶
type GetUserByIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseGetUserByIdResponse ¶
func ParseGetUserByIdResponse(rsp *http.Response) (*GetUserByIdResponse, error)
ParseGetUserByIdResponse parses an HTTP response from a GetUserByIdWithResponse call
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 HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
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 *[]Pet
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseListPetsResponse ¶
func ParseListPetsResponse(rsp *http.Response) (*ListPetsResponse, error)
ParseListPetsResponse parses an HTTP response from a ListPetsWithResponse call
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 ListUsersResponse ¶
type ListUsersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseListUsersResponse ¶
func ParseListUsersResponse(rsp *http.Response) (*ListUsersResponse, error)
ParseListUsersResponse parses an HTTP response from a ListUsersWithResponse call
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 Login ¶
type Login struct {
// Password Password for authentication
Password Password `` /* 137-byte string literal not displayed */
// Username Username for authentication
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
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 *Token
JSON400 *BadRequest
JSON401 *Unauthorized
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseLoginUserResponse ¶
func ParseLoginUserResponse(rsp *http.Response) (*LoginUserResponse, error)
ParseLoginUserResponse parses an HTTP response from a LoginUserWithResponse call
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 LogoutUserResponse ¶
type LogoutUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Message *string `json:"message,omitempty"`
}
JSON400 *BadRequest
JSON401 *Unauthorized
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseLogoutUserResponse ¶
func ParseLogoutUserResponse(rsp *http.Response) (*LogoutUserResponse, error)
ParseLogoutUserResponse parses an HTTP response from a LogoutUserWithResponse call
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 Pet ¶
type Pet struct {
// Id id for the Record
Id *ID `json:"id,omitempty"`
// Name Name of the pet
Name string `json:"name"`
// Tag Tag or label for the pet
Tag *string `json:"tag,omitempty"`
}
Pet A pet entity
type RefreshTokenJSONBody ¶
type RefreshTokenJSONBody struct {
// RefreshToken JWT or similar token for refresh
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 *Token
JSON400 *BadRequest
JSON401 *Unauthorized
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseRefreshTokenResponse ¶
func ParseRefreshTokenResponse(rsp *http.Response) (*RefreshTokenResponse, error)
ParseRefreshTokenResponse parses an HTTP response from a RefreshTokenWithResponse call
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 RegisterUserJSONRequestBody ¶
type RegisterUserJSONRequestBody = Registration
RegisterUserJSONRequestBody defines body for RegisterUser for application/json ContentType.
type RegisterUserResponse ¶
type RegisterUserResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON409 *Conflict
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseRegisterUserResponse ¶
func ParseRegisterUserResponse(rsp *http.Response) (*RegisterUserResponse, error)
ParseRegisterUserResponse parses an HTTP response from a RegisterUserWithResponse call
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 Registration ¶
type Registration struct {
// Password Password for authentication
Password Password `` /* 137-byte string literal not displayed */
// Username Username for authentication
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
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))
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
ServeMux is an abstraction of http.ServeMux.
type ServerInterface ¶
type ServerInterface interface {
// User login
// (POST /v1/auth/login)
LoginUser(w http.ResponseWriter, r *http.Request)
// Logout user
// (POST /v1/auth/logout)
LogoutUser(w http.ResponseWriter, r *http.Request)
// Get current user info
// (GET /v1/auth/me)
GetCurrentUser(w http.ResponseWriter, r *http.Request)
// Refresh user token
// (POST /v1/auth/refresh)
RefreshToken(w http.ResponseWriter, r *http.Request)
// User registration
// (POST /v1/auth/register)
RegisterUser(w http.ResponseWriter, r *http.Request)
// Echo
// (POST /v1/echo)
Echo(w http.ResponseWriter, r *http.Request)
// List all pets
// (GET /v1/pets)
ListPets(w http.ResponseWriter, r *http.Request)
// Create a pet
// (POST /v1/pets)
CreatePet(w http.ResponseWriter, r *http.Request)
// Show a specific pet
// (GET /v1/pets/{petId})
ShowPetById(w http.ResponseWriter, r *http.Request, petId ID)
// List all users
// (GET /v1/users)
ListUsers(w http.ResponseWriter, r *http.Request)
// Create a user
// (POST /v1/users)
CreateUser(w http.ResponseWriter, r *http.Request)
// Delete a user
// (DELETE /v1/users/{userId})
DeleteUser(w http.ResponseWriter, r *http.Request, userId ID)
// Get a specific user
// (GET /v1/users/{userId})
GetUserById(w http.ResponseWriter, r *http.Request, userId ID)
// 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 *Pet
JSON201 *Pet
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseShowPetByIdResponse ¶
func ParseShowPetByIdResponse(rsp *http.Response) (*ShowPetByIdResponse, error)
ParseShowPetByIdResponse parses an HTTP response from a ShowPetByIdWithResponse call
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 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
ExpiresIn *int64 `json:"expiresIn,omitempty"`
// Token JWT or OAuth2 access token
Token *string `json:"token,omitempty"`
}
Token Token object containing JWT or OAuth2 access token
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
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
Password *Password `` /* 147-byte string literal not displayed */
// Roles New roles to assign
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 *User
JSON400 *BadRequest
JSON401 *Unauthorized
JSON403 *Forbidden
JSON404 *NotFound
JSON429 *TooManyRequests
JSON500 *InternalServerError
JSONDefault *UnexpectedError
}
func ParseUpdateUserResponse ¶
func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error)
ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call
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 User ¶
type User struct {
// Claims Additional claims for extended user profile or permissions
Claims *Claims `json:"claims,omitempty"`
// CreatedAt When the user was created
CreatedAt time.Time `json:"createdAt"`
// Id id for the Record
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
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