Documentation ¶
Overview ¶
Package upload implements image upload handlers.
Index ¶
Constants ¶
View Source
const (
// ErrNoSingleFile returned when does not contain single file in field 'file'
ErrNoSingleFile = "field 'file' does not contains single item"
)
Variables ¶
View Source
var ( // ErrNoAnyFile returned when request does not contain item in field 'files[]' ErrNoAnyFile = errors.New("field 'file' does not contains any item") // ErrNoAuth returned on Internal Server Error (no auth for upload) ErrNoAuth = errors.New("This endpoint must be under AuthRequired") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { CookieName string `long:"cookie" default:"sfs_auth" description:"Auth cookie name"` HeaderName string `long:"header" default:"X-SFS-Auth" description:"Auth header name"` CookieMaxAge int `long:"cookie_ttl" default:"36000" description:"Auth cookie TTL"` }
Config holds all config vars
type Service ¶
type Service struct { Config *Config Log *log.SugaredLogger ContextKey string ContextRequestIDKey string // contains filtered or unexported fields }
Service holds upload service
func (Service) HandlersClose ¶
func (srv Service) HandlersClose()
func (Service) HandlersRun ¶
func (srv Service) HandlersRun()
func (Service) SetupRouter ¶
type WidgetEvent ¶
Click to show internal directories.
Click to hide internal directories.