Documentation
¶
Index ¶
- Constants
- Variables
- func Acl(bucket, key string) *s3.GetObjectAclOutput
- func Detail(bucket, key string) *s3.GetObjectOutput
- func Download(bucket, key string, file io.WriterAt)
- func Filename(path string) string
- func GetDownloadFilePath() (string, error)
- func SaveDownloadFile(dllFile *DownloadListFile) error
- func Update(bucket, key string, body io.Reader) *s3.PutObjectOutput
- type DownloadItem
- type DownloadListFile
- type Node
- type S3ListType
- type S3Object
- type S3ObjectType
Constants ¶
View Source
const RequestTimeout time.Duration = time.Second * 30
Variables ¶
View Source
var (
MockFlag bool
)
Functions ¶
func Acl ¶
func Acl(bucket, key string) *s3.GetObjectAclOutput
func Detail ¶
func Detail(bucket, key string) *s3.GetObjectOutput
func GetDownloadFilePath ¶
func SaveDownloadFile ¶
func SaveDownloadFile(dllFile *DownloadListFile) error
Types ¶
type DownloadItem ¶
type DownloadItem struct { Filename string `yaml:"filename"` S3Path string `yaml:"s3_path"` DownloadPath string `yaml:"download_path"` }
func NewDownloadItem ¶
func NewDownloadItem(filename, s3Path, downloadPath string) *DownloadItem
type DownloadListFile ¶
type DownloadListFile struct {
Items []*DownloadItem `yaml:"items"`
}
func LoadDownloadFile ¶
func LoadDownloadFile() (*DownloadListFile, error)
type Node ¶
type Node struct { Key string Parent *Node Objects []*S3Object Position int // contains filtered or unexported fields }
func (*Node) GetType ¶
func (n *Node) GetType() S3ListType
func (*Node) IsBucketRoot ¶
func (*Node) IsExistChildren ¶
type S3ListType ¶
type S3ListType int
const ( BucketList S3ListType = iota //0 BucketRootList ObjectList )
type S3Object ¶
type S3Object struct { ObjType S3ObjectType Name string Date *time.Time Size *int64 }
func ListBuckets ¶
func ListBuckets() []*S3Object
func ListObjects ¶
func NewS3Object ¶
type S3ObjectType ¶
type S3ObjectType int
const ( Bucket S3ObjectType = iota //0 Dir PreDir Object )
Click to show internal directories.
Click to hide internal directories.