Documentation ¶
Index ¶
- Variables
- func IsInvalidUpload(err error) bool
- func NewClient(ctx echo.Context, ownerType string, ownerID uint64, clientName string, ...) uploadClient.Client
- func NewClientWithModel(fileM *modelFile.File, clientName string, result *uploadClient.Result) uploadClient.Client
- func NewClientWithResult(ctx echo.Context, ownerType string, ownerID uint64, clientName string, ...) uploadClient.Client
- type PrepareData
- func (p *PrepareData) Close() error
- func (p *PrepareData) IsInvalidUpload(err error) bool
- func (p *PrepareData) MakeCallback(fileM *modelFile.File, storer driver.Storer, subdir string) func(*uploadClient.Result, io.Reader, io.Reader) error
- func (p *PrepareData) MakeModel(ownerType string, ownerID uint64) *modelFile.File
- func (p *PrepareData) MakeUploader(ownerType string, ownerID uint64, clientName string) ...
- func (p *PrepareData) Multiple() bool
- func (p *PrepareData) NewStorer(subdir string) (driver.Storer, error)
- func (p *PrepareData) Save(fileM *modelFile.File, clientName string, clients ...uploadClient.Client) (client uploadClient.Client, err error)
- func (p *PrepareData) SetMultiple(multiple bool) *PrepareData
- func (p *PrepareData) Storer() (driver.Storer, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var NopChecker uploadClient.Checker = func(rs *uploadClient.Result, rd io.Reader) error { return nil }
Functions ¶
func IsInvalidUpload ¶ added in v4.2.2
func NewClientWithModel ¶ added in v4.1.0
func NewClientWithModel(fileM *modelFile.File, clientName string, result *uploadClient.Result) uploadClient.Client
func NewClientWithResult ¶ added in v4.1.0
func NewClientWithResult(ctx echo.Context, ownerType string, ownerID uint64, clientName string, result *uploadClient.Result) uploadClient.Client
Types ¶
type PrepareData ¶
type PrepareData struct { StorerInfo storerUtils.Info DBSaver dbsaver.DBSaver Checker uploadClient.Checker Checkin checker.Checker Subdir string FileType string // contains filtered or unexported fields }
func NoCheckTokenPrepare ¶ added in v4.2.2
func NoCheckTokenPrepare(ctx echo.Context, subdir string, fileType string, storerInfos ...storerUtils.Info) (*PrepareData, error)
func Prepare ¶
func Prepare(ctx echo.Context, subdir string, fileType string, storerInfos ...storerUtils.Info) (*PrepareData, error)
Prepare 上传前的环境准备
func (*PrepareData) Close ¶
func (p *PrepareData) Close() error
func (*PrepareData) IsInvalidUpload ¶ added in v4.2.2
func (p *PrepareData) IsInvalidUpload(err error) bool
func (*PrepareData) MakeCallback ¶ added in v4.1.0
func (*PrepareData) MakeModel ¶ added in v4.1.0
func (p *PrepareData) MakeModel(ownerType string, ownerID uint64) *modelFile.File
func (*PrepareData) MakeUploader ¶ added in v4.2.2
func (p *PrepareData) MakeUploader(ownerType string, ownerID uint64, clientName string) func(fieldName string, fileType uploadClient.FileType, multiple bool) ([]*uploadClient.Result, error)
func (*PrepareData) Multiple ¶ added in v4.1.0
func (p *PrepareData) Multiple() bool
func (*PrepareData) NewStorer ¶ added in v4.2.4
func (p *PrepareData) NewStorer(subdir string) (driver.Storer, error)
func (*PrepareData) Save ¶ added in v4.1.0
func (p *PrepareData) Save(fileM *modelFile.File, clientName string, clients ...uploadClient.Client) (client uploadClient.Client, err error)
func (*PrepareData) SetMultiple ¶ added in v4.1.0
func (p *PrepareData) SetMultiple(multiple bool) *PrepareData
Click to show internal directories.
Click to hide internal directories.