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) ContentParameters(ctx context.Context, params ContentParametersParams) (*ContentParameters, error)
- func (c *Client) CookieParameter(ctx context.Context, params CookieParameterParams) (*Value, error)
- func (c *Client) HeaderParameter(ctx context.Context, params HeaderParameterParams) (*Value, error)
- func (c *Client) ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (*OneLevelObject, error)
- func (c *Client) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error)
- func (c *Client) OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (string, error)
- func (c *Client) PathParameter(ctx context.Context, params PathParameterParams) (*Value, error)
- func (c *Client) SameName(ctx context.Context, params SameNameParams) error
- func (c *Client) SimilarNames(ctx context.Context, params SimilarNamesParams) error
- type ClientOption
- type ComplicatedParameterNameGetOK
- type ComplicatedParameterNameGetParams
- type ContentParameters
- func (s *ContentParameters) Decode(d *jx.Decoder) error
- func (s *ContentParameters) Encode(e *jx.Encoder)
- func (s *ContentParameters) GetCookie() User
- func (s *ContentParameters) GetHeader() User
- func (s *ContentParameters) GetPath() User
- func (s *ContentParameters) GetQuery() User
- func (s *ContentParameters) MarshalJSON() ([]byte, error)
- func (s *ContentParameters) SetCookie(val User)
- func (s *ContentParameters) SetHeader(val User)
- func (s *ContentParameters) SetPath(val User)
- func (s *ContentParameters) SetQuery(val User)
- func (s *ContentParameters) UnmarshalJSON(data []byte) error
- func (s *ContentParameters) Validate() error
- type ContentParametersParams
- type CookieParameterParams
- type ErrorHandler
- type Handler
- type HeaderParameterParams
- type Invoker
- type Labeler
- type Middleware
- type ObjectCookieParameterParams
- type ObjectQueryParameterOK
- func (s *ObjectQueryParameterOK) Decode(d *jx.Decoder) error
- func (s *ObjectQueryParameterOK) Encode(e *jx.Encoder)
- func (s *ObjectQueryParameterOK) GetStyle() string
- func (s *ObjectQueryParameterOK) GetValue() OneLevelObject
- func (s *ObjectQueryParameterOK) MarshalJSON() ([]byte, error)
- func (s *ObjectQueryParameterOK) SetStyle(val string)
- func (s *ObjectQueryParameterOK) SetValue(val OneLevelObject)
- func (s *ObjectQueryParameterOK) UnmarshalJSON(data []byte) error
- type ObjectQueryParameterParams
- type OneLevelObject
- func (s *OneLevelObject) Decode(d *jx.Decoder) error
- func (s *OneLevelObject) DecodeURI(d uri.Decoder) error
- func (s *OneLevelObject) Encode(e *jx.Encoder)
- func (s *OneLevelObject) EncodeURI(e uri.Encoder) error
- func (s *OneLevelObject) GetFilter() string
- func (s *OneLevelObject) GetMax() int
- func (s *OneLevelObject) GetMin() int
- func (s *OneLevelObject) MarshalJSON() ([]byte, error)
- func (s *OneLevelObject) SetFilter(val string)
- func (s *OneLevelObject) SetMax(val int)
- func (s *OneLevelObject) SetMin(val int)
- func (s *OneLevelObject) UnmarshalJSON(data []byte) error
- type OptOneLevelObject
- func (o *OptOneLevelObject) Decode(d *jx.Decoder) error
- func (o OptOneLevelObject) Encode(e *jx.Encoder)
- func (o OptOneLevelObject) Get() (v OneLevelObject, ok bool)
- func (o OptOneLevelObject) IsSet() bool
- func (s OptOneLevelObject) MarshalJSON() ([]byte, error)
- func (o OptOneLevelObject) Or(d OneLevelObject) OneLevelObject
- func (o *OptOneLevelObject) Reset()
- func (o *OptOneLevelObject) SetTo(v OneLevelObject)
- func (s *OptOneLevelObject) UnmarshalJSON(data []byte) error
- type Option
- type OptionalArrayParameterParams
- type PathParameterParams
- 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 SimilarNamesOK
- type SimilarNamesParams
- type UnimplementedHandler
- func (UnimplementedHandler) ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error
- func (UnimplementedHandler) ContentParameters(ctx context.Context, params ContentParametersParams) (r *ContentParameters, _ error)
- func (UnimplementedHandler) CookieParameter(ctx context.Context, params CookieParameterParams) (r *Value, _ error)
- func (UnimplementedHandler) HeaderParameter(ctx context.Context, params HeaderParameterParams) (r *Value, _ error)
- func (UnimplementedHandler) ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (r *OneLevelObject, _ error)
- func (UnimplementedHandler) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (r *ObjectQueryParameterOK, _ error)
- func (UnimplementedHandler) OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (r string, _ error)
- func (UnimplementedHandler) PathParameter(ctx context.Context, params PathParameterParams) (r *Value, _ error)
- func (UnimplementedHandler) SameName(ctx context.Context, params SameNameParams) error
- func (UnimplementedHandler) SimilarNames(ctx context.Context, params SimilarNamesParams) 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 (UserRole) AllValues() []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
- type Value
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) ContentParameters ¶
func (c *Client) ContentParameters(ctx context.Context, params ContentParametersParams) (*ContentParameters, error)
ContentParameters invokes contentParameters operation.
GET /contentParameters/{path}
func (*Client) CookieParameter ¶
CookieParameter invokes cookieParameter operation.
Test for cookie param.
GET /cookieParameter
func (*Client) HeaderParameter ¶
HeaderParameter invokes headerParameter operation.
Test for header param.
GET /headerParameter
func (*Client) ObjectCookieParameter ¶
func (c *Client) ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (*OneLevelObject, error)
ObjectCookieParameter invokes objectCookieParameter operation.
GET /objectCookieParameter
func (*Client) ObjectQueryParameter ¶
func (c *Client) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error)
ObjectQueryParameter invokes objectQueryParameter operation.
GET /objectQueryParameter
func (*Client) OptionalArrayParameter ¶
func (c *Client) OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (string, error)
OptionalArrayParameter invokes optionalArrayParameter operation.
GET /optionalArrayParameter
func (*Client) PathParameter ¶
PathParameter invokes pathParameter operation.
Test for path param.
GET /pathParameter/{value}
func (*Client) SameName ¶
func (c *Client) SameName(ctx context.Context, params SameNameParams) error
SameName invokes sameName operation.
Parameters with different location, but with the same name.
GET /same_name/{param}
func (*Client) SimilarNames ¶
func (c *Client) SimilarNames(ctx context.Context, params SimilarNamesParams) error
SimilarNames invokes similarNames operation.
Parameters with different location, but with similar names.
GET /similarNames
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 ContentParameters ¶
type ContentParameters struct { Query User `json:"query"` Path User `json:"path"` Header User `json:"header"` Cookie User `json:"cookie"` }
func (*ContentParameters) Decode ¶
func (s *ContentParameters) Decode(d *jx.Decoder) error
Decode decodes ContentParameters from json.
func (*ContentParameters) Encode ¶
func (s *ContentParameters) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ContentParameters) GetCookie ¶
func (s *ContentParameters) GetCookie() User
GetCookie returns the value of Cookie.
func (*ContentParameters) GetHeader ¶
func (s *ContentParameters) GetHeader() User
GetHeader returns the value of Header.
func (*ContentParameters) GetPath ¶
func (s *ContentParameters) GetPath() User
GetPath returns the value of Path.
func (*ContentParameters) GetQuery ¶
func (s *ContentParameters) GetQuery() User
GetQuery returns the value of Query.
func (*ContentParameters) MarshalJSON ¶
func (s *ContentParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ContentParameters) SetCookie ¶
func (s *ContentParameters) SetCookie(val User)
SetCookie sets the value of Cookie.
func (*ContentParameters) SetHeader ¶
func (s *ContentParameters) SetHeader(val User)
SetHeader sets the value of Header.
func (*ContentParameters) SetPath ¶
func (s *ContentParameters) SetPath(val User)
SetPath sets the value of Path.
func (*ContentParameters) SetQuery ¶
func (s *ContentParameters) SetQuery(val User)
SetQuery sets the value of Query.
func (*ContentParameters) UnmarshalJSON ¶
func (s *ContentParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ContentParameters) Validate ¶
func (s *ContentParameters) Validate() error
type ContentParametersParams ¶
ContentParametersParams is parameters of contentParameters operation.
type CookieParameterParams ¶
type CookieParameterParams struct {
Value string
}
CookieParameterParams is parameters of cookieParameter operation.
type Handler ¶
type Handler interface { // ComplicatedParameterNameGet implements GET /complicatedParameterName operation. // // GET /complicatedParameterName ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error // ContentParameters implements contentParameters operation. // // GET /contentParameters/{path} ContentParameters(ctx context.Context, params ContentParametersParams) (*ContentParameters, error) // CookieParameter implements cookieParameter operation. // // Test for cookie param. // // GET /cookieParameter CookieParameter(ctx context.Context, params CookieParameterParams) (*Value, error) // HeaderParameter implements headerParameter operation. // // Test for header param. // // GET /headerParameter HeaderParameter(ctx context.Context, params HeaderParameterParams) (*Value, error) // ObjectCookieParameter implements objectCookieParameter operation. // // GET /objectCookieParameter ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (*OneLevelObject, error) // ObjectQueryParameter implements objectQueryParameter operation. // // GET /objectQueryParameter ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error) // OptionalArrayParameter implements optionalArrayParameter operation. // // GET /optionalArrayParameter OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (string, error) // PathParameter implements pathParameter operation. // // Test for path param. // // GET /pathParameter/{value} PathParameter(ctx context.Context, params PathParameterParams) (*Value, error) // SameName implements sameName operation. // // Parameters with different location, but with the same name. // // GET /same_name/{param} SameName(ctx context.Context, params SameNameParams) error // SimilarNames implements similarNames operation. // // Parameters with different location, but with similar names. // // GET /similarNames SimilarNames(ctx context.Context, params SimilarNamesParams) error }
Handler handles operations described by OpenAPI v3 specification.
type HeaderParameterParams ¶
type HeaderParameterParams struct {
XValue string
}
HeaderParameterParams is parameters of headerParameter operation.
type Invoker ¶
type Invoker interface { // ComplicatedParameterNameGet invokes GET /complicatedParameterName operation. // // GET /complicatedParameterName ComplicatedParameterNameGet(ctx context.Context, params ComplicatedParameterNameGetParams) error // ContentParameters invokes contentParameters operation. // // GET /contentParameters/{path} ContentParameters(ctx context.Context, params ContentParametersParams) (*ContentParameters, error) // CookieParameter invokes cookieParameter operation. // // Test for cookie param. // // GET /cookieParameter CookieParameter(ctx context.Context, params CookieParameterParams) (*Value, error) // HeaderParameter invokes headerParameter operation. // // Test for header param. // // GET /headerParameter HeaderParameter(ctx context.Context, params HeaderParameterParams) (*Value, error) // ObjectCookieParameter invokes objectCookieParameter operation. // // GET /objectCookieParameter ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (*OneLevelObject, error) // ObjectQueryParameter invokes objectQueryParameter operation. // // GET /objectQueryParameter ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (*ObjectQueryParameterOK, error) // OptionalArrayParameter invokes optionalArrayParameter operation. // // GET /optionalArrayParameter OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (string, error) // PathParameter invokes pathParameter operation. // // Test for path param. // // GET /pathParameter/{value} PathParameter(ctx context.Context, params PathParameterParams) (*Value, error) // SameName invokes sameName operation. // // Parameters with different location, but with the same name. // // GET /same_name/{param} SameName(ctx context.Context, params SameNameParams) error // SimilarNames invokes similarNames operation. // // Parameters with different location, but with similar names. // // GET /similarNames SimilarNames(ctx context.Context, params SimilarNamesParams) error }
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type ObjectCookieParameterParams ¶
type ObjectCookieParameterParams struct {
Value OneLevelObject
}
ObjectCookieParameterParams is parameters of objectCookieParameter operation.
type ObjectQueryParameterOK ¶
type ObjectQueryParameterOK struct { Style string `json:"style"` Value OneLevelObject `json:"value"` }
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) GetStyle ¶
func (s *ObjectQueryParameterOK) GetStyle() string
GetStyle returns the value of Style.
func (*ObjectQueryParameterOK) GetValue ¶
func (s *ObjectQueryParameterOK) GetValue() OneLevelObject
GetValue returns the value of Value.
func (*ObjectQueryParameterOK) MarshalJSON ¶
func (s *ObjectQueryParameterOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ObjectQueryParameterOK) SetStyle ¶
func (s *ObjectQueryParameterOK) SetStyle(val string)
SetStyle sets the value of Style.
func (*ObjectQueryParameterOK) SetValue ¶
func (s *ObjectQueryParameterOK) SetValue(val OneLevelObject)
SetValue sets the value of Value.
func (*ObjectQueryParameterOK) UnmarshalJSON ¶
func (s *ObjectQueryParameterOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ObjectQueryParameterParams ¶
type ObjectQueryParameterParams struct { FormObject OptOneLevelObject DeepObject OptOneLevelObject }
ObjectQueryParameterParams is parameters of objectQueryParameter operation.
type OneLevelObject ¶
type OneLevelObject struct { Min int `json:"min"` Max int `json:"max"` Filter string `json:"filter"` }
Ref: #/components/schemas/OneLevelObject
func (*OneLevelObject) Decode ¶
func (s *OneLevelObject) Decode(d *jx.Decoder) error
Decode decodes OneLevelObject from json.
func (*OneLevelObject) DecodeURI ¶
func (s *OneLevelObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes OneLevelObject from URI form.
func (*OneLevelObject) Encode ¶
func (s *OneLevelObject) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*OneLevelObject) EncodeURI ¶
func (s *OneLevelObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes OneLevelObject as URI form.
func (*OneLevelObject) GetFilter ¶
func (s *OneLevelObject) GetFilter() string
GetFilter returns the value of Filter.
func (*OneLevelObject) GetMax ¶
func (s *OneLevelObject) GetMax() int
GetMax returns the value of Max.
func (*OneLevelObject) GetMin ¶
func (s *OneLevelObject) GetMin() int
GetMin returns the value of Min.
func (*OneLevelObject) MarshalJSON ¶
func (s *OneLevelObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OneLevelObject) SetFilter ¶
func (s *OneLevelObject) SetFilter(val string)
SetFilter sets the value of Filter.
func (*OneLevelObject) SetMax ¶
func (s *OneLevelObject) SetMax(val int)
SetMax sets the value of Max.
func (*OneLevelObject) SetMin ¶
func (s *OneLevelObject) SetMin(val int)
SetMin sets the value of Min.
func (*OneLevelObject) UnmarshalJSON ¶
func (s *OneLevelObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptOneLevelObject ¶
type OptOneLevelObject struct { Value OneLevelObject Set bool }
OptOneLevelObject is optional OneLevelObject.
func NewOptOneLevelObject ¶
func NewOptOneLevelObject(v OneLevelObject) OptOneLevelObject
NewOptOneLevelObject returns new OptOneLevelObject with value set to v.
func (*OptOneLevelObject) Decode ¶
func (o *OptOneLevelObject) Decode(d *jx.Decoder) error
Decode decodes OneLevelObject from json.
func (OptOneLevelObject) Encode ¶
func (o OptOneLevelObject) Encode(e *jx.Encoder)
Encode encodes OneLevelObject as json.
func (OptOneLevelObject) Get ¶
func (o OptOneLevelObject) Get() (v OneLevelObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptOneLevelObject) IsSet ¶
func (o OptOneLevelObject) IsSet() bool
IsSet returns true if OptOneLevelObject was set.
func (OptOneLevelObject) MarshalJSON ¶
func (s OptOneLevelObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptOneLevelObject) Or ¶
func (o OptOneLevelObject) Or(d OneLevelObject) OneLevelObject
Or returns value if set, or given parameter if does not.
func (*OptOneLevelObject) SetTo ¶
func (o *OptOneLevelObject) SetTo(v OneLevelObject)
SetTo sets value to v.
func (*OptOneLevelObject) UnmarshalJSON ¶
func (s *OptOneLevelObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
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 otel.GetMeterProvider() 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 OptionalArrayParameterParams ¶
OptionalArrayParameterParams is parameters of optionalArrayParameter operation.
type PathParameterParams ¶
type PathParameterParams struct {
Value string
}
PathParameterParams is parameters of pathParameter operation.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SameNameParams ¶
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 SimilarNamesOK ¶
type SimilarNamesOK struct{}
SimilarNamesOK is response for SimilarNames operation.
type SimilarNamesParams ¶
SimilarNamesParams is parameters of similarNames operation.
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) ContentParameters ¶
func (UnimplementedHandler) ContentParameters(ctx context.Context, params ContentParametersParams) (r *ContentParameters, _ error)
ContentParameters implements contentParameters operation.
GET /contentParameters/{path}
func (UnimplementedHandler) CookieParameter ¶
func (UnimplementedHandler) CookieParameter(ctx context.Context, params CookieParameterParams) (r *Value, _ error)
CookieParameter implements cookieParameter operation.
Test for cookie param.
GET /cookieParameter
func (UnimplementedHandler) HeaderParameter ¶
func (UnimplementedHandler) HeaderParameter(ctx context.Context, params HeaderParameterParams) (r *Value, _ error)
HeaderParameter implements headerParameter operation.
Test for header param.
GET /headerParameter
func (UnimplementedHandler) ObjectCookieParameter ¶
func (UnimplementedHandler) ObjectCookieParameter(ctx context.Context, params ObjectCookieParameterParams) (r *OneLevelObject, _ error)
ObjectCookieParameter implements objectCookieParameter operation.
GET /objectCookieParameter
func (UnimplementedHandler) ObjectQueryParameter ¶
func (UnimplementedHandler) ObjectQueryParameter(ctx context.Context, params ObjectQueryParameterParams) (r *ObjectQueryParameterOK, _ error)
ObjectQueryParameter implements objectQueryParameter operation.
GET /objectQueryParameter
func (UnimplementedHandler) OptionalArrayParameter ¶
func (UnimplementedHandler) OptionalArrayParameter(ctx context.Context, params OptionalArrayParameterParams) (r string, _ error)
OptionalArrayParameter implements optionalArrayParameter operation.
GET /optionalArrayParameter
func (UnimplementedHandler) PathParameter ¶
func (UnimplementedHandler) PathParameter(ctx context.Context, params PathParameterParams) (r *Value, _ error)
PathParameter implements pathParameter operation.
Test for path param.
GET /pathParameter/{value}
func (UnimplementedHandler) SameName ¶
func (UnimplementedHandler) SameName(ctx context.Context, params SameNameParams) error
SameName implements sameName operation.
Parameters with different location, but with the same name.
GET /same_name/{param}
func (UnimplementedHandler) SimilarNames ¶
func (UnimplementedHandler) SimilarNames(ctx context.Context, params SimilarNamesParams) error
SimilarNames implements similarNames operation.
Parameters with different location, but with similar names.
GET /similarNames
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.
type Value ¶
type Value struct {
Value string `json:"value"`
}
Ref: #/components/schemas/Value
func (*Value) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Value) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_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