uploads

package
v0.0.0-...-1fb28bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const UploadFileOKCode int = 200

UploadFileOKCode is the HTTP code returned for type UploadFileOK

Variables

View Source
var UploadFileMaxParseMemory int64 = 32 << 20

UploadFileMaxParseMemory sets the maximum size in bytes for the multipart form parser for this operation.

The default value is 32 MB. The multipart parser stores up to this + 10MB.

Functions

This section is empty.

Types

type UploadFile

type UploadFile struct {
	Context *middleware.Context
	Handler UploadFileHandler
}
UploadFile swagger:route POST /upload uploads uploadFile

uploads

func NewUploadFile

func NewUploadFile(ctx *middleware.Context, handler UploadFileHandler) *UploadFile

NewUploadFile creates a new http.Handler for the upload file operation

func (*UploadFile) ServeHTTP

func (o *UploadFile) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type UploadFileHandler

type UploadFileHandler interface {
	Handle(UploadFileParams) middleware.Responder
}

UploadFileHandler interface for that can handle valid upload file params

type UploadFileHandlerFunc

type UploadFileHandlerFunc func(UploadFileParams) middleware.Responder

UploadFileHandlerFunc turns a function with the right signature into a upload file handler

func (UploadFileHandlerFunc) Handle

Handle executing the request and returning a response

type UploadFileOK

type UploadFileOK struct {
}

UploadFileOK OK

swagger:response uploadFileOK

func NewUploadFileOK

func NewUploadFileOK() *UploadFileOK

NewUploadFileOK creates UploadFileOK with default headers values

func (*UploadFileOK) WriteResponse

func (o *UploadFileOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type UploadFileParams

type UploadFileParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: formData
	*/
	File io.ReadCloser
}

UploadFileParams contains all the bound params for the upload file operation typically these are obtained from a http.Request

swagger:parameters uploadFile

func NewUploadFileParams

func NewUploadFileParams() UploadFileParams

NewUploadFileParams creates a new UploadFileParams object

There are no default values defined in the spec.

func (*UploadFileParams) BindRequest

func (o *UploadFileParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewUploadFileParams() beforehand.

type UploadFileURL

type UploadFileURL struct {
	// contains filtered or unexported fields
}

UploadFileURL generates an URL for the upload file operation

func (*UploadFileURL) Build

func (o *UploadFileURL) Build() (*url.URL, error)

Build a url path and query string

func (*UploadFileURL) BuildFull

func (o *UploadFileURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*UploadFileURL) Must

func (o *UploadFileURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*UploadFileURL) SetBasePath

func (o *UploadFileURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*UploadFileURL) String

func (o *UploadFileURL) String() string

String returns the string representation of the path with query string

func (*UploadFileURL) StringFull

func (o *UploadFileURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*UploadFileURL) WithBasePath

func (o *UploadFileURL) WithBasePath(bp string) *UploadFileURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL