uploader

package
v0.0.0-...-7e8a30b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upload

func Upload(uploaders []Uploader) error

Types

type ErrUpload

type ErrUpload struct {
	Errors []error
	// contains filtered or unexported fields
}

func (*ErrUpload) Error

func (e *ErrUpload) Error() string

type ImageUploader

type ImageUploader struct {
	Uploader
	Path        string
	ImageBlob   []byte
	UploadSize  string
	ContentType string
	Ext         string
}

func (*ImageUploader) BuildResizeOption

func (u *ImageUploader) BuildResizeOption() (*resizer.ResizeOption, error)

func (*ImageUploader) Exec

func (u *ImageUploader) Exec() error

func (*ImageUploader) NeedsResize

func (u *ImageUploader) NeedsResize() bool

type TextFileUploader

type TextFileUploader struct {
	Uploader

	Body string
	Path string
}

func (*TextFileUploader) Exec

func (u *TextFileUploader) Exec() error

type Uploader

type Uploader interface {
	Exec() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL