Documentation
¶
Index ¶
- Constants
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- type ClientOption
- type ErrorHandler
- type Handler
- type Invoker
- type Labeler
- type Middleware
- type Name
- type NilNullableObject
- func (o *NilNullableObject) Decode(d *jx.Decoder) error
- func (o NilNullableObject) Encode(e *jx.Encoder)
- func (o NilNullableObject) Get() (v NullableObject, ok bool)
- func (o NilNullableObject) IsNull() bool
- func (s NilNullableObject) MarshalJSON() ([]byte, error)
- func (o NilNullableObject) Or(d NullableObject) NullableObject
- func (o NilNullableObject) Ptr() *NullableObject
- func (o *NilNullableObject) SetTo(v NullableObject)
- func (o *NilNullableObject) SetToNull()
- func (s *NilNullableObject) 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) Ptr() *string
- func (o *NilString) SetTo(v string)
- func (o *NilString) SetToNull()
- func (s *NilString) UnmarshalJSON(data []byte) error
- type NullableObject
- type Object
- type OperationName
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o OptDateTime) Ptr() *time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o OptInt64) Ptr() *int64
- func (o *OptInt64) Reset()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptName
- func (o *OptName) Decode(d *jx.Decoder) error
- func (o OptName) Encode(e *jx.Encoder)
- func (o OptName) Get() (v Name, ok bool)
- func (o OptName) IsSet() bool
- func (s OptName) MarshalJSON() ([]byte, error)
- func (o OptName) Or(d Name) Name
- func (o OptName) Ptr() *Name
- func (o *OptName) Reset()
- func (o *OptName) SetTo(v Name)
- func (s *OptName) UnmarshalJSON(data []byte) error
- type OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsEmpty() bool
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o OptNilString) Ptr() *string
- func (o *OptNilString) Reset()
- func (o *OptNilString) SetTo(v string)
- func (o *OptNilString) SetToNull()
- func (s *OptNilString) UnmarshalJSON(data []byte) error
- type OptNilStringArray
- func (o *OptNilStringArray) Decode(d *jx.Decoder) error
- func (o OptNilStringArray) Encode(e *jx.Encoder)
- func (o OptNilStringArray) Get() (v []string, ok bool)
- func (o OptNilStringArray) IsEmpty() bool
- func (o OptNilStringArray) IsNull() bool
- func (o OptNilStringArray) IsSet() bool
- func (s OptNilStringArray) MarshalJSON() ([]byte, error)
- func (o OptNilStringArray) Or(d []string) []string
- func (o OptNilStringArray) Ptr() *[]string
- func (o *OptNilStringArray) Reset()
- func (o *OptNilStringArray) SetTo(v []string)
- func (o *OptNilStringArray) SetToNull()
- func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
- type OptObject
- func (o *OptObject) Decode(d *jx.Decoder) error
- func (o OptObject) Encode(e *jx.Encoder)
- func (o OptObject) Get() (v Object, ok bool)
- func (o OptObject) IsSet() bool
- func (s OptObject) MarshalJSON() ([]byte, error)
- func (o OptObject) Or(d Object) Object
- func (o OptObject) Ptr() *Object
- func (o *OptObject) Reset()
- func (o *OptObject) SetTo(v Object)
- func (s *OptObject) 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) Ptr() *string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptStringOgen
- func (o *OptStringOgen) Decode(d *jx.Decoder, format func(*jx.Decoder) (testtypes.StringOgen, error)) error
- func (o OptStringOgen) Encode(e *jx.Encoder, format func(*jx.Encoder, testtypes.StringOgen))
- func (o OptStringOgen) Get() (v testtypes.StringOgen, ok bool)
- func (o OptStringOgen) IsSet() bool
- func (s OptStringOgen) MarshalJSON() ([]byte, error)
- func (o OptStringOgen) Or(d testtypes.StringOgen) testtypes.StringOgen
- func (o OptStringOgen) Ptr() *testtypes.StringOgen
- func (o *OptStringOgen) Reset()
- func (o *OptStringOgen) SetTo(v testtypes.StringOgen)
- func (s *OptStringOgen) 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
- type Wrappers
- func (s *Wrappers) Decode(d *jx.Decoder) error
- func (s *Wrappers) Encode(e *jx.Encoder)
- func (s *Wrappers) GetNilObject() NilNullableObject
- func (s *Wrappers) GetNilString() NilString
- func (s *Wrappers) GetOptExternal() OptStringOgen
- func (s *Wrappers) GetOptInt() OptInt64
- func (s *Wrappers) GetOptName() OptName
- func (s *Wrappers) GetOptNilArray() OptNilStringArray
- func (s *Wrappers) GetOptNilString() OptNilString
- func (s *Wrappers) GetOptObject() OptObject
- func (s *Wrappers) GetOptString() OptString
- func (s *Wrappers) GetOptTime() OptDateTime
- func (s *Wrappers) MarshalJSON() ([]byte, error)
- func (s *Wrappers) SetNilObject(val NilNullableObject)
- func (s *Wrappers) SetNilString(val NilString)
- func (s *Wrappers) SetOptExternal(val OptStringOgen)
- func (s *Wrappers) SetOptInt(val OptInt64)
- func (s *Wrappers) SetOptName(val OptName)
- func (s *Wrappers) SetOptNilArray(val OptNilStringArray)
- func (s *Wrappers) SetOptNilString(val OptNilString)
- func (s *Wrappers) SetOptObject(val OptObject)
- func (s *Wrappers) SetOptString(val OptString)
- func (s *Wrappers) SetOptTime(val OptDateTime)
- func (s *Wrappers) UnmarshalJSON(data []byte) error
- func (s *Wrappers) Validate() error
Constants ¶
const (
MediaTypeApplicationJSON string = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
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 Handler ¶
type Handler interface {
// Wrappers implements wrappers operation.
//
// POST /wrappers
Wrappers(ctx context.Context, req *Wrappers) (*Wrappers, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// Wrappers invokes wrappers operation.
//
// POST /wrappers
Wrappers(ctx context.Context, request *Wrappers) (*Wrappers, 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 Name ¶
type Name string
func (Name) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Name) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type NilNullableObject ¶
type NilNullableObject struct {
Value NullableObject
Null bool
}
NilNullableObject is nullable NullableObject.
func NewNilNullableObject ¶
func NewNilNullableObject(v NullableObject) NilNullableObject
NewNilNullableObject returns new NilNullableObject with value set to v.
func NewNilNullableObjectFromPtr ¶
func NewNilNullableObjectFromPtr(v *NullableObject) NilNullableObject
NewNilNullableObjectFromPtr returns new NilNullableObject with value set to *v.
A nil v is null.
func (*NilNullableObject) Decode ¶
func (o *NilNullableObject) Decode(d *jx.Decoder) error
Decode decodes NullableObject from json.
func (NilNullableObject) Encode ¶
func (o NilNullableObject) Encode(e *jx.Encoder)
Encode encodes NullableObject as json.
func (NilNullableObject) Get ¶
func (o NilNullableObject) Get() (v NullableObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (NilNullableObject) IsNull ¶
func (o NilNullableObject) IsNull() bool
IsNull returns true if value is Null.
func (NilNullableObject) MarshalJSON ¶
func (s NilNullableObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (NilNullableObject) Or ¶
func (o NilNullableObject) Or(d NullableObject) NullableObject
Or returns value if set, or given parameter if does not.
func (NilNullableObject) Ptr ¶
func (o NilNullableObject) Ptr() *NullableObject
Ptr returns a pointer to a copy of the value, or nil if the value is null.
func (*NilNullableObject) SetTo ¶
func (o *NilNullableObject) SetTo(v NullableObject)
SetTo sets value to v.
func (*NilNullableObject) SetToNull ¶
func (o *NilNullableObject) SetToNull()
SetToNull sets value to null.
func (*NilNullableObject) UnmarshalJSON ¶
func (s *NilNullableObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type NilString ¶
NilString is nullable string.
func NewNilString ¶
NewNilString returns new NilString with value set to v.
func NewNilStringFromPtr ¶
NewNilStringFromPtr returns new NilString with value set to *v.
A nil v is null.
func (NilString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*NilString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type NullableObject ¶
type NullableObject struct {
ID int `json:"id"`
}
Ref: #/components/schemas/NullableObject
func (*NullableObject) Decode ¶
func (s *NullableObject) Decode(d *jx.Decoder) error
Decode decodes NullableObject from json.
func (*NullableObject) Encode ¶
func (s *NullableObject) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*NullableObject) MarshalJSON ¶
func (s *NullableObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*NullableObject) UnmarshalJSON ¶
func (s *NullableObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Object ¶
type Object struct {
ID int `json:"id"`
}
Ref: #/components/schemas/Object
func (*Object) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Object) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const (
WrappersOperation OperationName = "Wrappers"
)
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func NewOptDateTimeFromPtr ¶
func NewOptDateTimeFromPtr(v *time.Time) OptDateTime
NewOptDateTimeFromPtr returns new OptDateTime with value set to *v.
A nil v is not set.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (OptDateTime) Ptr ¶
func (o OptDateTime) Ptr() *time.Time
Ptr returns a pointer to a copy of the value, or nil if the value is not set.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func NewOptInt64FromPtr ¶
NewOptInt64FromPtr returns new OptInt64 with value set to *v.
A nil v is not set.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptName ¶
OptName is optional Name.
func NewOptName ¶
NewOptName returns new OptName with value set to v.
func NewOptNameFromPtr ¶
NewOptNameFromPtr returns new OptName with value set to *v.
A nil v is not set.
func (OptName) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptName) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilString ¶
OptNilString is optional nullable string.
func NewOptNilString ¶
func NewOptNilString(v string) OptNilString
NewOptNilString returns new OptNilString with value set to v.
func NewOptNilStringFromPtr ¶
func NewOptNilStringFromPtr(v *string) OptNilString
NewOptNilStringFromPtr returns new OptNilString with value set to *v.
A nil v is an explicit null: the result is set and null. Use the zero OptNilString for a value omitted from the payload.
func (*OptNilString) Decode ¶
func (o *OptNilString) Decode(d *jx.Decoder) error
Decode decodes string from json.
func (OptNilString) Encode ¶
func (o OptNilString) Encode(e *jx.Encoder)
Encode encodes string as json.
func (OptNilString) Get ¶
func (o OptNilString) Get() (v string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilString) IsEmpty ¶
func (o OptNilString) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilString) IsNull ¶
func (o OptNilString) IsNull() bool
IsNull returns true if value is Null.
func (OptNilString) IsSet ¶
func (o OptNilString) IsSet() bool
IsSet returns true if OptNilString was set.
func (OptNilString) MarshalJSON ¶
func (s OptNilString) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilString) Or ¶
func (o OptNilString) Or(d string) string
Or returns value if set, or given parameter if does not.
func (OptNilString) Ptr ¶
func (o OptNilString) Ptr() *string
Ptr returns a pointer to a copy of the value, or nil if the value is not set or is null.
func (*OptNilString) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilStringArray ¶
OptNilStringArray is optional nullable []string.
func NewOptNilStringArray ¶
func NewOptNilStringArray(v []string) OptNilStringArray
NewOptNilStringArray returns new OptNilStringArray with value set to v.
func NewOptNilStringArrayFromPtr ¶
func NewOptNilStringArrayFromPtr(v *[]string) OptNilStringArray
NewOptNilStringArrayFromPtr returns new OptNilStringArray with value set to *v.
A nil v is an explicit null: the result is set and null. Use the zero OptNilStringArray for a value omitted from the payload.
func (*OptNilStringArray) Decode ¶
func (o *OptNilStringArray) Decode(d *jx.Decoder) error
Decode decodes []string from json.
func (OptNilStringArray) Encode ¶
func (o OptNilStringArray) Encode(e *jx.Encoder)
Encode encodes []string as json.
func (OptNilStringArray) Get ¶
func (o OptNilStringArray) Get() (v []string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilStringArray) IsEmpty ¶
func (o OptNilStringArray) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilStringArray) IsNull ¶
func (o OptNilStringArray) IsNull() bool
IsNull returns true if value is Null.
func (OptNilStringArray) IsSet ¶
func (o OptNilStringArray) IsSet() bool
IsSet returns true if OptNilStringArray was set.
func (OptNilStringArray) MarshalJSON ¶
func (s OptNilStringArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilStringArray) Or ¶
func (o OptNilStringArray) Or(d []string) []string
Or returns value if set, or given parameter if does not.
func (OptNilStringArray) Ptr ¶
func (o OptNilStringArray) Ptr() *[]string
Ptr returns a pointer to a copy of the value, or nil if the value is not set or is null.
func (*OptNilStringArray) SetTo ¶
func (o *OptNilStringArray) SetTo(v []string)
SetTo sets value to v.
func (*OptNilStringArray) SetToNull ¶
func (o *OptNilStringArray) SetToNull()
SetToNull sets value to null.
func (*OptNilStringArray) UnmarshalJSON ¶
func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptObject ¶
OptObject is optional Object.
func NewOptObject ¶
NewOptObject returns new OptObject with value set to v.
func NewOptObjectFromPtr ¶
NewOptObjectFromPtr returns new OptObject with value set to *v.
A nil v is not set.
func (OptObject) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (OptObject) Ptr ¶
Ptr returns a pointer to a copy of the value, or nil if the value is not set.
func (*OptObject) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func NewOptStringFromPtr ¶
NewOptStringFromPtr returns new OptString with value set to *v.
A nil v is not set.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (OptString) Ptr ¶
Ptr returns a pointer to a copy of the value, or nil if the value is not set.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptStringOgen ¶
type OptStringOgen struct {
Value testtypes.StringOgen
Set bool
}
OptStringOgen is optional testtypes.StringOgen.
func NewOptStringOgen ¶
func NewOptStringOgen(v testtypes.StringOgen) OptStringOgen
NewOptStringOgen returns new OptStringOgen with value set to v.
func NewOptStringOgenFromPtr ¶
func NewOptStringOgenFromPtr(v *testtypes.StringOgen) OptStringOgen
NewOptStringOgenFromPtr returns new OptStringOgen with value set to *v.
A nil v is not set.
func (*OptStringOgen) Decode ¶
func (o *OptStringOgen) Decode(d *jx.Decoder, format func(*jx.Decoder) (testtypes.StringOgen, error)) error
Decode decodes testtypes.StringOgen from json.
func (OptStringOgen) Encode ¶
func (o OptStringOgen) Encode(e *jx.Encoder, format func(*jx.Encoder, testtypes.StringOgen))
Encode encodes testtypes.StringOgen as json.
func (OptStringOgen) Get ¶
func (o OptStringOgen) Get() (v testtypes.StringOgen, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptStringOgen) IsSet ¶
func (o OptStringOgen) IsSet() bool
IsSet returns true if OptStringOgen was set.
func (OptStringOgen) MarshalJSON ¶
func (s OptStringOgen) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptStringOgen) Or ¶
func (o OptStringOgen) Or(d testtypes.StringOgen) testtypes.StringOgen
Or returns value if set, or given parameter if does not.
func (OptStringOgen) Ptr ¶
func (o OptStringOgen) Ptr() *testtypes.StringOgen
Ptr returns a pointer to a copy of the value, or nil if the value is not set.
func (*OptStringOgen) SetTo ¶
func (o *OptStringOgen) SetTo(v testtypes.StringOgen)
SetTo sets value to v.
func (*OptStringOgen) UnmarshalJSON ¶
func (s *OptStringOgen) UnmarshalJSON(data []byte) error
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) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
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.
type Wrappers ¶
type Wrappers struct {
OptString OptString `json:"optString"`
NilString NilString `json:"nilString"`
OptNilString OptNilString `json:"optNilString"`
OptInt OptInt64 `json:"optInt"`
OptTime OptDateTime `json:"optTime"`
OptName OptName `json:"optName"`
OptObject OptObject `json:"optObject"`
NilObject NilNullableObject `json:"nilObject"`
OptNilArray OptNilStringArray `json:"optNilArray"`
OptExternal OptStringOgen `json:"optExternal"`
}
Ref: #/components/schemas/Wrappers
func (*Wrappers) GetNilObject ¶
func (s *Wrappers) GetNilObject() NilNullableObject
GetNilObject returns the value of NilObject.
func (*Wrappers) GetNilString ¶
GetNilString returns the value of NilString.
func (*Wrappers) GetOptExternal ¶
func (s *Wrappers) GetOptExternal() OptStringOgen
GetOptExternal returns the value of OptExternal.
func (*Wrappers) GetOptName ¶
GetOptName returns the value of OptName.
func (*Wrappers) GetOptNilArray ¶
func (s *Wrappers) GetOptNilArray() OptNilStringArray
GetOptNilArray returns the value of OptNilArray.
func (*Wrappers) GetOptNilString ¶
func (s *Wrappers) GetOptNilString() OptNilString
GetOptNilString returns the value of OptNilString.
func (*Wrappers) GetOptObject ¶
GetOptObject returns the value of OptObject.
func (*Wrappers) GetOptString ¶
GetOptString returns the value of OptString.
func (*Wrappers) GetOptTime ¶
func (s *Wrappers) GetOptTime() OptDateTime
GetOptTime returns the value of OptTime.
func (*Wrappers) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Wrappers) SetNilObject ¶
func (s *Wrappers) SetNilObject(val NilNullableObject)
SetNilObject sets the value of NilObject.
func (*Wrappers) SetNilString ¶
SetNilString sets the value of NilString.
func (*Wrappers) SetOptExternal ¶
func (s *Wrappers) SetOptExternal(val OptStringOgen)
SetOptExternal sets the value of OptExternal.
func (*Wrappers) SetOptName ¶
SetOptName sets the value of OptName.
func (*Wrappers) SetOptNilArray ¶
func (s *Wrappers) SetOptNilArray(val OptNilStringArray)
SetOptNilArray sets the value of OptNilArray.
func (*Wrappers) SetOptNilString ¶
func (s *Wrappers) SetOptNilString(val OptNilString)
SetOptNilString sets the value of OptNilString.
func (*Wrappers) SetOptObject ¶
SetOptObject sets the value of OptObject.
func (*Wrappers) SetOptString ¶
SetOptString sets the value of OptString.
func (*Wrappers) SetOptTime ¶
func (s *Wrappers) SetOptTime(val OptDateTime)
SetOptTime sets the value of OptTime.
func (*Wrappers) 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_mediatypes_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