Documentation ¶
Index ¶
- func Download(c *cli.Context, uploader Uploader, log logger.Logger) error
- func Prune(c *cli.Context, uploader Uploader, log logger.Logger) error
- func Upload(c *cli.Context, uploader Uploader, log logger.Logger) error
- type B2Uploader
- func (u *B2Uploader) Delete(ctx context.Context, key string) error
- func (u *B2Uploader) Download(ctx context.Context, key string, writer io.Writer) error
- func (u *B2Uploader) FileExists(ctx context.Context, key string) (bool, error)
- func (u *B2Uploader) GetFileInfo(ctx context.Context, key string) (*FileInfo, error)
- func (u *B2Uploader) List(ctx context.Context, prefix string) ([]string, error)
- func (u *B2Uploader) Upload(ctx context.Context, key string, reader io.Reader, size int64) error
- type FileInfo
- type R2Uploader
- func (u *R2Uploader) Delete(ctx context.Context, key string) error
- func (u *R2Uploader) Download(ctx context.Context, key string, writer io.Writer) error
- func (u *R2Uploader) FileExists(ctx context.Context, key string) (bool, error)
- func (u *R2Uploader) GetFileInfo(ctx context.Context, key string) (*FileInfo, error)
- func (u *R2Uploader) List(ctx context.Context, prefix string) ([]string, error)
- func (u *R2Uploader) Upload(ctx context.Context, key string, reader io.Reader, size int64) error
- type S3Uploader
- func (u *S3Uploader) Delete(ctx context.Context, key string) error
- func (u *S3Uploader) Download(ctx context.Context, key string, writer io.Writer) error
- func (u *S3Uploader) FileExists(ctx context.Context, key string) (bool, error)
- func (u *S3Uploader) GetFileInfo(ctx context.Context, key string) (*FileInfo, error)
- func (u *S3Uploader) List(ctx context.Context, prefix string) ([]string, error)
- func (u *S3Uploader) Upload(ctx context.Context, key string, reader io.Reader, size int64) error
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type B2Uploader ¶
type B2Uploader struct {
// contains filtered or unexported fields
}
func NewB2Uploader ¶
func NewB2Uploader(bucket string) (*B2Uploader, error)
func (*B2Uploader) FileExists ¶
func (*B2Uploader) GetFileInfo ¶
type R2Uploader ¶
type R2Uploader struct {
// contains filtered or unexported fields
}
func NewR2Uploader ¶
func NewR2Uploader(bucket string) (*R2Uploader, error)
func (*R2Uploader) FileExists ¶
func (*R2Uploader) GetFileInfo ¶
type S3Uploader ¶
type S3Uploader struct {
// contains filtered or unexported fields
}
func NewS3Uploader ¶
func NewS3Uploader(region, bucket string) (*S3Uploader, error)
func (*S3Uploader) FileExists ¶
func (*S3Uploader) GetFileInfo ¶
type Uploader ¶
type Uploader interface { Upload(ctx context.Context, key string, reader io.Reader, size int64) error Download(ctx context.Context, key string, writer io.Writer) error List(ctx context.Context, prefix string) ([]string, error) Delete(ctx context.Context, key string) error FileExists(ctx context.Context, key string) (bool, error) GetFileInfo(ctx context.Context, key string) (*FileInfo, error) }
Click to show internal directories.
Click to hide internal directories.