Documentation ¶
Index ¶
- func NewHTTPError(code int, msg interface{}) error
- func Router(h *Handler) http.Handler
- type HTTPError
- type Handler
- func (h *Handler) GetOriginalItem(w http.ResponseWriter, r *http.Request) error
- func (h *Handler) GetOriginalItemsList(w http.ResponseWriter, r *http.Request) error
- func (h *Handler) GetResizedItem(w http.ResponseWriter, r *http.Request) error
- func (h *Handler) GetResizedItemsList(w http.ResponseWriter, r *http.Request) error
- func (h *Handler) Resize(w http.ResponseWriter, r *http.Request) error
- func (h *Handler) Upload(w http.ResponseWriter, r *http.Request) error
- type ValidationError
- type Wrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPError ¶
type HTTPError struct { Code int `json:"code"` Message interface{} `json:"message"` }
HTTPError struct
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler struct
func New ¶
func New(db *sql.DB, q *repository.Queries, s *storage.Interactor, rf resizerFunc) *Handler
New is a factory function, returns a new instance of the HTTP handler interactor
func (*Handler) GetOriginalItem ¶
GetOriginalItem http handler
func (*Handler) GetOriginalItemsList ¶
GetOriginalItemsList http handler
func (*Handler) GetResizedItem ¶
GetResizedItem http handler
func (*Handler) GetResizedItemsList ¶
GetResizedItemsList http handler
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError ...
func NewValidationError ¶
func NewValidationError(errs url.Values) *ValidationError
NewValidationError factory
func (*ValidationError) Add ¶
func (e *ValidationError) Add(key string, vals []string)
Add validation errors to errors bag
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Implementation of the error interface
func (*ValidationError) GetAll ¶
func (e *ValidationError) GetAll() url.Values
GetAll validation errors
func (*ValidationError) Set ¶
func (e *ValidationError) Set(errBag url.Values)
Set validation errors bag
Click to show internal directories.
Click to hide internal directories.