Documentation ¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error
- func (c *Client) ContentQueryParameter(ctx context.Context, params ContentQueryParameterParams) (string, error)
- func (c *Client) HeaderParameter(ctx context.Context, params HeaderParameterParams) (*Hash, error)
- func (c *Client) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error)
- func (c *Client) PathObjectParameter(ctx context.Context, params PathObjectParameterParams) (*User, error)
- func (c *Client) SameName(ctx context.Context, params SameNameParams) error
- type ClientOption
- type ComplicatedParameterNameGetOK
- type ComplicatedParameterNameGetParams
- type ContentQueryParameterParam
- func (s *ContentQueryParameterParam) Decode(d *jx.Decoder) error
- func (s *ContentQueryParameterParam) Encode(e *jx.Encoder)
- func (s *ContentQueryParameterParam) GetFilter() string
- func (s *ContentQueryParameterParam) GetMax() int
- func (s *ContentQueryParameterParam) GetMin() int
- func (s *ContentQueryParameterParam) GetStyle() string
- func (s *ContentQueryParameterParam) MarshalJSON() ([]byte, error)
- func (s *ContentQueryParameterParam) SetFilter(val string)
- func (s *ContentQueryParameterParam) SetMax(val int)
- func (s *ContentQueryParameterParam) SetMin(val int)
- func (s *ContentQueryParameterParam) SetStyle(val string)
- func (s *ContentQueryParameterParam) UnmarshalJSON(data []byte) error
- type ContentQueryParameterParams
- type ErrorHandler
- type Handler
- type Hash
- func (s *Hash) Decode(d *jx.Decoder) error
- func (s *Hash) Encode(e *jx.Encoder)
- func (s *Hash) GetHex() string
- func (s *Hash) GetRaw() []byte
- func (s *Hash) MarshalJSON() ([]byte, error)
- func (s *Hash) SetHex(val string)
- func (s *Hash) SetRaw(val []byte)
- func (s *Hash) UnmarshalJSON(data []byte) error
- func (s *Hash) Validate() error
- type HeaderParameterParams
- type Middleware
- type ObjectQueryParameterDeepObject
- func (s *ObjectQueryParameterDeepObject) DecodeURI(d uri.Decoder) error
- func (s *ObjectQueryParameterDeepObject) EncodeURI(e uri.Encoder) error
- func (s *ObjectQueryParameterDeepObject) GetFilter() string
- func (s *ObjectQueryParameterDeepObject) GetMax() int
- func (s *ObjectQueryParameterDeepObject) GetMin() int
- func (s *ObjectQueryParameterDeepObject) SetFilter(val string)
- func (s *ObjectQueryParameterDeepObject) SetMax(val int)
- func (s *ObjectQueryParameterDeepObject) SetMin(val int)
- type ObjectQueryParameterFormObject
- func (s *ObjectQueryParameterFormObject) DecodeURI(d uri.Decoder) error
- func (s *ObjectQueryParameterFormObject) EncodeURI(e uri.Encoder) error
- func (s *ObjectQueryParameterFormObject) GetFilter() string
- func (s *ObjectQueryParameterFormObject) GetMax() int
- func (s *ObjectQueryParameterFormObject) GetMin() int
- func (s *ObjectQueryParameterFormObject) SetFilter(val string)
- func (s *ObjectQueryParameterFormObject) SetMax(val int)
- func (s *ObjectQueryParameterFormObject) SetMin(val int)
- type ObjectQueryParameterOK
- func (s *ObjectQueryParameterOK) Decode(d *jx.Decoder) error
- func (s *ObjectQueryParameterOK) Encode(e *jx.Encoder)
- func (s *ObjectQueryParameterOK) GetFilter() string
- func (s *ObjectQueryParameterOK) GetMax() int
- func (s *ObjectQueryParameterOK) GetMin() int
- func (s *ObjectQueryParameterOK) GetStyle() string
- func (s *ObjectQueryParameterOK) MarshalJSON() ([]byte, error)
- func (s *ObjectQueryParameterOK) SetFilter(val string)
- func (s *ObjectQueryParameterOK) SetMax(val int)
- func (s *ObjectQueryParameterOK) SetMin(val int)
- func (s *ObjectQueryParameterOK) SetStyle(val string)
- func (s *ObjectQueryParameterOK) UnmarshalJSON(data []byte) error
- type ObjectQueryParameterParams
- type OptContentQueryParameterParam
- func (o *OptContentQueryParameterParam) Decode(d *jx.Decoder) error
- func (o OptContentQueryParameterParam) Encode(e *jx.Encoder)
- func (o OptContentQueryParameterParam) Get() (v ContentQueryParameterParam, ok bool)
- func (o OptContentQueryParameterParam) IsSet() bool
- func (s OptContentQueryParameterParam) MarshalJSON() ([]byte, error)
- func (o OptContentQueryParameterParam) Or(d ContentQueryParameterParam) ContentQueryParameterParam
- func (o *OptContentQueryParameterParam) Reset()
- func (o *OptContentQueryParameterParam) SetTo(v ContentQueryParameterParam)
- func (s *OptContentQueryParameterParam) UnmarshalJSON(data []byte) error
- type OptObjectQueryParameterDeepObject
- func (o OptObjectQueryParameterDeepObject) Get() (v ObjectQueryParameterDeepObject, ok bool)
- func (o OptObjectQueryParameterDeepObject) IsSet() bool
- func (o OptObjectQueryParameterDeepObject) Or(d ObjectQueryParameterDeepObject) ObjectQueryParameterDeepObject
- func (o *OptObjectQueryParameterDeepObject) Reset()
- func (o *OptObjectQueryParameterDeepObject) SetTo(v ObjectQueryParameterDeepObject)
- type OptObjectQueryParameterFormObject
- func (o OptObjectQueryParameterFormObject) Get() (v ObjectQueryParameterFormObject, ok bool)
- func (o OptObjectQueryParameterFormObject) IsSet() bool
- func (o OptObjectQueryParameterFormObject) Or(d ObjectQueryParameterFormObject) ObjectQueryParameterFormObject
- func (o *OptObjectQueryParameterFormObject) Reset()
- func (o *OptObjectQueryParameterFormObject) SetTo(v ObjectQueryParameterFormObject)
- type Option
- type PathObjectParameterParams
- type Route
- type SameNameOK
- type SameNameParams
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error
- func (UnimplementedHandler) ContentQueryParameter(ctx context.Context, params ContentQueryParameterParams) (r string, _ error)
- func (UnimplementedHandler) HeaderParameter(ctx context.Context, params HeaderParameterParams) (r *Hash, _ error)
- func (UnimplementedHandler) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (r *ObjectQueryParameterOK, _ error)
- func (UnimplementedHandler) PathObjectParameter(ctx context.Context, params PathObjectParameterParams) (r *User, _ error)
- func (UnimplementedHandler) SameName(ctx context.Context, params SameNameParams) error
- type User
- func (s *User) Decode(d *jx.Decoder) error
- func (s *User) Encode(e *jx.Encoder)
- func (s *User) GetFriends() []User
- func (s *User) GetID() int
- func (s *User) GetRole() UserRole
- func (s *User) GetUsername() string
- func (s *User) MarshalJSON() ([]byte, error)
- func (s *User) SetFriends(val []User)
- func (s *User) SetID(val int)
- func (s *User) SetRole(val UserRole)
- func (s *User) SetUsername(val string)
- func (s *User) UnmarshalJSON(data []byte) error
- func (s *User) Validate() error
- type UserRole
- func (s *UserRole) Decode(d *jx.Decoder) error
- func (s UserRole) Encode(e *jx.Encoder)
- func (s UserRole) MarshalJSON() ([]byte, error)
- func (s UserRole) MarshalText() ([]byte, error)
- func (s *UserRole) UnmarshalJSON(data []byte) error
- func (s *UserRole) UnmarshalText(data []byte) error
- func (s UserRole) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) ComplicatedParameterNameGet ¶
func (c *Client) ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error
ComplicatedParameterNameGet invokes GET /complicatedParameterName operation.
GET /complicatedParameterName
func (*Client) ContentQueryParameter ¶
func (c *Client) ContentQueryParameter(ctx context.Context, params ContentQueryParameterParams) (string, error)
ContentQueryParameter invokes contentQueryParameter operation.
GET /contentQueryParameter
func (*Client) HeaderParameter ¶
HeaderParameter invokes headerParameter operation.
Test for header param.
GET /headerParameter
func (*Client) ObjectQueryParameter ¶
func (c *Client) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error)
ObjectQueryParameter invokes objectQueryParameter operation.
GET /objectQueryParameter
func (*Client) PathObjectParameter ¶
func (c *Client) PathObjectParameter(ctx context.Context, params PathObjectParameterParams) (*User, error)
PathObjectParameter invokes pathObjectParameter operation.
GET /pathObjectParameter/{param}
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type ComplicatedParameterNameGetOK ¶
type ComplicatedParameterNameGetOK struct{}
ComplicatedParameterNameGetOK is response for ComplicatedParameterNameGet operation.
type ComplicatedParameterNameGetParams ¶
type ComplicatedParameterNameGetParams struct { Eq string Plus string Question string And string Percent string }
ComplicatedParameterNameGetParams is parameters of GET /complicatedParameterName operation.
type ContentQueryParameterParam ¶
type ContentQueryParameterParam struct { Style string `json:"style"` Min int `json:"min"` Max int `json:"max"` Filter string `json:"filter"` }
func (*ContentQueryParameterParam) Decode ¶
func (s *ContentQueryParameterParam) Decode(d *jx.Decoder) error
Decode decodes ContentQueryParameterParam from json.
func (*ContentQueryParameterParam) Encode ¶
func (s *ContentQueryParameterParam) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ContentQueryParameterParam) GetFilter ¶
func (s *ContentQueryParameterParam) GetFilter() string
GetFilter returns the value of Filter.
func (*ContentQueryParameterParam) GetMax ¶
func (s *ContentQueryParameterParam) GetMax() int
GetMax returns the value of Max.
func (*ContentQueryParameterParam) GetMin ¶
func (s *ContentQueryParameterParam) GetMin() int
GetMin returns the value of Min.
func (*ContentQueryParameterParam) GetStyle ¶
func (s *ContentQueryParameterParam) GetStyle() string
GetStyle returns the value of Style.
func (*ContentQueryParameterParam) MarshalJSON ¶
func (s *ContentQueryParameterParam) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ContentQueryParameterParam) SetFilter ¶
func (s *ContentQueryParameterParam) SetFilter(val string)
SetFilter sets the value of Filter.
func (*ContentQueryParameterParam) SetMax ¶
func (s *ContentQueryParameterParam) SetMax(val int)
SetMax sets the value of Max.
func (*ContentQueryParameterParam) SetMin ¶
func (s *ContentQueryParameterParam) SetMin(val int)
SetMin sets the value of Min.
func (*ContentQueryParameterParam) SetStyle ¶
func (s *ContentQueryParameterParam) SetStyle(val string)
SetStyle sets the value of Style.
func (*ContentQueryParameterParam) UnmarshalJSON ¶
func (s *ContentQueryParameterParam) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ContentQueryParameterParams ¶
type ContentQueryParameterParams struct {
Param OptContentQueryParameterParam
}
ContentQueryParameterParams is parameters of contentQueryParameter operation.
type Handler ¶
type Handler interface { // ComplicatedParameterNameGet implements GET /complicatedParameterName operation. // // GET /complicatedParameterName ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error // ContentQueryParameter implements contentQueryParameter operation. // // GET /contentQueryParameter ContentQueryParameter(ctx context.Context, params ContentQueryParameterParams) (string, error) // HeaderParameter implements headerParameter operation. // // Test for header param. // // GET /headerParameter HeaderParameter(ctx context.Context, params HeaderParameterParams) (*Hash, error) // ObjectQueryParameter implements objectQueryParameter operation. // // GET /objectQueryParameter ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error) // PathObjectParameter implements pathObjectParameter operation. // // GET /pathObjectParameter/{param} PathObjectParameter(ctx context.Context, params PathObjectParameterParams) (*User, error) // SameName implements sameName operation. // // Parameter with different location, but the same name. // // GET /same_name/{path} SameName(ctx context.Context, params SameNameParams) error }
Handler handles operations described by OpenAPI v3 specification.
type Hash ¶
Ref: #/components/schemas/Hash
func (*Hash) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Hash) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type HeaderParameterParams ¶
type HeaderParameterParams struct {
XAuthToken string
}
HeaderParameterParams is parameters of headerParameter operation.
type ObjectQueryParameterDeepObject ¶
type ObjectQueryParameterDeepObject struct { Min int `json:"min"` Max int `json:"max"` Filter string `json:"filter"` }
func (*ObjectQueryParameterDeepObject) DecodeURI ¶
func (s *ObjectQueryParameterDeepObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes ObjectQueryParameterDeepObject from URI form.
func (*ObjectQueryParameterDeepObject) EncodeURI ¶
func (s *ObjectQueryParameterDeepObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes ObjectQueryParameterDeepObject as URI form.
func (*ObjectQueryParameterDeepObject) GetFilter ¶
func (s *ObjectQueryParameterDeepObject) GetFilter() string
GetFilter returns the value of Filter.
func (*ObjectQueryParameterDeepObject) GetMax ¶
func (s *ObjectQueryParameterDeepObject) GetMax() int
GetMax returns the value of Max.
func (*ObjectQueryParameterDeepObject) GetMin ¶
func (s *ObjectQueryParameterDeepObject) GetMin() int
GetMin returns the value of Min.
func (*ObjectQueryParameterDeepObject) SetFilter ¶
func (s *ObjectQueryParameterDeepObject) SetFilter(val string)
SetFilter sets the value of Filter.
func (*ObjectQueryParameterDeepObject) SetMax ¶
func (s *ObjectQueryParameterDeepObject) SetMax(val int)
SetMax sets the value of Max.
func (*ObjectQueryParameterDeepObject) SetMin ¶
func (s *ObjectQueryParameterDeepObject) SetMin(val int)
SetMin sets the value of Min.
type ObjectQueryParameterFormObject ¶
type ObjectQueryParameterFormObject struct { Min int `json:"min"` Max int `json:"max"` Filter string `json:"filter"` }
func (*ObjectQueryParameterFormObject) DecodeURI ¶
func (s *ObjectQueryParameterFormObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes ObjectQueryParameterFormObject from URI form.
func (*ObjectQueryParameterFormObject) EncodeURI ¶
func (s *ObjectQueryParameterFormObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes ObjectQueryParameterFormObject as URI form.
func (*ObjectQueryParameterFormObject) GetFilter ¶
func (s *ObjectQueryParameterFormObject) GetFilter() string
GetFilter returns the value of Filter.
func (*ObjectQueryParameterFormObject) GetMax ¶
func (s *ObjectQueryParameterFormObject) GetMax() int
GetMax returns the value of Max.
func (*ObjectQueryParameterFormObject) GetMin ¶
func (s *ObjectQueryParameterFormObject) GetMin() int
GetMin returns the value of Min.
func (*ObjectQueryParameterFormObject) SetFilter ¶
func (s *ObjectQueryParameterFormObject) SetFilter(val string)
SetFilter sets the value of Filter.
func (*ObjectQueryParameterFormObject) SetMax ¶
func (s *ObjectQueryParameterFormObject) SetMax(val int)
SetMax sets the value of Max.
func (*ObjectQueryParameterFormObject) SetMin ¶
func (s *ObjectQueryParameterFormObject) SetMin(val int)
SetMin sets the value of Min.
type ObjectQueryParameterOK ¶
type ObjectQueryParameterOK struct { Style string `json:"style"` Min int `json:"min"` Max int `json:"max"` Filter string `json:"filter"` }
func (*ObjectQueryParameterOK) Decode ¶
func (s *ObjectQueryParameterOK) Decode(d *jx.Decoder) error
Decode decodes ObjectQueryParameterOK from json.
func (*ObjectQueryParameterOK) Encode ¶
func (s *ObjectQueryParameterOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ObjectQueryParameterOK) GetFilter ¶
func (s *ObjectQueryParameterOK) GetFilter() string
GetFilter returns the value of Filter.
func (*ObjectQueryParameterOK) GetMax ¶
func (s *ObjectQueryParameterOK) GetMax() int
GetMax returns the value of Max.
func (*ObjectQueryParameterOK) GetMin ¶
func (s *ObjectQueryParameterOK) GetMin() int
GetMin returns the value of Min.
func (*ObjectQueryParameterOK) GetStyle ¶
func (s *ObjectQueryParameterOK) GetStyle() string
GetStyle returns the value of Style.
func (*ObjectQueryParameterOK) MarshalJSON ¶
func (s *ObjectQueryParameterOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ObjectQueryParameterOK) SetFilter ¶
func (s *ObjectQueryParameterOK) SetFilter(val string)
SetFilter sets the value of Filter.
func (*ObjectQueryParameterOK) SetMax ¶
func (s *ObjectQueryParameterOK) SetMax(val int)
SetMax sets the value of Max.
func (*ObjectQueryParameterOK) SetMin ¶
func (s *ObjectQueryParameterOK) SetMin(val int)
SetMin sets the value of Min.
func (*ObjectQueryParameterOK) SetStyle ¶
func (s *ObjectQueryParameterOK) SetStyle(val string)
SetStyle sets the value of Style.
func (*ObjectQueryParameterOK) UnmarshalJSON ¶
func (s *ObjectQueryParameterOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ObjectQueryParameterParams ¶
type ObjectQueryParameterParams struct { FormObject OptObjectQueryParameterFormObject DeepObject OptObjectQueryParameterDeepObject }
ObjectQueryParameterParams is parameters of objectQueryParameter operation.
type OptContentQueryParameterParam ¶
type OptContentQueryParameterParam struct { Value ContentQueryParameterParam Set bool }
OptContentQueryParameterParam is optional ContentQueryParameterParam.
func NewOptContentQueryParameterParam ¶
func NewOptContentQueryParameterParam(v ContentQueryParameterParam) OptContentQueryParameterParam
NewOptContentQueryParameterParam returns new OptContentQueryParameterParam with value set to v.
func (*OptContentQueryParameterParam) Decode ¶
func (o *OptContentQueryParameterParam) Decode(d *jx.Decoder) error
Decode decodes ContentQueryParameterParam from json.
func (OptContentQueryParameterParam) Encode ¶
func (o OptContentQueryParameterParam) Encode(e *jx.Encoder)
Encode encodes ContentQueryParameterParam as json.
func (OptContentQueryParameterParam) Get ¶
func (o OptContentQueryParameterParam) Get() (v ContentQueryParameterParam, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptContentQueryParameterParam) IsSet ¶
func (o OptContentQueryParameterParam) IsSet() bool
IsSet returns true if OptContentQueryParameterParam was set.
func (OptContentQueryParameterParam) MarshalJSON ¶
func (s OptContentQueryParameterParam) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptContentQueryParameterParam) Reset ¶
func (o *OptContentQueryParameterParam) Reset()
Reset unsets value.
func (*OptContentQueryParameterParam) SetTo ¶
func (o *OptContentQueryParameterParam) SetTo(v ContentQueryParameterParam)
SetTo sets value to v.
func (*OptContentQueryParameterParam) UnmarshalJSON ¶
func (s *OptContentQueryParameterParam) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptObjectQueryParameterDeepObject ¶
type OptObjectQueryParameterDeepObject struct { Value ObjectQueryParameterDeepObject Set bool }
OptObjectQueryParameterDeepObject is optional ObjectQueryParameterDeepObject.
func NewOptObjectQueryParameterDeepObject ¶
func NewOptObjectQueryParameterDeepObject(v ObjectQueryParameterDeepObject) OptObjectQueryParameterDeepObject
NewOptObjectQueryParameterDeepObject returns new OptObjectQueryParameterDeepObject with value set to v.
func (OptObjectQueryParameterDeepObject) Get ¶
func (o OptObjectQueryParameterDeepObject) Get() (v ObjectQueryParameterDeepObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptObjectQueryParameterDeepObject) IsSet ¶
func (o OptObjectQueryParameterDeepObject) IsSet() bool
IsSet returns true if OptObjectQueryParameterDeepObject was set.
func (OptObjectQueryParameterDeepObject) Or ¶
func (o OptObjectQueryParameterDeepObject) Or(d ObjectQueryParameterDeepObject) ObjectQueryParameterDeepObject
Or returns value if set, or given parameter if does not.
func (*OptObjectQueryParameterDeepObject) Reset ¶
func (o *OptObjectQueryParameterDeepObject) Reset()
Reset unsets value.
func (*OptObjectQueryParameterDeepObject) SetTo ¶
func (o *OptObjectQueryParameterDeepObject) SetTo(v ObjectQueryParameterDeepObject)
SetTo sets value to v.
type OptObjectQueryParameterFormObject ¶
type OptObjectQueryParameterFormObject struct { Value ObjectQueryParameterFormObject Set bool }
OptObjectQueryParameterFormObject is optional ObjectQueryParameterFormObject.
func NewOptObjectQueryParameterFormObject ¶
func NewOptObjectQueryParameterFormObject(v ObjectQueryParameterFormObject) OptObjectQueryParameterFormObject
NewOptObjectQueryParameterFormObject returns new OptObjectQueryParameterFormObject with value set to v.
func (OptObjectQueryParameterFormObject) Get ¶
func (o OptObjectQueryParameterFormObject) Get() (v ObjectQueryParameterFormObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptObjectQueryParameterFormObject) IsSet ¶
func (o OptObjectQueryParameterFormObject) IsSet() bool
IsSet returns true if OptObjectQueryParameterFormObject was set.
func (OptObjectQueryParameterFormObject) Or ¶
func (o OptObjectQueryParameterFormObject) Or(d ObjectQueryParameterFormObject) ObjectQueryParameterFormObject
Or returns value if set, or given parameter if does not.
func (*OptObjectQueryParameterFormObject) Reset ¶
func (o *OptObjectQueryParameterFormObject) Reset()
Reset unsets value.
func (*OptObjectQueryParameterFormObject) SetTo ¶
func (o *OptObjectQueryParameterFormObject) SetTo(v ObjectQueryParameterFormObject)
SetTo sets value to v.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the metric.NewNoopMeterProvider is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type PathObjectParameterParams ¶
type PathObjectParameterParams struct {
Param User
}
PathObjectParameterParams is parameters of pathObjectParameter operation.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SameNameParams ¶
type SameNameParams struct {
// contains filtered or unexported fields
}
SameNameParams is parameters of sameName operation.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) ComplicatedParameterNameGet ¶
func (UnimplementedHandler) ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error
ComplicatedParameterNameGet implements GET /complicatedParameterName operation.
GET /complicatedParameterName
func (UnimplementedHandler) ContentQueryParameter ¶
func (UnimplementedHandler) ContentQueryParameter(ctx context.Context, params ContentQueryParameterParams) (r string, _ error)
ContentQueryParameter implements contentQueryParameter operation.
GET /contentQueryParameter
func (UnimplementedHandler) HeaderParameter ¶
func (UnimplementedHandler) HeaderParameter(ctx context.Context, params HeaderParameterParams) (r *Hash, _ error)
HeaderParameter implements headerParameter operation.
Test for header param.
GET /headerParameter
func (UnimplementedHandler) ObjectQueryParameter ¶
func (UnimplementedHandler) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (r *ObjectQueryParameterOK, _ error)
ObjectQueryParameter implements objectQueryParameter operation.
GET /objectQueryParameter
func (UnimplementedHandler) PathObjectParameter ¶
func (UnimplementedHandler) PathObjectParameter(ctx context.Context, params PathObjectParameterParams) (r *User, _ error)
PathObjectParameter implements pathObjectParameter operation.
GET /pathObjectParameter/{param}
func (UnimplementedHandler) SameName ¶
func (UnimplementedHandler) SameName(ctx context.Context, params SameNameParams) error
SameName implements sameName operation.
Parameter with different location, but the same name.
GET /same_name/{path}
type User ¶
type User struct { ID int `json:"id"` Username string `json:"username"` Role UserRole `json:"role"` Friends []User `json:"friends"` }
Ref: #/components/schemas/User
func (*User) GetFriends ¶
GetFriends returns the value of Friends.
func (*User) GetUsername ¶
GetUsername returns the value of Username.
func (*User) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*User) SetFriends ¶
SetFriends sets the value of Friends.
func (*User) SetUsername ¶
SetUsername sets the value of Username.
func (*User) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type UserRole ¶
type UserRole string
func (UserRole) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (UserRole) MarshalText ¶
MarshalText implements encoding.TextMarshaler.
func (*UserRole) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
func (*UserRole) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler.
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_uri_gen.go
- oas_validators_gen.go