uploads

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CreateUploadBadRequestCode int = 400

CreateUploadBadRequestCode is the HTTP code returned for type CreateUploadBadRequest

View Source
const CreateUploadCreatedCode int = 201

CreateUploadCreatedCode is the HTTP code returned for type CreateUploadCreated

View Source
const CreateUploadForbiddenCode int = 403

CreateUploadForbiddenCode is the HTTP code returned for type CreateUploadForbidden

View Source
const CreateUploadInternalServerErrorCode int = 500

CreateUploadInternalServerErrorCode is the HTTP code returned for type CreateUploadInternalServerError

View Source
const CreateUploadNotFoundCode int = 404

CreateUploadNotFoundCode is the HTTP code returned for type CreateUploadNotFound

View Source
const CreateUploadRequestEntityTooLargeCode int = 413

CreateUploadRequestEntityTooLargeCode is the HTTP code returned for type CreateUploadRequestEntityTooLarge

Variables

View Source
var CreateUploadMaxParseMemory int64 = 32 << 20

CreateUploadMaxParseMemory 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 CreateUpload

type CreateUpload struct {
	Context *middleware.Context
	Handler CreateUploadHandler
}
CreateUpload swagger:route POST /uploads uploads createUpload

Create a new upload

Uploads represent a single digital file, such as a JPEG or PDF. Currently, office application uploads are only for Services Counselors to upload files for orders, but this may be expanded in the future.

func NewCreateUpload

func NewCreateUpload(ctx *middleware.Context, handler CreateUploadHandler) *CreateUpload

NewCreateUpload creates a new http.Handler for the create upload operation

func (*CreateUpload) ServeHTTP

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

type CreateUploadBadRequest

type CreateUploadBadRequest struct {
}

CreateUploadBadRequest invalid request

swagger:response createUploadBadRequest

func NewCreateUploadBadRequest

func NewCreateUploadBadRequest() *CreateUploadBadRequest

NewCreateUploadBadRequest creates CreateUploadBadRequest with default headers values

func (*CreateUploadBadRequest) WriteResponse

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

WriteResponse to the client

type CreateUploadCreated

type CreateUploadCreated struct {

	/*
	  In: Body
	*/
	Payload *ghcmessages.Upload `json:"body,omitempty"`
}

CreateUploadCreated created upload

swagger:response createUploadCreated

func NewCreateUploadCreated

func NewCreateUploadCreated() *CreateUploadCreated

NewCreateUploadCreated creates CreateUploadCreated with default headers values

func (*CreateUploadCreated) SetPayload

func (o *CreateUploadCreated) SetPayload(payload *ghcmessages.Upload)

SetPayload sets the payload to the create upload created response

func (*CreateUploadCreated) WithPayload

func (o *CreateUploadCreated) WithPayload(payload *ghcmessages.Upload) *CreateUploadCreated

WithPayload adds the payload to the create upload created response

func (*CreateUploadCreated) WriteResponse

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

WriteResponse to the client

type CreateUploadForbidden

type CreateUploadForbidden struct {
}

CreateUploadForbidden not authorized

swagger:response createUploadForbidden

func NewCreateUploadForbidden

func NewCreateUploadForbidden() *CreateUploadForbidden

NewCreateUploadForbidden creates CreateUploadForbidden with default headers values

func (*CreateUploadForbidden) WriteResponse

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

WriteResponse to the client

type CreateUploadHandler

type CreateUploadHandler interface {
	Handle(CreateUploadParams) middleware.Responder
}

CreateUploadHandler interface for that can handle valid create upload params

type CreateUploadHandlerFunc

type CreateUploadHandlerFunc func(CreateUploadParams) middleware.Responder

CreateUploadHandlerFunc turns a function with the right signature into a create upload handler

func (CreateUploadHandlerFunc) Handle

Handle executing the request and returning a response

type CreateUploadInternalServerError

type CreateUploadInternalServerError struct {
}

CreateUploadInternalServerError server error

swagger:response createUploadInternalServerError

func NewCreateUploadInternalServerError

func NewCreateUploadInternalServerError() *CreateUploadInternalServerError

NewCreateUploadInternalServerError creates CreateUploadInternalServerError with default headers values

func (*CreateUploadInternalServerError) WriteResponse

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

WriteResponse to the client

type CreateUploadNotFound

type CreateUploadNotFound struct {
}

CreateUploadNotFound not found

swagger:response createUploadNotFound

func NewCreateUploadNotFound

func NewCreateUploadNotFound() *CreateUploadNotFound

NewCreateUploadNotFound creates CreateUploadNotFound with default headers values

func (*CreateUploadNotFound) WriteResponse

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

WriteResponse to the client

type CreateUploadParams

type CreateUploadParams struct {

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

	/*UUID of the document to add an upload to
	  In: query
	*/
	DocumentID *strfmt.UUID
	/*The file to upload.
	  Required: true
	  In: formData
	*/
	File io.ReadCloser
}

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

swagger:parameters createUpload

func NewCreateUploadParams

func NewCreateUploadParams() CreateUploadParams

NewCreateUploadParams creates a new CreateUploadParams object

There are no default values defined in the spec.

func (*CreateUploadParams) BindRequest

func (o *CreateUploadParams) 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 NewCreateUploadParams() beforehand.

type CreateUploadRequestEntityTooLarge

type CreateUploadRequestEntityTooLarge struct {
}

CreateUploadRequestEntityTooLarge payload is too large

swagger:response createUploadRequestEntityTooLarge

func NewCreateUploadRequestEntityTooLarge

func NewCreateUploadRequestEntityTooLarge() *CreateUploadRequestEntityTooLarge

NewCreateUploadRequestEntityTooLarge creates CreateUploadRequestEntityTooLarge with default headers values

func (*CreateUploadRequestEntityTooLarge) WriteResponse

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

WriteResponse to the client

type CreateUploadURL

type CreateUploadURL struct {
	DocumentID *strfmt.UUID
	// contains filtered or unexported fields
}

CreateUploadURL generates an URL for the create upload operation

func (*CreateUploadURL) Build

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

Build a url path and query string

func (*CreateUploadURL) BuildFull

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

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

func (*CreateUploadURL) Must

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

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

func (*CreateUploadURL) SetBasePath

func (o *CreateUploadURL) 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 (*CreateUploadURL) String

func (o *CreateUploadURL) String() string

String returns the string representation of the path with query string

func (*CreateUploadURL) StringFull

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

StringFull returns the string representation of a complete url

func (*CreateUploadURL) WithBasePath

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

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