Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) OnlyForm(ctx context.Context, request *OnlyFormReq) error
- func (c *Client) OnlyMultipartFile(ctx context.Context, request *OnlyMultipartFileReq) error
- func (c *Client) OnlyMultipartForm(ctx context.Context, request *OnlyMultipartFormReq) error
- func (c *Client) TestFormURLEncoded(ctx context.Context, request *TestForm) error
- func (c *Client) TestMultipart(ctx context.Context, request *TestFormMultipart) error
- func (c *Client) TestMultipartUpload(ctx context.Context, request *TestMultipartUploadReq) (*TestMultipartUploadOK, error)
- func (c *Client) TestReuseFormOptionalSchema(ctx context.Context, request OptSharedRequestMultipart) error
- func (c *Client) TestReuseFormSchema(ctx context.Context, request *SharedRequestMultipart) error
- func (c *Client) TestShareFormSchema(ctx context.Context, request TestShareFormSchemaReq) error
- type ClientOption
- type ErrorHandler
- type Handler
- type Invoker
- type Middleware
- type OnlyFormOK
- type OnlyFormReq
- type OnlyMultipartFileOK
- type OnlyMultipartFileReq
- type OnlyMultipartFormOK
- type OnlyMultipartFormReq
- type OptInt
- type OptMultipartFile
- type OptSharedRequestMultipart
- func (o OptSharedRequestMultipart) Get() (v SharedRequestMultipart, ok bool)
- func (o OptSharedRequestMultipart) IsSet() bool
- func (o OptSharedRequestMultipart) Or(d SharedRequestMultipart) SharedRequestMultipart
- func (o *OptSharedRequestMultipart) Reset()
- func (o *OptSharedRequestMultipart) SetTo(v SharedRequestMultipart)
- 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 OptTestFormDeepObject
- type OptTestFormMultipartDeepObject
- func (o OptTestFormMultipartDeepObject) Get() (v TestFormMultipartDeepObject, ok bool)
- func (o OptTestFormMultipartDeepObject) IsSet() bool
- func (o OptTestFormMultipartDeepObject) Or(d TestFormMultipartDeepObject) TestFormMultipartDeepObject
- func (o *OptTestFormMultipartDeepObject) Reset()
- func (o *OptTestFormMultipartDeepObject) SetTo(v TestFormMultipartDeepObject)
- type OptTestFormMultipartObject
- func (o OptTestFormMultipartObject) Get() (v TestFormMultipartObject, ok bool)
- func (o OptTestFormMultipartObject) IsSet() bool
- func (o OptTestFormMultipartObject) Or(d TestFormMultipartObject) TestFormMultipartObject
- func (o *OptTestFormMultipartObject) Reset()
- func (o *OptTestFormMultipartObject) SetTo(v TestFormMultipartObject)
- type OptTestFormObject
- type OptUUID
- 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 SharedRequest
- func (s *SharedRequest) Decode(d *jx.Decoder) error
- func (s *SharedRequest) Encode(e *jx.Encoder)
- func (s *SharedRequest) GetFile() OptString
- func (s *SharedRequest) GetFilename() OptString
- func (s *SharedRequest) MarshalJSON() ([]byte, error)
- func (s *SharedRequest) SetFile(val OptString)
- func (s *SharedRequest) SetFilename(val OptString)
- func (s *SharedRequest) UnmarshalJSON(data []byte) error
- type SharedRequestMultipart
- type TestForm
- func (s *TestForm) GetArray() []string
- func (s *TestForm) GetDeepObject() OptTestFormDeepObject
- func (s *TestForm) GetDescription() string
- func (s *TestForm) GetID() OptInt
- func (s *TestForm) GetObject() OptTestFormObject
- func (s *TestForm) GetUUID() OptUUID
- func (s *TestForm) SetArray(val []string)
- func (s *TestForm) SetDeepObject(val OptTestFormDeepObject)
- func (s *TestForm) SetDescription(val string)
- func (s *TestForm) SetID(val OptInt)
- func (s *TestForm) SetObject(val OptTestFormObject)
- func (s *TestForm) SetUUID(val OptUUID)
- type TestFormDeepObject
- type TestFormMultipart
- func (s *TestFormMultipart) GetArray() []string
- func (s *TestFormMultipart) GetDeepObject() OptTestFormMultipartDeepObject
- func (s *TestFormMultipart) GetDescription() string
- func (s *TestFormMultipart) GetID() OptInt
- func (s *TestFormMultipart) GetObject() OptTestFormMultipartObject
- func (s *TestFormMultipart) GetUUID() OptUUID
- func (s *TestFormMultipart) SetArray(val []string)
- func (s *TestFormMultipart) SetDeepObject(val OptTestFormMultipartDeepObject)
- func (s *TestFormMultipart) SetDescription(val string)
- func (s *TestFormMultipart) SetID(val OptInt)
- func (s *TestFormMultipart) SetObject(val OptTestFormMultipartObject)
- func (s *TestFormMultipart) SetUUID(val OptUUID)
- type TestFormMultipartDeepObject
- func (s *TestFormMultipartDeepObject) DecodeURI(d uri.Decoder) error
- func (s *TestFormMultipartDeepObject) EncodeURI(e uri.Encoder) error
- func (s *TestFormMultipartDeepObject) GetMax() int
- func (s *TestFormMultipartDeepObject) GetMin() OptInt
- func (s *TestFormMultipartDeepObject) SetMax(val int)
- func (s *TestFormMultipartDeepObject) SetMin(val OptInt)
- type TestFormMultipartObject
- func (s *TestFormMultipartObject) DecodeURI(d uri.Decoder) error
- func (s *TestFormMultipartObject) EncodeURI(e uri.Encoder) error
- func (s *TestFormMultipartObject) GetMax() int
- func (s *TestFormMultipartObject) GetMin() OptInt
- func (s *TestFormMultipartObject) SetMax(val int)
- func (s *TestFormMultipartObject) SetMin(val OptInt)
- type TestFormObject
- type TestFormURLEncodedOK
- type TestMultipartOK
- type TestMultipartUploadOK
- func (s *TestMultipartUploadOK) Decode(d *jx.Decoder) error
- func (s *TestMultipartUploadOK) Encode(e *jx.Encoder)
- func (s *TestMultipartUploadOK) GetFile() string
- func (s *TestMultipartUploadOK) GetFiles() []string
- func (s *TestMultipartUploadOK) GetOptionalFile() OptString
- func (s *TestMultipartUploadOK) MarshalJSON() ([]byte, error)
- func (s *TestMultipartUploadOK) SetFile(val string)
- func (s *TestMultipartUploadOK) SetFiles(val []string)
- func (s *TestMultipartUploadOK) SetOptionalFile(val OptString)
- func (s *TestMultipartUploadOK) UnmarshalJSON(data []byte) error
- func (s *TestMultipartUploadOK) Validate() error
- type TestMultipartUploadReq
- func (s *TestMultipartUploadReq) GetFile() ht.MultipartFile
- func (s *TestMultipartUploadReq) GetFiles() []ht.MultipartFile
- func (s *TestMultipartUploadReq) GetOptionalFile() OptMultipartFile
- func (s *TestMultipartUploadReq) GetOrderId() OptInt
- func (s *TestMultipartUploadReq) GetUserId() OptInt
- func (s *TestMultipartUploadReq) SetFile(val ht.MultipartFile)
- func (s *TestMultipartUploadReq) SetFiles(val []ht.MultipartFile)
- func (s *TestMultipartUploadReq) SetOptionalFile(val OptMultipartFile)
- func (s *TestMultipartUploadReq) SetOrderId(val OptInt)
- func (s *TestMultipartUploadReq) SetUserId(val OptInt)
- func (s *TestMultipartUploadReq) Validate() error
- type TestReuseFormOptionalSchemaOK
- type TestReuseFormSchemaOK
- type TestShareFormSchemaOK
- type TestShareFormSchemaReq
- type UnimplementedHandler
- func (UnimplementedHandler) OnlyForm(ctx context.Context, req *OnlyFormReq) error
- func (UnimplementedHandler) OnlyMultipartFile(ctx context.Context, req *OnlyMultipartFileReq) error
- func (UnimplementedHandler) OnlyMultipartForm(ctx context.Context, req *OnlyMultipartFormReq) error
- func (UnimplementedHandler) TestFormURLEncoded(ctx context.Context, req *TestForm) error
- func (UnimplementedHandler) TestMultipart(ctx context.Context, req *TestFormMultipart) error
- func (UnimplementedHandler) TestMultipartUpload(ctx context.Context, req *TestMultipartUploadReq) (r *TestMultipartUploadOK, _ error)
- func (UnimplementedHandler) TestReuseFormOptionalSchema(ctx context.Context, req OptSharedRequestMultipart) error
- func (UnimplementedHandler) TestReuseFormSchema(ctx context.Context, req *SharedRequestMultipart) error
- func (UnimplementedHandler) TestShareFormSchema(ctx context.Context, req TestShareFormSchemaReq) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) OnlyForm ¶ added in v0.64.0
func (c *Client) OnlyForm(ctx context.Context, request *OnlyFormReq) error
OnlyForm invokes onlyForm operation.
POST /onlyForm
func (*Client) OnlyMultipartFile ¶ added in v0.64.0
func (c *Client) OnlyMultipartFile(ctx context.Context, request *OnlyMultipartFileReq) error
OnlyMultipartFile invokes onlyMultipartFile operation.
POST /onlyMultipartFile
func (*Client) OnlyMultipartForm ¶ added in v0.64.0
func (c *Client) OnlyMultipartForm(ctx context.Context, request *OnlyMultipartFormReq) error
OnlyMultipartForm invokes onlyMultipartForm operation.
POST /onlyMultipartForm
func (*Client) TestFormURLEncoded ¶
TestFormURLEncoded invokes testFormURLEncoded operation.
POST /testFormURLEncoded
func (*Client) TestMultipart ¶
func (c *Client) TestMultipart(ctx context.Context, request *TestFormMultipart) error
TestMultipart invokes testMultipart operation.
POST /testMultipart
func (*Client) TestMultipartUpload ¶
func (c *Client) TestMultipartUpload(ctx context.Context, request *TestMultipartUploadReq) (*TestMultipartUploadOK, error)
TestMultipartUpload invokes testMultipartUpload operation.
POST /testMultipartUpload
func (*Client) TestReuseFormOptionalSchema ¶ added in v0.64.0
func (c *Client) TestReuseFormOptionalSchema(ctx context.Context, request OptSharedRequestMultipart) error
TestReuseFormOptionalSchema invokes testReuseFormOptionalSchema operation.
POST /testReuseFormOptionalSchema
func (*Client) TestReuseFormSchema ¶ added in v0.64.0
func (c *Client) TestReuseFormSchema(ctx context.Context, request *SharedRequestMultipart) error
TestReuseFormSchema invokes testReuseFormSchema operation.
POST /testReuseFormSchema
func (*Client) TestShareFormSchema ¶
func (c *Client) TestShareFormSchema(ctx context.Context, request TestShareFormSchemaReq) error
TestShareFormSchema invokes testShareFormSchema operation.
POST /testShareFormSchema
type ClientOption ¶ added in v0.55.0
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 { // OnlyForm implements onlyForm operation. // // POST /onlyForm OnlyForm(ctx context.Context, req *OnlyFormReq) error // OnlyMultipartFile implements onlyMultipartFile operation. // // POST /onlyMultipartFile OnlyMultipartFile(ctx context.Context, req *OnlyMultipartFileReq) error // OnlyMultipartForm implements onlyMultipartForm operation. // // POST /onlyMultipartForm OnlyMultipartForm(ctx context.Context, req *OnlyMultipartFormReq) error // TestFormURLEncoded implements testFormURLEncoded operation. // // POST /testFormURLEncoded TestFormURLEncoded(ctx context.Context, req *TestForm) error // TestMultipart implements testMultipart operation. // // POST /testMultipart TestMultipart(ctx context.Context, req *TestFormMultipart) error // TestMultipartUpload implements testMultipartUpload operation. // // POST /testMultipartUpload TestMultipartUpload(ctx context.Context, req *TestMultipartUploadReq) (*TestMultipartUploadOK, error) // TestReuseFormOptionalSchema implements testReuseFormOptionalSchema operation. // // POST /testReuseFormOptionalSchema TestReuseFormOptionalSchema(ctx context.Context, req OptSharedRequestMultipart) error // TestReuseFormSchema implements testReuseFormSchema operation. // // POST /testReuseFormSchema TestReuseFormSchema(ctx context.Context, req *SharedRequestMultipart) error // // POST /testShareFormSchema TestShareFormSchema(ctx context.Context, req TestShareFormSchemaReq) error }
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶ added in v0.75.0
type Invoker interface { // OnlyForm invokes onlyForm operation. // // POST /onlyForm OnlyForm(ctx context.Context, request *OnlyFormReq) error // OnlyMultipartFile invokes onlyMultipartFile operation. // // POST /onlyMultipartFile OnlyMultipartFile(ctx context.Context, request *OnlyMultipartFileReq) error // OnlyMultipartForm invokes onlyMultipartForm operation. // // POST /onlyMultipartForm OnlyMultipartForm(ctx context.Context, request *OnlyMultipartFormReq) error // TestFormURLEncoded invokes testFormURLEncoded operation. // // POST /testFormURLEncoded TestFormURLEncoded(ctx context.Context, request *TestForm) error // TestMultipart invokes testMultipart operation. // // POST /testMultipart TestMultipart(ctx context.Context, request *TestFormMultipart) error // TestMultipartUpload invokes testMultipartUpload operation. // // POST /testMultipartUpload TestMultipartUpload(ctx context.Context, request *TestMultipartUploadReq) (*TestMultipartUploadOK, error) // TestReuseFormOptionalSchema invokes testReuseFormOptionalSchema operation. // // POST /testReuseFormOptionalSchema TestReuseFormOptionalSchema(ctx context.Context, request OptSharedRequestMultipart) error // TestReuseFormSchema invokes testReuseFormSchema operation. // // POST /testReuseFormSchema TestReuseFormSchema(ctx context.Context, request *SharedRequestMultipart) error // // POST /testShareFormSchema TestShareFormSchema(ctx context.Context, request TestShareFormSchemaReq) error }
Invoker invokes operations described by OpenAPI v3 specification.
type OnlyFormOK ¶ added in v0.64.0
type OnlyFormOK struct{}
OnlyFormOK is response for OnlyForm operation.
type OnlyFormReq ¶ added in v0.64.0
type OnlyFormReq struct {
Field int `json:"field"`
}
func (*OnlyFormReq) GetField ¶ added in v0.64.0
func (s *OnlyFormReq) GetField() int
GetField returns the value of Field.
func (*OnlyFormReq) SetField ¶ added in v0.64.0
func (s *OnlyFormReq) SetField(val int)
SetField sets the value of Field.
type OnlyMultipartFileOK ¶ added in v0.64.0
type OnlyMultipartFileOK struct{}
OnlyMultipartFileOK is response for OnlyMultipartFile operation.
type OnlyMultipartFileReq ¶ added in v0.64.0
type OnlyMultipartFileReq struct {
File ht.MultipartFile `json:"file"`
}
func (*OnlyMultipartFileReq) GetFile ¶ added in v0.64.0
func (s *OnlyMultipartFileReq) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*OnlyMultipartFileReq) SetFile ¶ added in v0.64.0
func (s *OnlyMultipartFileReq) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
type OnlyMultipartFormOK ¶ added in v0.64.0
type OnlyMultipartFormOK struct{}
OnlyMultipartFormOK is response for OnlyMultipartForm operation.
type OnlyMultipartFormReq ¶ added in v0.64.0
type OnlyMultipartFormReq struct {
Field int `json:"field"`
}
func (*OnlyMultipartFormReq) GetField ¶ added in v0.64.0
func (s *OnlyMultipartFormReq) GetField() int
GetField returns the value of Field.
func (*OnlyMultipartFormReq) SetField ¶ added in v0.64.0
func (s *OnlyMultipartFormReq) SetField(val int)
SetField sets the value of Field.
type OptInt ¶
OptInt is optional int.
type OptMultipartFile ¶
type OptMultipartFile struct { Value ht.MultipartFile Set bool }
OptMultipartFile is optional ht.MultipartFile.
func NewOptMultipartFile ¶
func NewOptMultipartFile(v ht.MultipartFile) OptMultipartFile
NewOptMultipartFile returns new OptMultipartFile with value set to v.
func (OptMultipartFile) Get ¶
func (o OptMultipartFile) Get() (v ht.MultipartFile, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMultipartFile) IsSet ¶
func (o OptMultipartFile) IsSet() bool
IsSet returns true if OptMultipartFile was set.
func (OptMultipartFile) Or ¶
func (o OptMultipartFile) Or(d ht.MultipartFile) ht.MultipartFile
Or returns value if set, or given parameter if does not.
func (*OptMultipartFile) SetTo ¶
func (o *OptMultipartFile) SetTo(v ht.MultipartFile)
SetTo sets value to v.
type OptSharedRequestMultipart ¶ added in v0.64.0
type OptSharedRequestMultipart struct {}
OptSharedRequestMultipart is optional SharedRequestMultipart.
func NewOptSharedRequestMultipart ¶ added in v0.64.0
func NewOptSharedRequestMultipart(v SharedRequestMultipart) OptSharedRequestMultipart
NewOptSharedRequestMultipart returns new OptSharedRequestMultipart with value set to v.
func (OptSharedRequestMultipart) Get ¶ added in v0.64.0
func (o OptSharedRequestMultipart) Get() (v SharedRequestMultipart, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptSharedRequestMultipart) IsSet ¶ added in v0.64.0
func (o OptSharedRequestMultipart) IsSet() bool
IsSet returns true if OptSharedRequestMultipart was set.
func (OptSharedRequestMultipart) Or ¶ added in v0.64.0
Or returns value if set, or given parameter if does not.
func (*OptSharedRequestMultipart) Reset ¶ added in v0.64.0
func (o *OptSharedRequestMultipart) Reset()
Reset unsets value.
func (*OptSharedRequestMultipart) SetTo ¶ added in v0.64.0
func (o *OptSharedRequestMultipart) SetTo(v SharedRequestMultipart)
SetTo sets value to v.
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 OptTestFormDeepObject ¶
type OptTestFormDeepObject struct { Value TestFormDeepObject Set bool }
OptTestFormDeepObject is optional TestFormDeepObject.
func NewOptTestFormDeepObject ¶
func NewOptTestFormDeepObject(v TestFormDeepObject) OptTestFormDeepObject
NewOptTestFormDeepObject returns new OptTestFormDeepObject with value set to v.
func (OptTestFormDeepObject) Get ¶
func (o OptTestFormDeepObject) Get() (v TestFormDeepObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTestFormDeepObject) IsSet ¶
func (o OptTestFormDeepObject) IsSet() bool
IsSet returns true if OptTestFormDeepObject was set.
func (OptTestFormDeepObject) Or ¶
func (o OptTestFormDeepObject) Or(d TestFormDeepObject) TestFormDeepObject
Or returns value if set, or given parameter if does not.
func (*OptTestFormDeepObject) SetTo ¶
func (o *OptTestFormDeepObject) SetTo(v TestFormDeepObject)
SetTo sets value to v.
type OptTestFormMultipartDeepObject ¶ added in v0.64.0
type OptTestFormMultipartDeepObject struct { Value TestFormMultipartDeepObject Set bool }
OptTestFormMultipartDeepObject is optional TestFormMultipartDeepObject.
func NewOptTestFormMultipartDeepObject ¶ added in v0.64.0
func NewOptTestFormMultipartDeepObject(v TestFormMultipartDeepObject) OptTestFormMultipartDeepObject
NewOptTestFormMultipartDeepObject returns new OptTestFormMultipartDeepObject with value set to v.
func (OptTestFormMultipartDeepObject) Get ¶ added in v0.64.0
func (o OptTestFormMultipartDeepObject) Get() (v TestFormMultipartDeepObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTestFormMultipartDeepObject) IsSet ¶ added in v0.64.0
func (o OptTestFormMultipartDeepObject) IsSet() bool
IsSet returns true if OptTestFormMultipartDeepObject was set.
func (OptTestFormMultipartDeepObject) Or ¶ added in v0.64.0
func (o OptTestFormMultipartDeepObject) Or(d TestFormMultipartDeepObject) TestFormMultipartDeepObject
Or returns value if set, or given parameter if does not.
func (*OptTestFormMultipartDeepObject) Reset ¶ added in v0.64.0
func (o *OptTestFormMultipartDeepObject) Reset()
Reset unsets value.
func (*OptTestFormMultipartDeepObject) SetTo ¶ added in v0.64.0
func (o *OptTestFormMultipartDeepObject) SetTo(v TestFormMultipartDeepObject)
SetTo sets value to v.
type OptTestFormMultipartObject ¶ added in v0.64.0
type OptTestFormMultipartObject struct { Value TestFormMultipartObject Set bool }
OptTestFormMultipartObject is optional TestFormMultipartObject.
func NewOptTestFormMultipartObject ¶ added in v0.64.0
func NewOptTestFormMultipartObject(v TestFormMultipartObject) OptTestFormMultipartObject
NewOptTestFormMultipartObject returns new OptTestFormMultipartObject with value set to v.
func (OptTestFormMultipartObject) Get ¶ added in v0.64.0
func (o OptTestFormMultipartObject) Get() (v TestFormMultipartObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTestFormMultipartObject) IsSet ¶ added in v0.64.0
func (o OptTestFormMultipartObject) IsSet() bool
IsSet returns true if OptTestFormMultipartObject was set.
func (OptTestFormMultipartObject) Or ¶ added in v0.64.0
Or returns value if set, or given parameter if does not.
func (*OptTestFormMultipartObject) Reset ¶ added in v0.64.0
func (o *OptTestFormMultipartObject) Reset()
Reset unsets value.
func (*OptTestFormMultipartObject) SetTo ¶ added in v0.64.0
func (o *OptTestFormMultipartObject) SetTo(v TestFormMultipartObject)
SetTo sets value to v.
type OptTestFormObject ¶
type OptTestFormObject struct { Value TestFormObject Set bool }
OptTestFormObject is optional TestFormObject.
func NewOptTestFormObject ¶
func NewOptTestFormObject(v TestFormObject) OptTestFormObject
NewOptTestFormObject returns new OptTestFormObject with value set to v.
func (OptTestFormObject) Get ¶
func (o OptTestFormObject) Get() (v TestFormObject, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptTestFormObject) IsSet ¶
func (o OptTestFormObject) IsSet() bool
IsSet returns true if OptTestFormObject was set.
func (OptTestFormObject) Or ¶
func (o OptTestFormObject) Or(d TestFormObject) TestFormObject
Or returns value if set, or given parameter if does not.
func (*OptTestFormObject) SetTo ¶
func (o *OptTestFormObject) SetTo(v TestFormObject)
SetTo sets value to v.
type OptUUID ¶
OptUUID is optional uuid.UUID.
func NewOptUUID ¶
NewOptUUID returns new OptUUID 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 Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
func (Route) PathPattern ¶ added in v0.58.0
PathPattern returns OpenAPI path.
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 ¶ added in v0.55.0
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 SharedRequest ¶
type SharedRequest struct {}
Ref: #/components/schemas/SharedRequest
func (*SharedRequest) Decode ¶
func (s *SharedRequest) Decode(d *jx.Decoder) error
Decode decodes SharedRequest from json.
func (*SharedRequest) Encode ¶
func (s *SharedRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SharedRequest) GetFile ¶
func (s *SharedRequest) GetFile() OptString
GetFile returns the value of File.
func (*SharedRequest) GetFilename ¶
func (s *SharedRequest) GetFilename() OptString
GetFilename returns the value of Filename.
func (*SharedRequest) MarshalJSON ¶
func (s *SharedRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SharedRequest) SetFile ¶
func (s *SharedRequest) SetFile(val OptString)
SetFile sets the value of File.
func (*SharedRequest) SetFilename ¶
func (s *SharedRequest) SetFilename(val OptString)
SetFilename sets the value of Filename.
func (*SharedRequest) UnmarshalJSON ¶
func (s *SharedRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type SharedRequestMultipart ¶ added in v0.64.0
type SharedRequestMultipart struct {}
Ref: #/components/schemas/SharedRequest
func (*SharedRequestMultipart) GetFile ¶ added in v0.64.0
func (s *SharedRequestMultipart) GetFile() OptMultipartFile
GetFile returns the value of File.
func (*SharedRequestMultipart) GetFilename ¶ added in v0.64.0
func (s *SharedRequestMultipart) GetFilename() OptString
GetFilename returns the value of Filename.
func (*SharedRequestMultipart) SetFile ¶ added in v0.64.0
func (s *SharedRequestMultipart) SetFile(val OptMultipartFile)
SetFile sets the value of File.
func (*SharedRequestMultipart) SetFilename ¶ added in v0.64.0
func (s *SharedRequestMultipart) SetFilename(val OptString)
SetFilename sets the value of Filename.
type TestForm ¶
type TestForm struct { ID OptInt `json:"id"` UUID OptUUID `json:"uuid"` Description string `json:"description"` Array []string `json:"array"` Object OptTestFormObject `json:"object"` DeepObject OptTestFormDeepObject `json:"deepObject"` }
Ref: #/components/schemas/TestForm
func (*TestForm) GetDeepObject ¶
func (s *TestForm) GetDeepObject() OptTestFormDeepObject
GetDeepObject returns the value of DeepObject.
func (*TestForm) GetDescription ¶
GetDescription returns the value of Description.
func (*TestForm) GetObject ¶
func (s *TestForm) GetObject() OptTestFormObject
GetObject returns the value of Object.
func (*TestForm) SetDeepObject ¶
func (s *TestForm) SetDeepObject(val OptTestFormDeepObject)
SetDeepObject sets the value of DeepObject.
func (*TestForm) SetDescription ¶
SetDescription sets the value of Description.
func (*TestForm) SetObject ¶
func (s *TestForm) SetObject(val OptTestFormObject)
SetObject sets the value of Object.
type TestFormDeepObject ¶
func (*TestFormDeepObject) DecodeURI ¶
func (s *TestFormDeepObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes TestFormDeepObject from URI form.
func (*TestFormDeepObject) EncodeURI ¶
func (s *TestFormDeepObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes TestFormDeepObject as URI form.
func (*TestFormDeepObject) GetMax ¶
func (s *TestFormDeepObject) GetMax() int
GetMax returns the value of Max.
func (*TestFormDeepObject) GetMin ¶
func (s *TestFormDeepObject) GetMin() OptInt
GetMin returns the value of Min.
func (*TestFormDeepObject) SetMax ¶
func (s *TestFormDeepObject) SetMax(val int)
SetMax sets the value of Max.
func (*TestFormDeepObject) SetMin ¶
func (s *TestFormDeepObject) SetMin(val OptInt)
SetMin sets the value of Min.
type TestFormMultipart ¶ added in v0.64.0
type TestFormMultipart struct { ID OptInt `json:"id"` UUID OptUUID `json:"uuid"` Description string `json:"description"` Array []string `json:"array"` Object OptTestFormMultipartObject `json:"object"` DeepObject OptTestFormMultipartDeepObject `json:"deepObject"` }
Ref: #/components/schemas/TestForm
func (*TestFormMultipart) GetArray ¶ added in v0.64.0
func (s *TestFormMultipart) GetArray() []string
GetArray returns the value of Array.
func (*TestFormMultipart) GetDeepObject ¶ added in v0.64.0
func (s *TestFormMultipart) GetDeepObject() OptTestFormMultipartDeepObject
GetDeepObject returns the value of DeepObject.
func (*TestFormMultipart) GetDescription ¶ added in v0.64.0
func (s *TestFormMultipart) GetDescription() string
GetDescription returns the value of Description.
func (*TestFormMultipart) GetID ¶ added in v0.64.0
func (s *TestFormMultipart) GetID() OptInt
GetID returns the value of ID.
func (*TestFormMultipart) GetObject ¶ added in v0.64.0
func (s *TestFormMultipart) GetObject() OptTestFormMultipartObject
GetObject returns the value of Object.
func (*TestFormMultipart) GetUUID ¶ added in v0.64.0
func (s *TestFormMultipart) GetUUID() OptUUID
GetUUID returns the value of UUID.
func (*TestFormMultipart) SetArray ¶ added in v0.64.0
func (s *TestFormMultipart) SetArray(val []string)
SetArray sets the value of Array.
func (*TestFormMultipart) SetDeepObject ¶ added in v0.64.0
func (s *TestFormMultipart) SetDeepObject(val OptTestFormMultipartDeepObject)
SetDeepObject sets the value of DeepObject.
func (*TestFormMultipart) SetDescription ¶ added in v0.64.0
func (s *TestFormMultipart) SetDescription(val string)
SetDescription sets the value of Description.
func (*TestFormMultipart) SetID ¶ added in v0.64.0
func (s *TestFormMultipart) SetID(val OptInt)
SetID sets the value of ID.
func (*TestFormMultipart) SetObject ¶ added in v0.64.0
func (s *TestFormMultipart) SetObject(val OptTestFormMultipartObject)
SetObject sets the value of Object.
func (*TestFormMultipart) SetUUID ¶ added in v0.64.0
func (s *TestFormMultipart) SetUUID(val OptUUID)
SetUUID sets the value of UUID.
type TestFormMultipartDeepObject ¶ added in v0.64.0
func (*TestFormMultipartDeepObject) DecodeURI ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes TestFormMultipartDeepObject from URI form.
func (*TestFormMultipartDeepObject) EncodeURI ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes TestFormMultipartDeepObject as URI form.
func (*TestFormMultipartDeepObject) GetMax ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) GetMax() int
GetMax returns the value of Max.
func (*TestFormMultipartDeepObject) GetMin ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) GetMin() OptInt
GetMin returns the value of Min.
func (*TestFormMultipartDeepObject) SetMax ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) SetMax(val int)
SetMax sets the value of Max.
func (*TestFormMultipartDeepObject) SetMin ¶ added in v0.64.0
func (s *TestFormMultipartDeepObject) SetMin(val OptInt)
SetMin sets the value of Min.
type TestFormMultipartObject ¶ added in v0.64.0
func (*TestFormMultipartObject) DecodeURI ¶ added in v0.64.0
func (s *TestFormMultipartObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes TestFormMultipartObject from URI form.
func (*TestFormMultipartObject) EncodeURI ¶ added in v0.64.0
func (s *TestFormMultipartObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes TestFormMultipartObject as URI form.
func (*TestFormMultipartObject) GetMax ¶ added in v0.64.0
func (s *TestFormMultipartObject) GetMax() int
GetMax returns the value of Max.
func (*TestFormMultipartObject) GetMin ¶ added in v0.64.0
func (s *TestFormMultipartObject) GetMin() OptInt
GetMin returns the value of Min.
func (*TestFormMultipartObject) SetMax ¶ added in v0.64.0
func (s *TestFormMultipartObject) SetMax(val int)
SetMax sets the value of Max.
func (*TestFormMultipartObject) SetMin ¶ added in v0.64.0
func (s *TestFormMultipartObject) SetMin(val OptInt)
SetMin sets the value of Min.
type TestFormObject ¶
func (*TestFormObject) DecodeURI ¶
func (s *TestFormObject) DecodeURI(d uri.Decoder) error
DecodeURI decodes TestFormObject from URI form.
func (*TestFormObject) EncodeURI ¶
func (s *TestFormObject) EncodeURI(e uri.Encoder) error
EncodeURI encodes TestFormObject as URI form.
func (*TestFormObject) GetMax ¶
func (s *TestFormObject) GetMax() int
GetMax returns the value of Max.
func (*TestFormObject) GetMin ¶
func (s *TestFormObject) GetMin() OptInt
GetMin returns the value of Min.
func (*TestFormObject) SetMax ¶
func (s *TestFormObject) SetMax(val int)
SetMax sets the value of Max.
func (*TestFormObject) SetMin ¶
func (s *TestFormObject) SetMin(val OptInt)
SetMin sets the value of Min.
type TestFormURLEncodedOK ¶
type TestFormURLEncodedOK struct{}
TestFormURLEncodedOK is response for TestFormURLEncoded operation.
type TestMultipartOK ¶
type TestMultipartOK struct{}
TestMultipartOK is response for TestMultipart operation.
type TestMultipartUploadOK ¶
type TestMultipartUploadOK struct { File string `json:"file"` OptionalFile OptString `json:"optional_file"` Files []string `json:"files"` }
func (*TestMultipartUploadOK) Decode ¶
func (s *TestMultipartUploadOK) Decode(d *jx.Decoder) error
Decode decodes TestMultipartUploadOK from json.
func (*TestMultipartUploadOK) Encode ¶
func (s *TestMultipartUploadOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TestMultipartUploadOK) GetFile ¶
func (s *TestMultipartUploadOK) GetFile() string
GetFile returns the value of File.
func (*TestMultipartUploadOK) GetFiles ¶
func (s *TestMultipartUploadOK) GetFiles() []string
GetFiles returns the value of Files.
func (*TestMultipartUploadOK) GetOptionalFile ¶
func (s *TestMultipartUploadOK) GetOptionalFile() OptString
GetOptionalFile returns the value of OptionalFile.
func (*TestMultipartUploadOK) MarshalJSON ¶
func (s *TestMultipartUploadOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TestMultipartUploadOK) SetFile ¶
func (s *TestMultipartUploadOK) SetFile(val string)
SetFile sets the value of File.
func (*TestMultipartUploadOK) SetFiles ¶
func (s *TestMultipartUploadOK) SetFiles(val []string)
SetFiles sets the value of Files.
func (*TestMultipartUploadOK) SetOptionalFile ¶
func (s *TestMultipartUploadOK) SetOptionalFile(val OptString)
SetOptionalFile sets the value of OptionalFile.
func (*TestMultipartUploadOK) UnmarshalJSON ¶
func (s *TestMultipartUploadOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TestMultipartUploadOK) Validate ¶
func (s *TestMultipartUploadOK) Validate() error
type TestMultipartUploadReq ¶
type TestMultipartUploadReq struct { OrderId OptInt `json:"orderId"` UserId OptInt `json:"userId"` File ht.MultipartFile `json:"file"` OptionalFile OptMultipartFile `json:"optional_file"` Files []ht.MultipartFile `json:"files"` }
func (*TestMultipartUploadReq) GetFile ¶
func (s *TestMultipartUploadReq) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*TestMultipartUploadReq) GetFiles ¶
func (s *TestMultipartUploadReq) GetFiles() []ht.MultipartFile
GetFiles returns the value of Files.
func (*TestMultipartUploadReq) GetOptionalFile ¶
func (s *TestMultipartUploadReq) GetOptionalFile() OptMultipartFile
GetOptionalFile returns the value of OptionalFile.
func (*TestMultipartUploadReq) GetOrderId ¶
func (s *TestMultipartUploadReq) GetOrderId() OptInt
GetOrderId returns the value of OrderId.
func (*TestMultipartUploadReq) GetUserId ¶
func (s *TestMultipartUploadReq) GetUserId() OptInt
GetUserId returns the value of UserId.
func (*TestMultipartUploadReq) SetFile ¶
func (s *TestMultipartUploadReq) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
func (*TestMultipartUploadReq) SetFiles ¶
func (s *TestMultipartUploadReq) SetFiles(val []ht.MultipartFile)
SetFiles sets the value of Files.
func (*TestMultipartUploadReq) SetOptionalFile ¶
func (s *TestMultipartUploadReq) SetOptionalFile(val OptMultipartFile)
SetOptionalFile sets the value of OptionalFile.
func (*TestMultipartUploadReq) SetOrderId ¶
func (s *TestMultipartUploadReq) SetOrderId(val OptInt)
SetOrderId sets the value of OrderId.
func (*TestMultipartUploadReq) SetUserId ¶
func (s *TestMultipartUploadReq) SetUserId(val OptInt)
SetUserId sets the value of UserId.
func (*TestMultipartUploadReq) Validate ¶
func (s *TestMultipartUploadReq) Validate() error
type TestReuseFormOptionalSchemaOK ¶ added in v0.64.0
type TestReuseFormOptionalSchemaOK struct{}
TestReuseFormOptionalSchemaOK is response for TestReuseFormOptionalSchema operation.
type TestReuseFormSchemaOK ¶ added in v0.64.0
type TestReuseFormSchemaOK struct{}
TestReuseFormSchemaOK is response for TestReuseFormSchema operation.
type TestShareFormSchemaOK ¶
type TestShareFormSchemaOK struct{}
TestShareFormSchemaOK is response for TestShareFormSchema operation.
type TestShareFormSchemaReq ¶
type TestShareFormSchemaReq interface {
// contains filtered or unexported methods
}
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) OnlyForm ¶ added in v0.64.0
func (UnimplementedHandler) OnlyForm(ctx context.Context, req *OnlyFormReq) error
OnlyForm implements onlyForm operation.
POST /onlyForm
func (UnimplementedHandler) OnlyMultipartFile ¶ added in v0.64.0
func (UnimplementedHandler) OnlyMultipartFile(ctx context.Context, req *OnlyMultipartFileReq) error
OnlyMultipartFile implements onlyMultipartFile operation.
POST /onlyMultipartFile
func (UnimplementedHandler) OnlyMultipartForm ¶ added in v0.64.0
func (UnimplementedHandler) OnlyMultipartForm(ctx context.Context, req *OnlyMultipartFormReq) error
OnlyMultipartForm implements onlyMultipartForm operation.
POST /onlyMultipartForm
func (UnimplementedHandler) TestFormURLEncoded ¶
func (UnimplementedHandler) TestFormURLEncoded(ctx context.Context, req *TestForm) error
TestFormURLEncoded implements testFormURLEncoded operation.
POST /testFormURLEncoded
func (UnimplementedHandler) TestMultipart ¶
func (UnimplementedHandler) TestMultipart(ctx context.Context, req *TestFormMultipart) error
TestMultipart implements testMultipart operation.
POST /testMultipart
func (UnimplementedHandler) TestMultipartUpload ¶
func (UnimplementedHandler) TestMultipartUpload(ctx context.Context, req *TestMultipartUploadReq) (r *TestMultipartUploadOK, _ error)
TestMultipartUpload implements testMultipartUpload operation.
POST /testMultipartUpload
func (UnimplementedHandler) TestReuseFormOptionalSchema ¶ added in v0.64.0
func (UnimplementedHandler) TestReuseFormOptionalSchema(ctx context.Context, req OptSharedRequestMultipart) error
TestReuseFormOptionalSchema implements testReuseFormOptionalSchema operation.
POST /testReuseFormOptionalSchema
func (UnimplementedHandler) TestReuseFormSchema ¶ added in v0.64.0
func (UnimplementedHandler) TestReuseFormSchema(ctx context.Context, req *SharedRequestMultipart) error
TestReuseFormSchema implements testReuseFormSchema operation.
POST /testReuseFormSchema
func (UnimplementedHandler) TestShareFormSchema ¶
func (UnimplementedHandler) TestShareFormSchema(ctx context.Context, req TestShareFormSchemaReq) error
TestShareFormSchema implements testShareFormSchema operation.
POST /testShareFormSchema
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_uri_gen.go
- oas_validators_gen.go