Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AnyContentTypeBinaryStringSchemaDefaultDef
- type AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetContentType() string
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetResponse() AnyContentTypeBinaryStringSchemaDefaultDef
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetStatusCode() int
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetContentType(val string)
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetResponse(val AnyContentTypeBinaryStringSchemaDefaultDef)
- func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetStatusCode(val int)
- type AnyContentTypeBinaryStringSchemaOK
- type AnyContentTypeBinaryStringSchemaOKHeaders
- func (s *AnyContentTypeBinaryStringSchemaOKHeaders) GetContentType() string
- func (s *AnyContentTypeBinaryStringSchemaOKHeaders) GetResponse() AnyContentTypeBinaryStringSchemaOK
- func (s *AnyContentTypeBinaryStringSchemaOKHeaders) SetContentType(val string)
- func (s *AnyContentTypeBinaryStringSchemaOKHeaders) SetResponse(val AnyContentTypeBinaryStringSchemaOK)
- type Client
- func (c *Client) AnyContentTypeBinaryStringSchema(ctx context.Context) (*AnyContentTypeBinaryStringSchemaOKHeaders, error)
- func (c *Client) AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, error)
- func (c *Client) Combined(ctx context.Context, params CombinedParams) (CombinedRes, error)
- func (c *Client) Headers200(ctx context.Context) (*Headers200OK, error)
- func (c *Client) HeadersCombined(ctx context.Context, params HeadersCombinedParams) (HeadersCombinedRes, error)
- func (c *Client) HeadersDefault(ctx context.Context) (*HeadersDefaultDef, error)
- func (c *Client) HeadersJSON(ctx context.Context) (*HeadersJSONOK, error)
- func (c *Client) HeadersPattern(ctx context.Context) (*HeadersPattern4XX, error)
- func (c *Client) IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (IntersectPatternCodeRes, error)
- func (c *Client) MultipleGenericResponses(ctx context.Context) (MultipleGenericResponsesRes, error)
- func (c *Client) OctetStreamBinaryStringSchema(ctx context.Context) (OctetStreamBinaryStringSchemaOK, error)
- func (c *Client) OctetStreamEmptySchema(ctx context.Context) (OctetStreamEmptySchemaOK, error)
- func (c *Client) OptionalHeaders(ctx context.Context) (*OptionalHeadersOK, error)
- func (c *Client) StreamJSON(ctx context.Context, params StreamJSONParams) (StreamJSONRes, error)
- func (c *Client) TextPlainBinaryStringSchema(ctx context.Context) (TextPlainBinaryStringSchemaOK, error)
- type ClientOption
- type Combined2XXStatusCode
- type Combined5XXStatusCode
- type CombinedDefStatusCode
- type CombinedOK
- type CombinedParams
- type CombinedRes
- type CombinedType
- type Error
- type ErrorHandler
- type Handler
- type Headers200OK
- type HeadersCombined4XX
- type HeadersCombinedDef
- type HeadersCombinedOK
- type HeadersCombinedParams
- type HeadersCombinedRes
- type HeadersCombinedType
- type HeadersDefaultDef
- type HeadersJSONOK
- type HeadersPattern4XX
- type IntersectPatternCode2XXStatusCode
- type IntersectPatternCodeOKApplicationJSON
- func (s *IntersectPatternCodeOKApplicationJSON) Decode(d *jx.Decoder) error
- func (s IntersectPatternCodeOKApplicationJSON) Encode(e *jx.Encoder)
- func (s IntersectPatternCodeOKApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *IntersectPatternCodeOKApplicationJSON) UnmarshalJSON(data []byte) error
- type IntersectPatternCodeParams
- type IntersectPatternCodeRes
- type Invoker
- type Labeler
- type Middleware
- type MultipleGenericResponsesRes
- type NilInt
- func (o *NilInt) Decode(d *jx.Decoder) error
- func (o NilInt) Encode(e *jx.Encoder)
- func (o NilInt) Get() (v int, ok bool)
- func (o NilInt) IsNull() bool
- func (s NilInt) MarshalJSON() ([]byte, error)
- func (o NilInt) Or(d int) int
- func (o *NilInt) SetTo(v int)
- func (o *NilInt) SetToNull()
- func (s *NilInt) UnmarshalJSON(data []byte) error
- type NilString
- func (o *NilString) Decode(d *jx.Decoder) error
- func (o NilString) Encode(e *jx.Encoder)
- func (o NilString) Get() (v string, ok bool)
- func (o NilString) IsNull() bool
- func (s NilString) MarshalJSON() ([]byte, error)
- func (o NilString) Or(d string) string
- func (o *NilString) SetTo(v string)
- func (o *NilString) SetToNull()
- func (s *NilString) UnmarshalJSON(data []byte) error
- type OctetStreamBinaryStringSchemaOK
- type OctetStreamEmptySchemaOK
- type OptString
- type Option
- type OptionalHeadersOK
- type QueryData
- type Route
- 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 StreamJSONParams
- type StreamJSONRes
- type TextPlainBinaryStringSchemaOK
- type UnimplementedHandler
- func (UnimplementedHandler) AnyContentTypeBinaryStringSchema(ctx context.Context) (r *AnyContentTypeBinaryStringSchemaOKHeaders, _ error)
- func (UnimplementedHandler) AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (r *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, _ error)
- func (UnimplementedHandler) Combined(ctx context.Context, params CombinedParams) (r CombinedRes, _ error)
- func (UnimplementedHandler) Headers200(ctx context.Context) (r *Headers200OK, _ error)
- func (UnimplementedHandler) HeadersCombined(ctx context.Context, params HeadersCombinedParams) (r HeadersCombinedRes, _ error)
- func (UnimplementedHandler) HeadersDefault(ctx context.Context) (r *HeadersDefaultDef, _ error)
- func (UnimplementedHandler) HeadersJSON(ctx context.Context) (r *HeadersJSONOK, _ error)
- func (UnimplementedHandler) HeadersPattern(ctx context.Context) (r *HeadersPattern4XX, _ error)
- func (UnimplementedHandler) IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (r IntersectPatternCodeRes, _ error)
- func (UnimplementedHandler) MultipleGenericResponses(ctx context.Context) (r MultipleGenericResponsesRes, _ error)
- func (UnimplementedHandler) OctetStreamBinaryStringSchema(ctx context.Context) (r OctetStreamBinaryStringSchemaOK, _ error)
- func (UnimplementedHandler) OctetStreamEmptySchema(ctx context.Context) (r OctetStreamEmptySchemaOK, _ error)
- func (UnimplementedHandler) OptionalHeaders(ctx context.Context) (r *OptionalHeadersOK, _ error)
- func (UnimplementedHandler) StreamJSON(ctx context.Context, params StreamJSONParams) (r StreamJSONRes, _ error)
- func (UnimplementedHandler) TextPlainBinaryStringSchema(ctx context.Context) (r TextPlainBinaryStringSchemaOK, _ 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders ¶
type AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders struct { StatusCode int ContentType string Response AnyContentTypeBinaryStringSchemaDefaultDef }
AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders wraps AnyContentTypeBinaryStringSchemaDefaultDef with status code and response headers.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetContentType ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetContentType() string
GetContentType returns the value of ContentType.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetResponse ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetResponse() AnyContentTypeBinaryStringSchemaDefaultDef
GetResponse returns the value of Response.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetStatusCode ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetContentType ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetContentType(val string)
SetContentType sets the value of ContentType.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetResponse ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetResponse(val AnyContentTypeBinaryStringSchemaDefaultDef)
SetResponse sets the value of Response.
func (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetStatusCode ¶
func (s *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type AnyContentTypeBinaryStringSchemaOKHeaders ¶
type AnyContentTypeBinaryStringSchemaOKHeaders struct { ContentType string Response AnyContentTypeBinaryStringSchemaOK }
AnyContentTypeBinaryStringSchemaOKHeaders wraps AnyContentTypeBinaryStringSchemaOK with response headers.
func (*AnyContentTypeBinaryStringSchemaOKHeaders) GetContentType ¶
func (s *AnyContentTypeBinaryStringSchemaOKHeaders) GetContentType() string
GetContentType returns the value of ContentType.
func (*AnyContentTypeBinaryStringSchemaOKHeaders) GetResponse ¶
func (s *AnyContentTypeBinaryStringSchemaOKHeaders) GetResponse() AnyContentTypeBinaryStringSchemaOK
GetResponse returns the value of Response.
func (*AnyContentTypeBinaryStringSchemaOKHeaders) SetContentType ¶
func (s *AnyContentTypeBinaryStringSchemaOKHeaders) SetContentType(val string)
SetContentType sets the value of ContentType.
func (*AnyContentTypeBinaryStringSchemaOKHeaders) SetResponse ¶
func (s *AnyContentTypeBinaryStringSchemaOKHeaders) SetResponse(val AnyContentTypeBinaryStringSchemaOK)
SetResponse sets the value of Response.
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) AnyContentTypeBinaryStringSchema ¶
func (c *Client) AnyContentTypeBinaryStringSchema(ctx context.Context) (*AnyContentTypeBinaryStringSchemaOKHeaders, error)
AnyContentTypeBinaryStringSchema invokes anyContentTypeBinaryStringSchema operation.
GET /anyContentTypeBinaryStringSchema
func (*Client) AnyContentTypeBinaryStringSchemaDefault ¶
func (c *Client) AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, error)
AnyContentTypeBinaryStringSchemaDefault invokes anyContentTypeBinaryStringSchemaDefault operation.
GET /anyContentTypeBinaryStringSchemaDefault
func (*Client) Combined ¶
func (c *Client) Combined(ctx context.Context, params CombinedParams) (CombinedRes, error)
Combined invokes combined operation.
GET /combined
func (*Client) Headers200 ¶
func (c *Client) Headers200(ctx context.Context) (*Headers200OK, error)
Headers200 invokes headers200 operation.
GET /headers200
func (*Client) HeadersCombined ¶
func (c *Client) HeadersCombined(ctx context.Context, params HeadersCombinedParams) (HeadersCombinedRes, error)
HeadersCombined invokes headersCombined operation.
GET /headersCombined
func (*Client) HeadersDefault ¶
func (c *Client) HeadersDefault(ctx context.Context) (*HeadersDefaultDef, error)
HeadersDefault invokes headersDefault operation.
GET /headersDefault
func (*Client) HeadersJSON ¶
func (c *Client) HeadersJSON(ctx context.Context) (*HeadersJSONOK, error)
HeadersJSON invokes headersJSON operation.
GET /headersJSON
func (*Client) HeadersPattern ¶
func (c *Client) HeadersPattern(ctx context.Context) (*HeadersPattern4XX, error)
HeadersPattern invokes headersPattern operation.
GET /headersPattern
func (*Client) IntersectPatternCode ¶
func (c *Client) IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (IntersectPatternCodeRes, error)
IntersectPatternCode invokes intersectPatternCode operation.
If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
GET /intersectPatternCode
func (*Client) MultipleGenericResponses ¶
func (c *Client) MultipleGenericResponses(ctx context.Context) (MultipleGenericResponsesRes, error)
MultipleGenericResponses invokes multipleGenericResponses operation.
GET /multipleGenericResponses
func (*Client) OctetStreamBinaryStringSchema ¶
func (c *Client) OctetStreamBinaryStringSchema(ctx context.Context) (OctetStreamBinaryStringSchemaOK, error)
OctetStreamBinaryStringSchema invokes octetStreamBinaryStringSchema operation.
GET /octetStreamBinaryStringSchema
func (*Client) OctetStreamEmptySchema ¶
func (c *Client) OctetStreamEmptySchema(ctx context.Context) (OctetStreamEmptySchemaOK, error)
OctetStreamEmptySchema invokes octetStreamEmptySchema operation.
GET /octetStreamEmptySchema
func (*Client) OptionalHeaders ¶
func (c *Client) OptionalHeaders(ctx context.Context) (*OptionalHeadersOK, error)
OptionalHeaders invokes optionalHeaders operation.
Https://github.com/jghiloni/ogen/issues/822.
GET /optionalHeaders
func (*Client) StreamJSON ¶
func (c *Client) StreamJSON(ctx context.Context, params StreamJSONParams) (StreamJSONRes, error)
StreamJSON invokes streamJSON operation.
POST /streamJSON
func (*Client) TextPlainBinaryStringSchema ¶
func (c *Client) TextPlainBinaryStringSchema(ctx context.Context) (TextPlainBinaryStringSchemaOK, error)
TextPlainBinaryStringSchema invokes textPlainBinaryStringSchema operation.
GET /textPlainBinaryStringSchema
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 Combined2XXStatusCode ¶
Combined2XXStatusCode wraps int with StatusCode.
func (*Combined2XXStatusCode) GetResponse ¶
func (s *Combined2XXStatusCode) GetResponse() int
GetResponse returns the value of Response.
func (*Combined2XXStatusCode) GetStatusCode ¶
func (s *Combined2XXStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*Combined2XXStatusCode) SetResponse ¶
func (s *Combined2XXStatusCode) SetResponse(val int)
SetResponse sets the value of Response.
func (*Combined2XXStatusCode) SetStatusCode ¶
func (s *Combined2XXStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type Combined5XXStatusCode ¶
Combined5XXStatusCode wraps bool with StatusCode.
func (*Combined5XXStatusCode) GetResponse ¶
func (s *Combined5XXStatusCode) GetResponse() bool
GetResponse returns the value of Response.
func (*Combined5XXStatusCode) GetStatusCode ¶
func (s *Combined5XXStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*Combined5XXStatusCode) SetResponse ¶
func (s *Combined5XXStatusCode) SetResponse(val bool)
SetResponse sets the value of Response.
func (*Combined5XXStatusCode) SetStatusCode ¶
func (s *Combined5XXStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type CombinedDefStatusCode ¶
CombinedDefStatusCode wraps []string with StatusCode.
func (*CombinedDefStatusCode) GetResponse ¶
func (s *CombinedDefStatusCode) GetResponse() []string
GetResponse returns the value of Response.
func (*CombinedDefStatusCode) GetStatusCode ¶
func (s *CombinedDefStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*CombinedDefStatusCode) SetResponse ¶
func (s *CombinedDefStatusCode) SetResponse(val []string)
SetResponse sets the value of Response.
func (*CombinedDefStatusCode) SetStatusCode ¶
func (s *CombinedDefStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*CombinedDefStatusCode) Validate ¶
func (s *CombinedDefStatusCode) Validate() error
type CombinedOK ¶
type CombinedOK struct {
Ok string `json:"ok"`
}
func (*CombinedOK) Decode ¶
func (s *CombinedOK) Decode(d *jx.Decoder) error
Decode decodes CombinedOK from json.
func (*CombinedOK) Encode ¶
func (s *CombinedOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CombinedOK) MarshalJSON ¶
func (s *CombinedOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CombinedOK) UnmarshalJSON ¶
func (s *CombinedOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CombinedParams ¶
type CombinedParams struct {
Type CombinedType
}
CombinedParams is parameters of combined operation.
type CombinedRes ¶
type CombinedRes interface {
// contains filtered or unexported methods
}
type CombinedType ¶
type CombinedType string
const ( CombinedType200 CombinedType = "200" CombinedType2XX CombinedType = "2XX" CombinedType5XX CombinedType = "5XX" CombinedTypeDefault CombinedType = "default" )
func (CombinedType) AllValues ¶
func (CombinedType) AllValues() []CombinedType
AllValues returns all CombinedType values.
func (CombinedType) MarshalText ¶
func (s CombinedType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CombinedType) UnmarshalText ¶
func (s *CombinedType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CombinedType) Validate ¶
func (s CombinedType) Validate() error
type Error ¶
type Error struct {
Error string `json:"error"`
}
Ref: #/components/schemas/Error
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface { // AnyContentTypeBinaryStringSchema implements anyContentTypeBinaryStringSchema operation. // // GET /anyContentTypeBinaryStringSchema AnyContentTypeBinaryStringSchema(ctx context.Context) (*AnyContentTypeBinaryStringSchemaOKHeaders, error) // AnyContentTypeBinaryStringSchemaDefault implements anyContentTypeBinaryStringSchemaDefault operation. // // GET /anyContentTypeBinaryStringSchemaDefault AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, error) // Combined implements combined operation. // // GET /combined Combined(ctx context.Context, params CombinedParams) (CombinedRes, error) // Headers200 implements headers200 operation. // // GET /headers200 Headers200(ctx context.Context) (*Headers200OK, error) // HeadersCombined implements headersCombined operation. // // GET /headersCombined HeadersCombined(ctx context.Context, params HeadersCombinedParams) (HeadersCombinedRes, error) // HeadersDefault implements headersDefault operation. // // GET /headersDefault HeadersDefault(ctx context.Context) (*HeadersDefaultDef, error) // HeadersJSON implements headersJSON operation. // // GET /headersJSON HeadersJSON(ctx context.Context) (*HeadersJSONOK, error) // HeadersPattern implements headersPattern operation. // // GET /headersPattern HeadersPattern(ctx context.Context) (*HeadersPattern4XX, error) // IntersectPatternCode implements intersectPatternCode operation. // // If a response is defined using an explicit code, the explicit code definition takes precedence // over the range definition for that code. // // GET /intersectPatternCode IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (IntersectPatternCodeRes, error) // MultipleGenericResponses implements multipleGenericResponses operation. // // GET /multipleGenericResponses MultipleGenericResponses(ctx context.Context) (MultipleGenericResponsesRes, error) // OctetStreamBinaryStringSchema implements octetStreamBinaryStringSchema operation. // // GET /octetStreamBinaryStringSchema OctetStreamBinaryStringSchema(ctx context.Context) (OctetStreamBinaryStringSchemaOK, error) // OctetStreamEmptySchema implements octetStreamEmptySchema operation. // // GET /octetStreamEmptySchema OctetStreamEmptySchema(ctx context.Context) (OctetStreamEmptySchemaOK, error) // OptionalHeaders implements optionalHeaders operation. // // Https://github.com/jghiloni/ogen/issues/822. // // GET /optionalHeaders OptionalHeaders(ctx context.Context) (*OptionalHeadersOK, error) // StreamJSON implements streamJSON operation. // // POST /streamJSON StreamJSON(ctx context.Context, params StreamJSONParams) (StreamJSONRes, error) // TextPlainBinaryStringSchema implements textPlainBinaryStringSchema operation. // // GET /textPlainBinaryStringSchema TextPlainBinaryStringSchema(ctx context.Context) (TextPlainBinaryStringSchemaOK, error) }
Handler handles operations described by OpenAPI v3 specification.
type Headers200OK ¶
type Headers200OK struct {
XTestHeader string
}
Headers200OK is response for Headers200 operation.
func (*Headers200OK) GetXTestHeader ¶
func (s *Headers200OK) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*Headers200OK) SetXTestHeader ¶
func (s *Headers200OK) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type HeadersCombined4XX ¶
HeadersCombined4XX is 4XX pattern response for HeadersCombined operation.
func (*HeadersCombined4XX) GetStatusCode ¶
func (s *HeadersCombined4XX) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*HeadersCombined4XX) GetXTestHeader ¶
func (s *HeadersCombined4XX) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*HeadersCombined4XX) SetStatusCode ¶
func (s *HeadersCombined4XX) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*HeadersCombined4XX) SetXTestHeader ¶
func (s *HeadersCombined4XX) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type HeadersCombinedDef ¶
HeadersCombinedDef is default response for HeadersCombined operation.
func (*HeadersCombinedDef) GetStatusCode ¶
func (s *HeadersCombinedDef) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*HeadersCombinedDef) GetXTestHeader ¶
func (s *HeadersCombinedDef) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*HeadersCombinedDef) SetStatusCode ¶
func (s *HeadersCombinedDef) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*HeadersCombinedDef) SetXTestHeader ¶
func (s *HeadersCombinedDef) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type HeadersCombinedOK ¶
type HeadersCombinedOK struct {
XTestHeader string
}
HeadersCombinedOK is response for HeadersCombined operation.
func (*HeadersCombinedOK) GetXTestHeader ¶
func (s *HeadersCombinedOK) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*HeadersCombinedOK) SetXTestHeader ¶
func (s *HeadersCombinedOK) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type HeadersCombinedParams ¶
type HeadersCombinedParams struct {
Type HeadersCombinedType
}
HeadersCombinedParams is parameters of headersCombined operation.
type HeadersCombinedRes ¶
type HeadersCombinedRes interface {
// contains filtered or unexported methods
}
type HeadersCombinedType ¶
type HeadersCombinedType string
const ( HeadersCombinedType200 HeadersCombinedType = "200" HeadersCombinedTypeDefault HeadersCombinedType = "default" HeadersCombinedType4XX HeadersCombinedType = "4XX" )
func (HeadersCombinedType) AllValues ¶
func (HeadersCombinedType) AllValues() []HeadersCombinedType
AllValues returns all HeadersCombinedType values.
func (HeadersCombinedType) MarshalText ¶
func (s HeadersCombinedType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*HeadersCombinedType) UnmarshalText ¶
func (s *HeadersCombinedType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (HeadersCombinedType) Validate ¶
func (s HeadersCombinedType) Validate() error
type HeadersDefaultDef ¶
HeadersDefaultDef is default response for HeadersDefault operation.
func (*HeadersDefaultDef) GetStatusCode ¶
func (s *HeadersDefaultDef) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*HeadersDefaultDef) GetXTestHeader ¶
func (s *HeadersDefaultDef) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*HeadersDefaultDef) SetStatusCode ¶
func (s *HeadersDefaultDef) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*HeadersDefaultDef) SetXTestHeader ¶
func (s *HeadersDefaultDef) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type HeadersJSONOK ¶
HeadersJSONOK is response for HeadersJSON operation.
func (*HeadersJSONOK) GetXJSONCustomHeader ¶
func (s *HeadersJSONOK) GetXJSONCustomHeader() jx.Raw
GetXJSONCustomHeader returns the value of XJSONCustomHeader.
func (*HeadersJSONOK) GetXJSONHeader ¶
func (s *HeadersJSONOK) GetXJSONHeader() User
GetXJSONHeader returns the value of XJSONHeader.
func (*HeadersJSONOK) SetXJSONCustomHeader ¶
func (s *HeadersJSONOK) SetXJSONCustomHeader(val jx.Raw)
SetXJSONCustomHeader sets the value of XJSONCustomHeader.
func (*HeadersJSONOK) SetXJSONHeader ¶
func (s *HeadersJSONOK) SetXJSONHeader(val User)
SetXJSONHeader sets the value of XJSONHeader.
func (*HeadersJSONOK) Validate ¶
func (s *HeadersJSONOK) Validate() error
type HeadersPattern4XX ¶
HeadersPattern4XX is 4XX pattern response for HeadersPattern operation.
func (*HeadersPattern4XX) GetStatusCode ¶
func (s *HeadersPattern4XX) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*HeadersPattern4XX) GetXTestHeader ¶
func (s *HeadersPattern4XX) GetXTestHeader() string
GetXTestHeader returns the value of XTestHeader.
func (*HeadersPattern4XX) SetStatusCode ¶
func (s *HeadersPattern4XX) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*HeadersPattern4XX) SetXTestHeader ¶
func (s *HeadersPattern4XX) SetXTestHeader(val string)
SetXTestHeader sets the value of XTestHeader.
type IntersectPatternCode2XXStatusCode ¶
IntersectPatternCode2XXStatusCode wraps int with StatusCode.
func (*IntersectPatternCode2XXStatusCode) GetResponse ¶
func (s *IntersectPatternCode2XXStatusCode) GetResponse() int
GetResponse returns the value of Response.
func (*IntersectPatternCode2XXStatusCode) GetStatusCode ¶
func (s *IntersectPatternCode2XXStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*IntersectPatternCode2XXStatusCode) SetResponse ¶
func (s *IntersectPatternCode2XXStatusCode) SetResponse(val int)
SetResponse sets the value of Response.
func (*IntersectPatternCode2XXStatusCode) SetStatusCode ¶
func (s *IntersectPatternCode2XXStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type IntersectPatternCodeOKApplicationJSON ¶
type IntersectPatternCodeOKApplicationJSON string
func (*IntersectPatternCodeOKApplicationJSON) Decode ¶
func (s *IntersectPatternCodeOKApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes IntersectPatternCodeOKApplicationJSON from json.
func (IntersectPatternCodeOKApplicationJSON) Encode ¶
func (s IntersectPatternCodeOKApplicationJSON) Encode(e *jx.Encoder)
Encode encodes IntersectPatternCodeOKApplicationJSON as json.
func (IntersectPatternCodeOKApplicationJSON) MarshalJSON ¶
func (s IntersectPatternCodeOKApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*IntersectPatternCodeOKApplicationJSON) UnmarshalJSON ¶
func (s *IntersectPatternCodeOKApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type IntersectPatternCodeParams ¶
type IntersectPatternCodeParams struct {
Code int
}
IntersectPatternCodeParams is parameters of intersectPatternCode operation.
type IntersectPatternCodeRes ¶
type IntersectPatternCodeRes interface {
// contains filtered or unexported methods
}
type Invoker ¶
type Invoker interface { // AnyContentTypeBinaryStringSchema invokes anyContentTypeBinaryStringSchema operation. // // GET /anyContentTypeBinaryStringSchema AnyContentTypeBinaryStringSchema(ctx context.Context) (*AnyContentTypeBinaryStringSchemaOKHeaders, error) // AnyContentTypeBinaryStringSchemaDefault invokes anyContentTypeBinaryStringSchemaDefault operation. // // GET /anyContentTypeBinaryStringSchemaDefault AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (*AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, error) // Combined invokes combined operation. // // GET /combined Combined(ctx context.Context, params CombinedParams) (CombinedRes, error) // Headers200 invokes headers200 operation. // // GET /headers200 Headers200(ctx context.Context) (*Headers200OK, error) // HeadersCombined invokes headersCombined operation. // // GET /headersCombined HeadersCombined(ctx context.Context, params HeadersCombinedParams) (HeadersCombinedRes, error) // HeadersDefault invokes headersDefault operation. // // GET /headersDefault HeadersDefault(ctx context.Context) (*HeadersDefaultDef, error) // HeadersJSON invokes headersJSON operation. // // GET /headersJSON HeadersJSON(ctx context.Context) (*HeadersJSONOK, error) // HeadersPattern invokes headersPattern operation. // // GET /headersPattern HeadersPattern(ctx context.Context) (*HeadersPattern4XX, error) // IntersectPatternCode invokes intersectPatternCode operation. // // If a response is defined using an explicit code, the explicit code definition takes precedence // over the range definition for that code. // // GET /intersectPatternCode IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (IntersectPatternCodeRes, error) // MultipleGenericResponses invokes multipleGenericResponses operation. // // GET /multipleGenericResponses MultipleGenericResponses(ctx context.Context) (MultipleGenericResponsesRes, error) // OctetStreamBinaryStringSchema invokes octetStreamBinaryStringSchema operation. // // GET /octetStreamBinaryStringSchema OctetStreamBinaryStringSchema(ctx context.Context) (OctetStreamBinaryStringSchemaOK, error) // OctetStreamEmptySchema invokes octetStreamEmptySchema operation. // // GET /octetStreamEmptySchema OctetStreamEmptySchema(ctx context.Context) (OctetStreamEmptySchemaOK, error) // OptionalHeaders invokes optionalHeaders operation. // // Https://github.com/jghiloni/ogen/issues/822. // // GET /optionalHeaders OptionalHeaders(ctx context.Context) (*OptionalHeadersOK, error) // StreamJSON invokes streamJSON operation. // // POST /streamJSON StreamJSON(ctx context.Context, params StreamJSONParams) (StreamJSONRes, error) // TextPlainBinaryStringSchema invokes textPlainBinaryStringSchema operation. // // GET /textPlainBinaryStringSchema TextPlainBinaryStringSchema(ctx context.Context) (TextPlainBinaryStringSchemaOK, 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 MultipleGenericResponsesRes ¶
type MultipleGenericResponsesRes interface {
// contains filtered or unexported methods
}
type NilInt ¶
NilInt is nullable int.
func (NilInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*NilInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type NilString ¶
NilString is nullable string.
func NewNilString ¶
NewNilString returns new NilString with value set to v.
func (NilString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*NilString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set 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 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 OptionalHeadersOK ¶
OptionalHeadersOK is response for OptionalHeaders operation.
func (*OptionalHeadersOK) GetXOptional ¶
func (s *OptionalHeadersOK) GetXOptional() OptString
GetXOptional returns the value of XOptional.
func (*OptionalHeadersOK) GetXRequired ¶
func (s *OptionalHeadersOK) GetXRequired() string
GetXRequired returns the value of XRequired.
func (*OptionalHeadersOK) SetXOptional ¶
func (s *OptionalHeadersOK) SetXOptional(val OptString)
SetXOptional sets the value of XOptional.
func (*OptionalHeadersOK) SetXRequired ¶
func (s *OptionalHeadersOK) SetXRequired(val string)
SetXRequired sets the value of XRequired.
type QueryData ¶
type QueryData []float64
func (QueryData) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*QueryData) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
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 StreamJSONParams ¶
type StreamJSONParams struct {
Count int
}
StreamJSONParams is parameters of streamJSON operation.
type StreamJSONRes ¶
type StreamJSONRes interface {
// contains filtered or unexported methods
}
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) AnyContentTypeBinaryStringSchema ¶
func (UnimplementedHandler) AnyContentTypeBinaryStringSchema(ctx context.Context) (r *AnyContentTypeBinaryStringSchemaOKHeaders, _ error)
AnyContentTypeBinaryStringSchema implements anyContentTypeBinaryStringSchema operation.
GET /anyContentTypeBinaryStringSchema
func (UnimplementedHandler) AnyContentTypeBinaryStringSchemaDefault ¶
func (UnimplementedHandler) AnyContentTypeBinaryStringSchemaDefault(ctx context.Context) (r *AnyContentTypeBinaryStringSchemaDefaultDefStatusCodeWithHeaders, _ error)
AnyContentTypeBinaryStringSchemaDefault implements anyContentTypeBinaryStringSchemaDefault operation.
GET /anyContentTypeBinaryStringSchemaDefault
func (UnimplementedHandler) Combined ¶
func (UnimplementedHandler) Combined(ctx context.Context, params CombinedParams) (r CombinedRes, _ error)
Combined implements combined operation.
GET /combined
func (UnimplementedHandler) Headers200 ¶
func (UnimplementedHandler) Headers200(ctx context.Context) (r *Headers200OK, _ error)
Headers200 implements headers200 operation.
GET /headers200
func (UnimplementedHandler) HeadersCombined ¶
func (UnimplementedHandler) HeadersCombined(ctx context.Context, params HeadersCombinedParams) (r HeadersCombinedRes, _ error)
HeadersCombined implements headersCombined operation.
GET /headersCombined
func (UnimplementedHandler) HeadersDefault ¶
func (UnimplementedHandler) HeadersDefault(ctx context.Context) (r *HeadersDefaultDef, _ error)
HeadersDefault implements headersDefault operation.
GET /headersDefault
func (UnimplementedHandler) HeadersJSON ¶
func (UnimplementedHandler) HeadersJSON(ctx context.Context) (r *HeadersJSONOK, _ error)
HeadersJSON implements headersJSON operation.
GET /headersJSON
func (UnimplementedHandler) HeadersPattern ¶
func (UnimplementedHandler) HeadersPattern(ctx context.Context) (r *HeadersPattern4XX, _ error)
HeadersPattern implements headersPattern operation.
GET /headersPattern
func (UnimplementedHandler) IntersectPatternCode ¶
func (UnimplementedHandler) IntersectPatternCode(ctx context.Context, params IntersectPatternCodeParams) (r IntersectPatternCodeRes, _ error)
IntersectPatternCode implements intersectPatternCode operation.
If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
GET /intersectPatternCode
func (UnimplementedHandler) MultipleGenericResponses ¶
func (UnimplementedHandler) MultipleGenericResponses(ctx context.Context) (r MultipleGenericResponsesRes, _ error)
MultipleGenericResponses implements multipleGenericResponses operation.
GET /multipleGenericResponses
func (UnimplementedHandler) OctetStreamBinaryStringSchema ¶
func (UnimplementedHandler) OctetStreamBinaryStringSchema(ctx context.Context) (r OctetStreamBinaryStringSchemaOK, _ error)
OctetStreamBinaryStringSchema implements octetStreamBinaryStringSchema operation.
GET /octetStreamBinaryStringSchema
func (UnimplementedHandler) OctetStreamEmptySchema ¶
func (UnimplementedHandler) OctetStreamEmptySchema(ctx context.Context) (r OctetStreamEmptySchemaOK, _ error)
OctetStreamEmptySchema implements octetStreamEmptySchema operation.
GET /octetStreamEmptySchema
func (UnimplementedHandler) OptionalHeaders ¶
func (UnimplementedHandler) OptionalHeaders(ctx context.Context) (r *OptionalHeadersOK, _ error)
OptionalHeaders implements optionalHeaders operation.
Https://github.com/jghiloni/ogen/issues/822.
GET /optionalHeaders
func (UnimplementedHandler) StreamJSON ¶
func (UnimplementedHandler) StreamJSON(ctx context.Context, params StreamJSONParams) (r StreamJSONRes, _ error)
StreamJSON implements streamJSON operation.
POST /streamJSON
func (UnimplementedHandler) TextPlainBinaryStringSchema ¶
func (UnimplementedHandler) TextPlainBinaryStringSchema(ctx context.Context) (r TextPlainBinaryStringSchemaOK, _ error)
TextPlainBinaryStringSchema implements textPlainBinaryStringSchema operation.
GET /textPlainBinaryStringSchema
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_interfaces_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_validators_gen.go