Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Config ¶
type S3Config struct { Region string `toml:"region" mapstructure:"region" validate:"nonzero"` BucketName string `toml:"bucket_name" mapstructure:"bucket_name" validate:"nonzero"` AccessKey string `toml:"access_key" mapstructure:"access_key" validate:"nonzero"` SecretKey string `toml:"secret_key" mapstructure:"secret_key" validate:"nonzero"` Endpoint string `toml:"endpoint" mapstructure:"endpoint" validate:"nonzero"` UrlFormat string `toml:"url_format" mapstructure:"url_format" validate:"nonzero" default:"{endpoint}/{bucket}/{path}"` }
type S3Uploader ¶
type S3Uploader struct { Config S3Config // contains filtered or unexported fields }
func NewS3Uploader ¶
func NewS3Uploader(config S3Config) (*S3Uploader, error)
func (*S3Uploader) PutFile ¶
func (u *S3Uploader) PutFile(localPath, targetPath string) error
Click to show internal directories.
Click to hide internal directories.