Documentation
¶
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- type ClientOption
- type CreateItemsOK
- type CreateItemsReq
- func (s *CreateItemsReq) Decode(d *jx.Decoder) error
- func (s *CreateItemsReq) Encode(e *jx.Encoder)
- func (s *CreateItemsReq) GetItems() []Level1
- func (s *CreateItemsReq) MarshalJSON() ([]byte, error)
- func (s *CreateItemsReq) SetItems(val []Level1)
- func (s *CreateItemsReq) UnmarshalJSON(data []byte) error
- func (s *CreateItemsReq) Validate() error
- type ErrorHandler
- type Handler
- type Invoker
- type Labeler
- type Level1
- func (s *Level1) Decode(d *jx.Decoder) error
- func (s *Level1) Encode(e *jx.Encoder)
- func (a Level1) Equal(b Level1, depth int) bool
- func (s *Level1) GetID() string
- func (s *Level1) GetNested() OptLevel2
- func (a Level1) Hash() uint64
- func (s *Level1) MarshalJSON() ([]byte, error)
- func (s *Level1) SetID(val string)
- func (s *Level1) SetNested(val OptLevel2)
- func (s *Level1) UnmarshalJSON(data []byte) error
- type Level10
- func (s *Level10) Decode(d *jx.Decoder) error
- func (s *Level10) Encode(e *jx.Encoder)
- func (a Level10) Equal(b Level10, depth int) bool
- func (s *Level10) GetNested() OptLevel11
- func (a Level10) Hash() uint64
- func (s *Level10) MarshalJSON() ([]byte, error)
- func (s *Level10) SetNested(val OptLevel11)
- func (s *Level10) UnmarshalJSON(data []byte) error
- type Level11
- func (s *Level11) Decode(d *jx.Decoder) error
- func (s *Level11) Encode(e *jx.Encoder)
- func (a Level11) Equal(b Level11, depth int) bool
- func (s *Level11) GetNested() OptLevel12
- func (a Level11) Hash() uint64
- func (s *Level11) MarshalJSON() ([]byte, error)
- func (s *Level11) SetNested(val OptLevel12)
- func (s *Level11) UnmarshalJSON(data []byte) error
- type Level12
- func (s *Level12) Decode(d *jx.Decoder) error
- func (s *Level12) Encode(e *jx.Encoder)
- func (a Level12) Equal(b Level12, depth int) bool
- func (s *Level12) GetValue() OptString
- func (a Level12) Hash() uint64
- func (s *Level12) MarshalJSON() ([]byte, error)
- func (s *Level12) SetValue(val OptString)
- func (s *Level12) UnmarshalJSON(data []byte) error
- type Level2
- func (s *Level2) Decode(d *jx.Decoder) error
- func (s *Level2) Encode(e *jx.Encoder)
- func (a Level2) Equal(b Level2, depth int) bool
- func (s *Level2) GetNested() OptLevel3
- func (a Level2) Hash() uint64
- func (s *Level2) MarshalJSON() ([]byte, error)
- func (s *Level2) SetNested(val OptLevel3)
- func (s *Level2) UnmarshalJSON(data []byte) error
- type Level3
- func (s *Level3) Decode(d *jx.Decoder) error
- func (s *Level3) Encode(e *jx.Encoder)
- func (a Level3) Equal(b Level3, depth int) bool
- func (s *Level3) GetNested() OptLevel4
- func (a Level3) Hash() uint64
- func (s *Level3) MarshalJSON() ([]byte, error)
- func (s *Level3) SetNested(val OptLevel4)
- func (s *Level3) UnmarshalJSON(data []byte) error
- type Level4
- func (s *Level4) Decode(d *jx.Decoder) error
- func (s *Level4) Encode(e *jx.Encoder)
- func (a Level4) Equal(b Level4, depth int) bool
- func (s *Level4) GetNested() OptLevel5
- func (a Level4) Hash() uint64
- func (s *Level4) MarshalJSON() ([]byte, error)
- func (s *Level4) SetNested(val OptLevel5)
- func (s *Level4) UnmarshalJSON(data []byte) error
- type Level5
- func (s *Level5) Decode(d *jx.Decoder) error
- func (s *Level5) Encode(e *jx.Encoder)
- func (a Level5) Equal(b Level5, depth int) bool
- func (s *Level5) GetNested() OptLevel6
- func (a Level5) Hash() uint64
- func (s *Level5) MarshalJSON() ([]byte, error)
- func (s *Level5) SetNested(val OptLevel6)
- func (s *Level5) UnmarshalJSON(data []byte) error
- type Level6
- func (s *Level6) Decode(d *jx.Decoder) error
- func (s *Level6) Encode(e *jx.Encoder)
- func (a Level6) Equal(b Level6, depth int) bool
- func (s *Level6) GetNested() OptLevel7
- func (a Level6) Hash() uint64
- func (s *Level6) MarshalJSON() ([]byte, error)
- func (s *Level6) SetNested(val OptLevel7)
- func (s *Level6) UnmarshalJSON(data []byte) error
- type Level7
- func (s *Level7) Decode(d *jx.Decoder) error
- func (s *Level7) Encode(e *jx.Encoder)
- func (a Level7) Equal(b Level7, depth int) bool
- func (s *Level7) GetNested() OptLevel8
- func (a Level7) Hash() uint64
- func (s *Level7) MarshalJSON() ([]byte, error)
- func (s *Level7) SetNested(val OptLevel8)
- func (s *Level7) UnmarshalJSON(data []byte) error
- type Level8
- func (s *Level8) Decode(d *jx.Decoder) error
- func (s *Level8) Encode(e *jx.Encoder)
- func (a Level8) Equal(b Level8, depth int) bool
- func (s *Level8) GetNested() OptLevel9
- func (a Level8) Hash() uint64
- func (s *Level8) MarshalJSON() ([]byte, error)
- func (s *Level8) SetNested(val OptLevel9)
- func (s *Level8) UnmarshalJSON(data []byte) error
- type Level9
- func (s *Level9) Decode(d *jx.Decoder) error
- func (s *Level9) Encode(e *jx.Encoder)
- func (a Level9) Equal(b Level9, depth int) bool
- func (s *Level9) GetNested() OptLevel10
- func (a Level9) Hash() uint64
- func (s *Level9) MarshalJSON() ([]byte, error)
- func (s *Level9) SetNested(val OptLevel10)
- func (s *Level9) UnmarshalJSON(data []byte) error
- type Middleware
- type OperationName
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptLevel10
- func (o *OptLevel10) Decode(d *jx.Decoder) error
- func (o OptLevel10) Encode(e *jx.Encoder)
- func (o OptLevel10) Get() (v Level10, ok bool)
- func (o OptLevel10) IsSet() bool
- func (s OptLevel10) MarshalJSON() ([]byte, error)
- func (o OptLevel10) Or(d Level10) Level10
- func (o *OptLevel10) Reset()
- func (o *OptLevel10) SetTo(v Level10)
- func (s *OptLevel10) UnmarshalJSON(data []byte) error
- type OptLevel11
- func (o *OptLevel11) Decode(d *jx.Decoder) error
- func (o OptLevel11) Encode(e *jx.Encoder)
- func (o OptLevel11) Get() (v Level11, ok bool)
- func (o OptLevel11) IsSet() bool
- func (s OptLevel11) MarshalJSON() ([]byte, error)
- func (o OptLevel11) Or(d Level11) Level11
- func (o *OptLevel11) Reset()
- func (o *OptLevel11) SetTo(v Level11)
- func (s *OptLevel11) UnmarshalJSON(data []byte) error
- type OptLevel12
- func (o *OptLevel12) Decode(d *jx.Decoder) error
- func (o OptLevel12) Encode(e *jx.Encoder)
- func (o OptLevel12) Get() (v Level12, ok bool)
- func (o OptLevel12) IsSet() bool
- func (s OptLevel12) MarshalJSON() ([]byte, error)
- func (o OptLevel12) Or(d Level12) Level12
- func (o *OptLevel12) Reset()
- func (o *OptLevel12) SetTo(v Level12)
- func (s *OptLevel12) UnmarshalJSON(data []byte) error
- type OptLevel2
- func (o *OptLevel2) Decode(d *jx.Decoder) error
- func (o OptLevel2) Encode(e *jx.Encoder)
- func (o OptLevel2) Get() (v Level2, ok bool)
- func (o OptLevel2) IsSet() bool
- func (s OptLevel2) MarshalJSON() ([]byte, error)
- func (o OptLevel2) Or(d Level2) Level2
- func (o *OptLevel2) Reset()
- func (o *OptLevel2) SetTo(v Level2)
- func (s *OptLevel2) UnmarshalJSON(data []byte) error
- type OptLevel3
- func (o *OptLevel3) Decode(d *jx.Decoder) error
- func (o OptLevel3) Encode(e *jx.Encoder)
- func (o OptLevel3) Get() (v Level3, ok bool)
- func (o OptLevel3) IsSet() bool
- func (s OptLevel3) MarshalJSON() ([]byte, error)
- func (o OptLevel3) Or(d Level3) Level3
- func (o *OptLevel3) Reset()
- func (o *OptLevel3) SetTo(v Level3)
- func (s *OptLevel3) UnmarshalJSON(data []byte) error
- type OptLevel4
- func (o *OptLevel4) Decode(d *jx.Decoder) error
- func (o OptLevel4) Encode(e *jx.Encoder)
- func (o OptLevel4) Get() (v Level4, ok bool)
- func (o OptLevel4) IsSet() bool
- func (s OptLevel4) MarshalJSON() ([]byte, error)
- func (o OptLevel4) Or(d Level4) Level4
- func (o *OptLevel4) Reset()
- func (o *OptLevel4) SetTo(v Level4)
- func (s *OptLevel4) UnmarshalJSON(data []byte) error
- type OptLevel5
- func (o *OptLevel5) Decode(d *jx.Decoder) error
- func (o OptLevel5) Encode(e *jx.Encoder)
- func (o OptLevel5) Get() (v Level5, ok bool)
- func (o OptLevel5) IsSet() bool
- func (s OptLevel5) MarshalJSON() ([]byte, error)
- func (o OptLevel5) Or(d Level5) Level5
- func (o *OptLevel5) Reset()
- func (o *OptLevel5) SetTo(v Level5)
- func (s *OptLevel5) UnmarshalJSON(data []byte) error
- type OptLevel6
- func (o *OptLevel6) Decode(d *jx.Decoder) error
- func (o OptLevel6) Encode(e *jx.Encoder)
- func (o OptLevel6) Get() (v Level6, ok bool)
- func (o OptLevel6) IsSet() bool
- func (s OptLevel6) MarshalJSON() ([]byte, error)
- func (o OptLevel6) Or(d Level6) Level6
- func (o *OptLevel6) Reset()
- func (o *OptLevel6) SetTo(v Level6)
- func (s *OptLevel6) UnmarshalJSON(data []byte) error
- type OptLevel7
- func (o *OptLevel7) Decode(d *jx.Decoder) error
- func (o OptLevel7) Encode(e *jx.Encoder)
- func (o OptLevel7) Get() (v Level7, ok bool)
- func (o OptLevel7) IsSet() bool
- func (s OptLevel7) MarshalJSON() ([]byte, error)
- func (o OptLevel7) Or(d Level7) Level7
- func (o *OptLevel7) Reset()
- func (o *OptLevel7) SetTo(v Level7)
- func (s *OptLevel7) UnmarshalJSON(data []byte) error
- type OptLevel8
- func (o *OptLevel8) Decode(d *jx.Decoder) error
- func (o OptLevel8) Encode(e *jx.Encoder)
- func (o OptLevel8) Get() (v Level8, ok bool)
- func (o OptLevel8) IsSet() bool
- func (s OptLevel8) MarshalJSON() ([]byte, error)
- func (o OptLevel8) Or(d Level8) Level8
- func (o *OptLevel8) Reset()
- func (o *OptLevel8) SetTo(v Level8)
- func (s *OptLevel8) UnmarshalJSON(data []byte) error
- type OptLevel9
- func (o *OptLevel9) Decode(d *jx.Decoder) error
- func (o OptLevel9) Encode(e *jx.Encoder)
- func (o OptLevel9) Get() (v Level9, ok bool)
- func (o OptLevel9) IsSet() bool
- func (s OptLevel9) MarshalJSON() ([]byte, error)
- func (o OptLevel9) Or(d Level9) Level9
- func (o *OptLevel9) Reset()
- func (o *OptLevel9) SetTo(v Level9)
- func (s *OptLevel9) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- 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 UnimplementedHandler
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) CreateItems ¶
func (c *Client) CreateItems(ctx context.Context, request *CreateItemsReq) (*CreateItemsOK, error)
CreateItems invokes createItems operation.
Create deeply nested items.
POST /test/items
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 CreateItemsOK ¶
type CreateItemsOK struct {
Created OptInt `json:"created"`
}
func (*CreateItemsOK) Decode ¶
func (s *CreateItemsOK) Decode(d *jx.Decoder) error
Decode decodes CreateItemsOK from json.
func (*CreateItemsOK) Encode ¶
func (s *CreateItemsOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateItemsOK) GetCreated ¶
func (s *CreateItemsOK) GetCreated() OptInt
GetCreated returns the value of Created.
func (*CreateItemsOK) MarshalJSON ¶
func (s *CreateItemsOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateItemsOK) SetCreated ¶
func (s *CreateItemsOK) SetCreated(val OptInt)
SetCreated sets the value of Created.
func (*CreateItemsOK) UnmarshalJSON ¶
func (s *CreateItemsOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateItemsReq ¶
type CreateItemsReq struct {
Items []Level1 `json:"items"`
}
func (*CreateItemsReq) Decode ¶
func (s *CreateItemsReq) Decode(d *jx.Decoder) error
Decode decodes CreateItemsReq from json.
func (*CreateItemsReq) Encode ¶
func (s *CreateItemsReq) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateItemsReq) GetItems ¶
func (s *CreateItemsReq) GetItems() []Level1
GetItems returns the value of Items.
func (*CreateItemsReq) MarshalJSON ¶
func (s *CreateItemsReq) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateItemsReq) SetItems ¶
func (s *CreateItemsReq) SetItems(val []Level1)
SetItems sets the value of Items.
func (*CreateItemsReq) UnmarshalJSON ¶
func (s *CreateItemsReq) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateItemsReq) Validate ¶
func (s *CreateItemsReq) Validate() error
type Handler ¶
type Handler interface {
// CreateItems implements createItems operation.
//
// Create deeply nested items.
//
// POST /test/items
CreateItems(ctx context.Context, req *CreateItemsReq) (*CreateItemsOK, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// CreateItems invokes createItems operation.
//
// Create deeply nested items.
//
// POST /test/items
CreateItems(ctx context.Context, request *CreateItemsReq) (*CreateItemsOK, 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 Level1 ¶
Level 1 of 12. Ref: #/components/schemas/Level1
func (Level1) Equal ¶
Equal compares two Level1 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level1) Hash ¶
Hash computes a hash value for Level1 using FNV-1a. Equal objects must produce equal hashes.
func (*Level1) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level1) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level10 ¶
type Level10 struct {
Nested OptLevel11 `json:"nested"`
}
Level 10 of 12. Ref: #/components/schemas/Level10
func (Level10) Equal ¶
Equal compares two Level10 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (*Level10) GetNested ¶
func (s *Level10) GetNested() OptLevel11
GetNested returns the value of Nested.
func (Level10) Hash ¶
Hash computes a hash value for Level10 using FNV-1a. Equal objects must produce equal hashes.
func (*Level10) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level10) SetNested ¶
func (s *Level10) SetNested(val OptLevel11)
SetNested sets the value of Nested.
func (*Level10) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level11 ¶
type Level11 struct {
Nested OptLevel12 `json:"nested"`
}
Level 11 of 12. Ref: #/components/schemas/Level11
func (Level11) Equal ¶
Equal compares two Level11 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (*Level11) GetNested ¶
func (s *Level11) GetNested() OptLevel12
GetNested returns the value of Nested.
func (Level11) Hash ¶
Hash computes a hash value for Level11 using FNV-1a. Equal objects must produce equal hashes.
func (*Level11) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level11) SetNested ¶
func (s *Level11) SetNested(val OptLevel12)
SetNested sets the value of Nested.
func (*Level11) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level12 ¶
type Level12 struct {
Value OptString `json:"value"`
}
Level 12 of 12 (deepest level). Ref: #/components/schemas/Level12
func (Level12) Equal ¶
Equal compares two Level12 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level12) Hash ¶
Hash computes a hash value for Level12 using FNV-1a. Equal objects must produce equal hashes.
func (*Level12) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level12) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level2 ¶
type Level2 struct {
Nested OptLevel3 `json:"nested"`
}
Level 2 of 12. Ref: #/components/schemas/Level2
func (Level2) Equal ¶
Equal compares two Level2 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level2) Hash ¶
Hash computes a hash value for Level2 using FNV-1a. Equal objects must produce equal hashes.
func (*Level2) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level2) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level3 ¶
type Level3 struct {
Nested OptLevel4 `json:"nested"`
}
Level 3 of 12. Ref: #/components/schemas/Level3
func (Level3) Equal ¶
Equal compares two Level3 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level3) Hash ¶
Hash computes a hash value for Level3 using FNV-1a. Equal objects must produce equal hashes.
func (*Level3) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level3) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level4 ¶
type Level4 struct {
Nested OptLevel5 `json:"nested"`
}
Level 4 of 12. Ref: #/components/schemas/Level4
func (Level4) Equal ¶
Equal compares two Level4 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level4) Hash ¶
Hash computes a hash value for Level4 using FNV-1a. Equal objects must produce equal hashes.
func (*Level4) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level4) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level5 ¶
type Level5 struct {
Nested OptLevel6 `json:"nested"`
}
Level 5 of 12. Ref: #/components/schemas/Level5
func (Level5) Equal ¶
Equal compares two Level5 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level5) Hash ¶
Hash computes a hash value for Level5 using FNV-1a. Equal objects must produce equal hashes.
func (*Level5) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level5) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level6 ¶
type Level6 struct {
Nested OptLevel7 `json:"nested"`
}
Level 6 of 12. Ref: #/components/schemas/Level6
func (Level6) Equal ¶
Equal compares two Level6 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level6) Hash ¶
Hash computes a hash value for Level6 using FNV-1a. Equal objects must produce equal hashes.
func (*Level6) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level6) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level7 ¶
type Level7 struct {
Nested OptLevel8 `json:"nested"`
}
Level 7 of 12. Ref: #/components/schemas/Level7
func (Level7) Equal ¶
Equal compares two Level7 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level7) Hash ¶
Hash computes a hash value for Level7 using FNV-1a. Equal objects must produce equal hashes.
func (*Level7) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level7) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level8 ¶
type Level8 struct {
Nested OptLevel9 `json:"nested"`
}
Level 8 of 12. Ref: #/components/schemas/Level8
func (Level8) Equal ¶
Equal compares two Level8 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (Level8) Hash ¶
Hash computes a hash value for Level8 using FNV-1a. Equal objects must produce equal hashes.
func (*Level8) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level8) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Level9 ¶
type Level9 struct {
Nested OptLevel10 `json:"nested"`
}
Level 9 of 12. Ref: #/components/schemas/Level9
func (Level9) Equal ¶
Equal compares two Level9 instances for equality. The depth parameter prevents infinite recursion on nested objects.
func (*Level9) GetNested ¶
func (s *Level9) GetNested() OptLevel10
GetNested returns the value of Nested.
func (Level9) Hash ¶
Hash computes a hash value for Level9 using FNV-1a. Equal objects must produce equal hashes.
func (*Level9) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Level9) SetNested ¶
func (s *Level9) SetNested(val OptLevel10)
SetNested sets the value of Nested.
func (*Level9) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const (
CreateItemsOperation OperationName = "CreateItems"
)
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel10 ¶
OptLevel10 is optional Level10.
func NewOptLevel10 ¶
func NewOptLevel10(v Level10) OptLevel10
NewOptLevel10 returns new OptLevel10 with value set to v.
func (*OptLevel10) Decode ¶
func (o *OptLevel10) Decode(d *jx.Decoder) error
Decode decodes Level10 from json.
func (OptLevel10) Encode ¶
func (o OptLevel10) Encode(e *jx.Encoder)
Encode encodes Level10 as json.
func (OptLevel10) Get ¶
func (o OptLevel10) Get() (v Level10, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLevel10) IsSet ¶
func (o OptLevel10) IsSet() bool
IsSet returns true if OptLevel10 was set.
func (OptLevel10) MarshalJSON ¶
func (s OptLevel10) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLevel10) Or ¶
func (o OptLevel10) Or(d Level10) Level10
Or returns value if set, or given parameter if does not.
func (*OptLevel10) UnmarshalJSON ¶
func (s *OptLevel10) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel11 ¶
OptLevel11 is optional Level11.
func NewOptLevel11 ¶
func NewOptLevel11(v Level11) OptLevel11
NewOptLevel11 returns new OptLevel11 with value set to v.
func (*OptLevel11) Decode ¶
func (o *OptLevel11) Decode(d *jx.Decoder) error
Decode decodes Level11 from json.
func (OptLevel11) Encode ¶
func (o OptLevel11) Encode(e *jx.Encoder)
Encode encodes Level11 as json.
func (OptLevel11) Get ¶
func (o OptLevel11) Get() (v Level11, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLevel11) IsSet ¶
func (o OptLevel11) IsSet() bool
IsSet returns true if OptLevel11 was set.
func (OptLevel11) MarshalJSON ¶
func (s OptLevel11) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLevel11) Or ¶
func (o OptLevel11) Or(d Level11) Level11
Or returns value if set, or given parameter if does not.
func (*OptLevel11) UnmarshalJSON ¶
func (s *OptLevel11) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel12 ¶
OptLevel12 is optional Level12.
func NewOptLevel12 ¶
func NewOptLevel12(v Level12) OptLevel12
NewOptLevel12 returns new OptLevel12 with value set to v.
func (*OptLevel12) Decode ¶
func (o *OptLevel12) Decode(d *jx.Decoder) error
Decode decodes Level12 from json.
func (OptLevel12) Encode ¶
func (o OptLevel12) Encode(e *jx.Encoder)
Encode encodes Level12 as json.
func (OptLevel12) Get ¶
func (o OptLevel12) Get() (v Level12, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptLevel12) IsSet ¶
func (o OptLevel12) IsSet() bool
IsSet returns true if OptLevel12 was set.
func (OptLevel12) MarshalJSON ¶
func (s OptLevel12) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptLevel12) Or ¶
func (o OptLevel12) Or(d Level12) Level12
Or returns value if set, or given parameter if does not.
func (*OptLevel12) UnmarshalJSON ¶
func (s *OptLevel12) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel2 ¶
OptLevel2 is optional Level2.
func NewOptLevel2 ¶
NewOptLevel2 returns new OptLevel2 with value set to v.
func (OptLevel2) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel2) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel3 ¶
OptLevel3 is optional Level3.
func NewOptLevel3 ¶
NewOptLevel3 returns new OptLevel3 with value set to v.
func (OptLevel3) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel3) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel4 ¶
OptLevel4 is optional Level4.
func NewOptLevel4 ¶
NewOptLevel4 returns new OptLevel4 with value set to v.
func (OptLevel4) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel4) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel5 ¶
OptLevel5 is optional Level5.
func NewOptLevel5 ¶
NewOptLevel5 returns new OptLevel5 with value set to v.
func (OptLevel5) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel5) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel6 ¶
OptLevel6 is optional Level6.
func NewOptLevel6 ¶
NewOptLevel6 returns new OptLevel6 with value set to v.
func (OptLevel6) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel6) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel7 ¶
OptLevel7 is optional Level7.
func NewOptLevel7 ¶
NewOptLevel7 returns new OptLevel7 with value set to v.
func (OptLevel7) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel7) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel8 ¶
OptLevel8 is optional Level8.
func NewOptLevel8 ¶
NewOptLevel8 returns new OptLevel8 with value set to v.
func (OptLevel8) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel8) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLevel9 ¶
OptLevel9 is optional Level9.
func NewOptLevel9 ¶
NewOptLevel9 returns new OptLevel9 with value set to v.
func (OptLevel9) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptLevel9) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
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 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 UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateItems ¶
func (UnimplementedHandler) CreateItems(ctx context.Context, req *CreateItemsReq) (r *CreateItemsOK, _ error)
CreateItems implements createItems operation.
Create deeply nested items.
POST /test/items
Source Files
¶
- api_validators_unique_gen.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_level10_equal_gen.go
- oas_level10_hash_gen.go
- oas_level11_equal_gen.go
- oas_level11_hash_gen.go
- oas_level12_equal_gen.go
- oas_level12_hash_gen.go
- oas_level1_equal_gen.go
- oas_level1_hash_gen.go
- oas_level2_equal_gen.go
- oas_level2_hash_gen.go
- oas_level3_equal_gen.go
- oas_level3_hash_gen.go
- oas_level4_equal_gen.go
- oas_level4_hash_gen.go
- oas_level5_equal_gen.go
- oas_level5_hash_gen.go
- oas_level6_equal_gen.go
- oas_level6_hash_gen.go
- oas_level7_equal_gen.go
- oas_level7_hash_gen.go
- oas_level8_equal_gen.go
- oas_level8_hash_gen.go
- oas_level9_equal_gen.go
- oas_level9_hash_gen.go
- oas_middleware_gen.go
- oas_operations_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