Documentation
¶
Overview ¶
Package cataas provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func NewCatRandomTextRequest(server string, text string, params *CatRandomTextParams) (*http.Request, error)
- type Cat
- type CatRandomTextParams
- type CatRandomTextParamsFilter
- type CatRandomTextParamsFit
- type CatRandomTextParamsFont
- type CatRandomTextParamsPosition
- type CatRandomTextParamsType
- type CatRandomTextResponse
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type HttpRequestDoer
- type RequestEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatRandomTextRequest ¶
func NewCatRandomTextRequest(server string, text string, params *CatRandomTextParams) (*http.Request, error)
NewCatRandomTextRequest generates requests for CatRandomText
Types ¶
type Cat ¶
type Cat struct {
CreatedAt string `json:"createdAt"`
Id string `json:"id"`
Mimetype string `json:"mimetype"`
Tags []string `json:"tags"`
Url *string `json:"url,omitempty"`
}
Cat defines model for Cat.
type CatRandomTextParams ¶
type CatRandomTextParams struct {
Type *CatRandomTextParamsType `form:"type,omitempty" json:"type,omitempty"`
Filter *CatRandomTextParamsFilter `form:"filter,omitempty" json:"filter,omitempty"`
Fit *CatRandomTextParamsFit `form:"fit,omitempty" json:"fit,omitempty"`
Position *CatRandomTextParamsPosition `form:"position,omitempty" json:"position,omitempty"`
Width *float32 `form:"width,omitempty" json:"width,omitempty"`
Height *float32 `form:"height,omitempty" json:"height,omitempty"`
Blur *float32 `form:"blur,omitempty" json:"blur,omitempty"`
// R With custom filter, define red value between 0 and 255
R *float32 `form:"r,omitempty" json:"r,omitempty"`
// G With custom filter, define green value between 0 and 255
G *float32 `form:"g,omitempty" json:"g,omitempty"`
// B With custom filter, define blue value between 0 and 255
B *float32 `form:"b,omitempty" json:"b,omitempty"`
// Brightness With custom filter, define brightness
Brightness *float32 `form:"brightness,omitempty" json:"brightness,omitempty"`
// Saturation With custom filter, define saturation
Saturation *float32 `form:"saturation,omitempty" json:"saturation,omitempty"`
// Hue With custom filter, define hue
Hue *float32 `form:"hue,omitempty" json:"hue,omitempty"`
// Lightness With custom filter, define lightness
Lightness *float32 `form:"lightness,omitempty" json:"lightness,omitempty"`
Html *bool `form:"html,omitempty" json:"html,omitempty"`
Json *bool `form:"json,omitempty" json:"json,omitempty"`
Font *CatRandomTextParamsFont `form:"font,omitempty" json:"font,omitempty"`
FontSize *float32 `form:"fontSize,omitempty" json:"fontSize,omitempty"`
FontColor *string `form:"fontColor,omitempty" json:"fontColor,omitempty"`
FontBackground *string `form:"fontBackground,omitempty" json:"fontBackground,omitempty"`
}
CatRandomTextParams defines parameters for CatRandomText.
type CatRandomTextParamsFilter ¶
type CatRandomTextParamsFilter string
CatRandomTextParamsFilter defines parameters for CatRandomText.
const ( Custom CatRandomTextParamsFilter = "custom" Mono CatRandomTextParamsFilter = "mono" Negate CatRandomTextParamsFilter = "negate" )
Defines values for CatRandomTextParamsFilter.
func (CatRandomTextParamsFilter) Valid ¶
func (e CatRandomTextParamsFilter) Valid() bool
Valid indicates whether the value is a known member of the CatRandomTextParamsFilter enum.
type CatRandomTextParamsFit ¶
type CatRandomTextParamsFit string
CatRandomTextParamsFit defines parameters for CatRandomText.
const ( Contain CatRandomTextParamsFit = "contain" Cover CatRandomTextParamsFit = "cover" Fill CatRandomTextParamsFit = "fill" Inside CatRandomTextParamsFit = "inside" Outside CatRandomTextParamsFit = "outside" )
Defines values for CatRandomTextParamsFit.
func (CatRandomTextParamsFit) Valid ¶
func (e CatRandomTextParamsFit) Valid() bool
Valid indicates whether the value is a known member of the CatRandomTextParamsFit enum.
type CatRandomTextParamsFont ¶
type CatRandomTextParamsFont string
CatRandomTextParamsFont defines parameters for CatRandomText.
const ( AndaleMono CatRandomTextParamsFont = "Andale Mono" Arial CatRandomTextParamsFont = "Arial" ArialBlack CatRandomTextParamsFont = "Arial Black" ComicSansMS CatRandomTextParamsFont = "Comic Sans MS" CourierNew CatRandomTextParamsFont = "Courier New" Georgia CatRandomTextParamsFont = "Georgia" Impact CatRandomTextParamsFont = "Impact" TimesNewRoman CatRandomTextParamsFont = "Times New Roman" Verdana CatRandomTextParamsFont = "Verdana" Webdings CatRandomTextParamsFont = "Webdings" )
Defines values for CatRandomTextParamsFont.
func (CatRandomTextParamsFont) Valid ¶
func (e CatRandomTextParamsFont) Valid() bool
Valid indicates whether the value is a known member of the CatRandomTextParamsFont enum.
type CatRandomTextParamsPosition ¶
type CatRandomTextParamsPosition string
CatRandomTextParamsPosition defines parameters for CatRandomText.
const ( Bottom CatRandomTextParamsPosition = "bottom" Center CatRandomTextParamsPosition = "center" Left CatRandomTextParamsPosition = "left" LeftBottom CatRandomTextParamsPosition = "left bottom" LeftTop CatRandomTextParamsPosition = "left top" Right CatRandomTextParamsPosition = "right" RightBottom CatRandomTextParamsPosition = "right bottom" RightTop CatRandomTextParamsPosition = "right top" Top CatRandomTextParamsPosition = "top" )
Defines values for CatRandomTextParamsPosition.
func (CatRandomTextParamsPosition) Valid ¶
func (e CatRandomTextParamsPosition) Valid() bool
Valid indicates whether the value is a known member of the CatRandomTextParamsPosition enum.
type CatRandomTextParamsType ¶
type CatRandomTextParamsType string
CatRandomTextParamsType defines parameters for CatRandomText.
const ( Medium CatRandomTextParamsType = "medium" Small CatRandomTextParamsType = "small" Square CatRandomTextParamsType = "square" Xsmall CatRandomTextParamsType = "xsmall" )
Defines values for CatRandomTextParamsType.
func (CatRandomTextParamsType) Valid ¶
func (e CatRandomTextParamsType) Valid() bool
Valid indicates whether the value is a known member of the CatRandomTextParamsType enum.
type CatRandomTextResponse ¶
func ParseCatRandomTextResponse ¶
func ParseCatRandomTextResponse(rsp *http.Response) (*CatRandomTextResponse, error)
ParseCatRandomTextResponse parses an HTTP response from a CatRandomTextWithResponse call
func (CatRandomTextResponse) Status ¶
func (r CatRandomTextResponse) Status() string
Status returns HTTPResponse.Status
func (CatRandomTextResponse) StatusCode ¶
func (r CatRandomTextResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) CatRandomText ¶
func (c *Client) CatRandomText(ctx context.Context, text string, params *CatRandomTextParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// CatRandomText request
CatRandomText(ctx context.Context, text string, params *CatRandomTextParams, 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) CatRandomTextWithResponse ¶
func (c *ClientWithResponses) CatRandomTextWithResponse(ctx context.Context, text string, params *CatRandomTextParams, reqEditors ...RequestEditorFn) (*CatRandomTextResponse, error)
CatRandomTextWithResponse request returning *CatRandomTextResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// CatRandomTextWithResponse request
CatRandomTextWithResponse(ctx context.Context, text string, params *CatRandomTextParams, reqEditors ...RequestEditorFn) (*CatRandomTextResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.