Documentation
¶
Index ¶
- func PseudoUUID() (string, error)
- type Header
- type Headers
- type MultipartFormDataObject
- func (multipart *MultipartFormDataObject) AddFile(parameterName string, file domain.UploadableFile) error
- func (multipart *MultipartFormDataObject) AddValue(parameterName string, value string) error
- func (multipart *MultipartFormDataObject) GetBoundary() string
- func (multipart *MultipartFormDataObject) GetContentType() string
- func (multipart *MultipartFormDataObject) GetFiles() map[string]domain.UploadableFile
- func (multipart *MultipartFormDataObject) GetValues() map[string]string
- type MultipartFormDataRequest
- type ParamRequest
- type RequestParam
- type RequestParams
- type ResponseHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header represents a single response header. Immutable.
type Headers ¶
type Headers []Header
Headers represents a slice of Header
func (Headers) GetDispositionFilename ¶
GetDispositionFilename returns the content of the filename found in the Content-Disposition header, or the empty string if it couldn't have been found.
func (Headers) GetHeaderValue ¶
GetHeaderValue searches for the header name and returns the value as string, or the empty string if it doesn't exist. This doesn't break HTTP support since headers can't have empty values
type MultipartFormDataObject ¶
type MultipartFormDataObject struct {
// contains filtered or unexported fields
}
MultipartFormDataObject is a representation of a multipart/form-data object.
func NewMultipartFormDataObject ¶
func NewMultipartFormDataObject() (*MultipartFormDataObject, error)
NewMultipartFormDataObject constructs a new MultipartFormDataObject
func (*MultipartFormDataObject) AddFile ¶
func (multipart *MultipartFormDataObject) AddFile(parameterName string, file domain.UploadableFile) error
AddFile adds a file parameter.
func (*MultipartFormDataObject) AddValue ¶
func (multipart *MultipartFormDataObject) AddValue(parameterName string, value string) error
AddValue adds a value parameter.
func (*MultipartFormDataObject) GetBoundary ¶
func (multipart *MultipartFormDataObject) GetBoundary() string
GetBoundary returns the boundary.
func (*MultipartFormDataObject) GetContentType ¶
func (multipart *MultipartFormDataObject) GetContentType() string
GetContentType returns the content type.
func (*MultipartFormDataObject) GetFiles ¶
func (multipart *MultipartFormDataObject) GetFiles() map[string]domain.UploadableFile
GetFiles returns the files.
func (*MultipartFormDataObject) GetValues ¶
func (multipart *MultipartFormDataObject) GetValues() map[string]string
GetValues returns the values.
type MultipartFormDataRequest ¶
type MultipartFormDataRequest interface { // ToMultipartFormDataObject converts this multipart/form-data request into a MultipartFormDataObject. ToMultipartFormDataObject() *MultipartFormDataObject }
MultipartFormDataRequest represents a multipart/form-data request.
type ParamRequest ¶
type ParamRequest interface { // ToRequestParameters converts this set of request parameters to a slice of RequestParam ToRequestParameters() RequestParams }
ParamRequest represents a set of request parameters.
type RequestParam ¶
type RequestParam struct {
// contains filtered or unexported fields
}
RequestParam represents a single request parameter. Immutable.
func NewRequestParam ¶
func NewRequestParam(name, value string) (*RequestParam, error)
NewRequestParam creates a RequestParam with the given name and value
func (RequestParam) Name ¶
func (rp RequestParam) Name() string
Name returns the name of the RequestParam
func (RequestParam) String ¶
func (rp RequestParam) String() string
String is the implementation of the Stringer interface Format: 'name:value'
func (RequestParam) Value ¶
func (rp RequestParam) Value() string
Value returns the value of the RequestParam
type RequestParams ¶
type RequestParams []RequestParam
RequestParams represents a slice of RequestParam