Documentation ¶
Index ¶
- func MakeEndpointOfUpload(s Service) endpoint.Endpoint
- func NewHTTPRouter(svc Service, codecs httpcodec.Codecs, opts ...httpoption.Option) chi.Router
- func OASv2APIDoc(schema oas2.Schema) string
- func ValidateUploadRequest(newSchema func(*UploadRequest) validating.Schema) httpoption.Validator
- type HTTPClient
- type Service
- type UploadRequest
- type UploadResponse
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEndpointOfUpload ¶
MakeEndpointOfUpload creates the endpoint for s.Upload.
func NewHTTPRouter ¶
func OASv2APIDoc ¶
func ValidateUploadRequest ¶
func ValidateUploadRequest(newSchema func(*UploadRequest) validating.Schema) httpoption.Validator
ValidateUploadRequest creates a validator for UploadRequest.
Types ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
type Service ¶
type Service interface { // Upload uploads a file. //kun:op POST /upload //kun:success statusCode=204 Upload(ctx context.Context, file *httpcodec.FormFile) (err error) }
Service is used for uploading files.
type UploadRequest ¶
type UploadResponse ¶
type UploadResponse struct {
Err error `json:"-"`
}
func (*UploadResponse) Body ¶
func (r *UploadResponse) Body() interface{}
func (*UploadResponse) Failed ¶
func (r *UploadResponse) Failed() error
Failed implements endpoint.Failer.
Click to show internal directories.
Click to hide internal directories.