Versions in this module Expand all Collapse all v0 v0.4.1 Aug 24, 2022 Changes in this version + var ErrTokenNotFound = errors.New("Ctrl server return not found") + var ValidErrTooLarge = errors.New("File too large") + type Ctrl struct + func NewCtrl(url string) *Ctrl + func (c *Ctrl) GetParams(token string) (files *Files, err error) + func (c *Ctrl) SetStatus(token string, params interface{}) (*http.Response, error) + func (c *Ctrl) SetStatusErr(token string, err error) (*http.Response, error) + type Error struct + Code int + Msg string + type File struct + Crop bool + Field string + Format string + Height int + Name string + Optimize bool + Quality int + State *FileState + Type string + Valid *Valid + Width int + func (f *File) SetState(file *storage.File) + func (f *File) Upload(tmpf *TmpFiles) (err error) + type FileState struct + Md5 string + Size int64 + Uploaded bool + type Files []*File + func (fs *Files) Upload(conf *config.Config, stor *storage.Storage, r *http.Request, ...) (err error) + type Params struct + Response *Files + type StatusError struct + Error *Error + type StatusOk struct + Response *Files + type TmpFiles struct + func (t *TmpFiles) Close() + func (t *TmpFiles) GetByField(field string) (f *temp.File, err error) + func (t *TmpFiles) Result() map[string]*temp.File + func (t *TmpFiles) SetResult(name string, file *temp.File) + type Uploader struct + func NewUploader(c *config.Config, s *storage.Storage) *Uploader + func (u *Uploader) TryRequest(r *http.Request, w http.ResponseWriter) (status bool, err error, errCode int) + type Valid struct + MaxSize int64 + MimeTypes []string + func (v *Valid) HasError(tf *temp.File) (err error)