Documentation
¶
Overview ¶
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- Constants
- 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, username string) (*http.Request, error)
- func NewGetuserRequest(server string, username string) (*http.Request, error)
- func NewPutuserRequest(server string, username string, body PutuserJSONRequestBody) (*http.Request, error)
- func NewPutuserRequestWithBody(server string, username string, contentType string, body io.Reader) (*http.Request, error)
- func NewRegRequest(server string, body RegJSONRequestBody) (*http.Request, error)
- func NewRegRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- 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, username string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Getuser(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Putuser(ctx context.Context, username string, body PutuserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PutuserWithBody(ctx context.Context, username string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Reg(ctx context.Context, body RegJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RegWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- 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, username string) (*DeleteuserResponse, error)
- func (c *ClientWithResponses) GetuserWithResponse(ctx context.Context, username string) (*GetuserResponse, error)
- func (c *ClientWithResponses) PutuserWithBodyWithResponse(ctx context.Context, username string, contentType string, body io.Reader) (*PutuserResponse, error)
- func (c *ClientWithResponses) PutuserWithResponse(ctx context.Context, username string, body PutuserJSONRequestBody) (*PutuserResponse, error)
- func (c *ClientWithResponses) RegWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RegResponse, error)
- func (c *ClientWithResponses) RegWithResponse(ctx context.Context, body RegJSONRequestBody) (*RegResponse, error)
- type ClientWithResponsesInterface
- type CreateuserJSONBody
- type CreateuserJSONRequestBody
- type CreateuserResponse
- type DeleteuserResponse
- type FullUser
- type GetuserResponse
- type HttpRequestDoer
- type PutuserJSONBody
- type PutuserJSONRequestBody
- type PutuserResponse
- type RegJSONBody
- type RegJSONRequestBody
- type RegResponse
- type Registry
- type RequestEditorFn
- type User
Constants ¶
const (
//BasicAuthScopes basic
BasicAuthScopes = "BasicAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
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 NewGetuserRequest ¶
NewGetuserRequest generates requests for Getuser
func NewPutuserRequest ¶
func NewPutuserRequest(server string, username string, body PutuserJSONRequestBody) (*http.Request, error)
NewPutuserRequest calls the generic Putuser builder with application/json body
func NewPutuserRequestWithBody ¶
func NewPutuserRequestWithBody(server string, username string, contentType string, body io.Reader) (*http.Request, error)
NewPutuserRequestWithBody generates requests for Putuser with any type of body
func NewRegRequest ¶
func NewRegRequest(server string, body RegJSONRequestBody) (*http.Request, error)
NewRegRequest calls the generic Reg builder with application/json body
Types ¶
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) Createuser ¶
func (c *Client) Createuser(ctx context.Context, body CreateuserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateuserWithBody ¶
func (*Client) Deleteuser ¶
func (*Client) Putuser ¶
func (c *Client) Putuser(ctx context.Context, username string, body PutuserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PutuserWithBody ¶
func (*Client) Reg ¶
func (c *Client) Reg(ctx context.Context, body RegJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // Reg request with any body RegWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Reg(ctx context.Context, body RegJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Createuser 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, username string, reqEditors ...RequestEditorFn) (*http.Response, error) // Getuser request Getuser(ctx context.Context, username string, reqEditors ...RequestEditorFn) (*http.Response, error) // Putuser request with any body PutuserWithBody(ctx context.Context, username string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Putuser(ctx context.Context, username string, body PutuserJSONRequestBody, 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) CreateuserWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateuserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateuserResponse, error)
CreateuserWithBodyWithResponse request with arbitrary body returning *CreateuserResponse
func (*ClientWithResponses) CreateuserWithResponse ¶
func (c *ClientWithResponses) CreateuserWithResponse(ctx context.Context, body CreateuserJSONRequestBody) (*CreateuserResponse, error)
func (*ClientWithResponses) DeleteuserWithResponse ¶
func (c *ClientWithResponses) DeleteuserWithResponse(ctx context.Context, username string) (*DeleteuserResponse, error)
DeleteuserWithResponse request returning *DeleteuserResponse
func (*ClientWithResponses) GetuserWithResponse ¶
func (c *ClientWithResponses) GetuserWithResponse(ctx context.Context, username string) (*GetuserResponse, error)
GetuserWithResponse request returning *GetuserResponse
func (*ClientWithResponses) PutuserWithBodyWithResponse ¶
func (c *ClientWithResponses) PutuserWithBodyWithResponse(ctx context.Context, username string, contentType string, body io.Reader) (*PutuserResponse, error)
PutuserWithBodyWithResponse request with arbitrary body returning *PutuserResponse
func (*ClientWithResponses) PutuserWithResponse ¶
func (c *ClientWithResponses) PutuserWithResponse(ctx context.Context, username string, body PutuserJSONRequestBody) (*PutuserResponse, error)
func (*ClientWithResponses) RegWithBodyWithResponse ¶
func (c *ClientWithResponses) RegWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RegResponse, error)
RegWithBodyWithResponse request with arbitrary body returning *RegResponse
func (*ClientWithResponses) RegWithResponse ¶
func (c *ClientWithResponses) RegWithResponse(ctx context.Context, body RegJSONRequestBody) (*RegResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // Reg request with any body RegWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*RegResponse, error) RegWithResponse(ctx context.Context, body RegJSONRequestBody) (*RegResponse, error) // Createuser request with any body CreateuserWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateuserResponse, error) CreateuserWithResponse(ctx context.Context, body CreateuserJSONRequestBody) (*CreateuserResponse, error) // Deleteuser request DeleteuserWithResponse(ctx context.Context, username string) (*DeleteuserResponse, error) // Getuser request GetuserWithResponse(ctx context.Context, username string) (*GetuserResponse, error) // Putuser request with any body PutuserWithBodyWithResponse(ctx context.Context, username string, contentType string, body io.Reader) (*PutuserResponse, error) PutuserWithResponse(ctx context.Context, username string, body PutuserJSONRequestBody) (*PutuserResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateuserJSONBody ¶
type CreateuserJSONBody FullUser
CreateuserJSONBody defines parameters for Createuser.
type CreateuserJSONRequestBody ¶
type CreateuserJSONRequestBody CreateuserJSONBody
CreateuserJSONRequestBody defines body for Createuser for application/json ContentType.
type CreateuserResponse ¶
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 ¶
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 FullUser ¶
type FullUser struct { Name string `json:"name,omitempty"` Password string `json:"password,omitempty"` Username string `json:"username,omitempty"` }
FullUser defines model for FullUser.
type GetuserResponse ¶
func ParseGetuserResponse ¶
func ParseGetuserResponse(rsp *http.Response) (*GetuserResponse, error)
ParseGetuserResponse parses an HTTP response from a GetuserWithResponse call
func (GetuserResponse) Status ¶
func (r GetuserResponse) Status() string
Status returns HTTPResponse.Status
func (GetuserResponse) StatusCode ¶
func (r GetuserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PutuserJSONBody ¶
type PutuserJSONBody FullUser
PutuserJSONBody defines parameters for Putuser.
type PutuserJSONRequestBody ¶
type PutuserJSONRequestBody PutuserJSONBody
PutuserJSONRequestBody defines body for Putuser for application/json ContentType.
type PutuserResponse ¶
func ParsePutuserResponse ¶
func ParsePutuserResponse(rsp *http.Response) (*PutuserResponse, error)
ParsePutuserResponse parses an HTTP response from a PutuserWithResponse call
func (PutuserResponse) Status ¶
func (r PutuserResponse) Status() string
Status returns HTTPResponse.Status
func (PutuserResponse) StatusCode ¶
func (r PutuserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RegJSONRequestBody ¶
type RegJSONRequestBody RegJSONBody
RegJSONRequestBody defines body for Reg for application/json ContentType.
type RegResponse ¶
func ParseRegResponse ¶
func ParseRegResponse(rsp *http.Response) (*RegResponse, error)
ParseRegResponse parses an HTTP response from a RegWithResponse call
func (RegResponse) StatusCode ¶
func (r RegResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Registry ¶
type Registry struct { DumpReq []byte `json:"dump_req,omitempty"` DumpRes []byte `json:"dump_res,omitempty"` Username string `json:"username,omitempty"` }
Registry defines model for Registry.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function