Documentation ¶
Index ¶
- type Config
- type Controller
- type DownloadOptions
- type ListOptions
- type Option
- func WithBucket(bucket string) Option
- func WithCompression() Option
- func WithDefaultLogger() Option
- func WithEndpoint(endPoint string) Option
- func WithFileHandler(handler internal.IFileHandler) Option
- func WithLogger(logger *slog.Logger) Option
- func WithS3Client(key S3ClientType, client internal.IS3Client) Option
- type S3ClientType
- type S3Clients
- type UploadOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(opts ...Option) *Controller
func (*Controller) Download ¶
func (c *Controller) Download(opts DownloadOptions) error
func (*Controller) List ¶
func (c *Controller) List(opts ListOptions) error
func (*Controller) Upload ¶
func (c *Controller) Upload(opts UploadOptions) error
func (*Controller) UploadDirectoryOrFile ¶
func (c *Controller) UploadDirectoryOrFile( endpoint, bucket, prefix, path, encryptKey string, client internal.IS3Client) error
type DownloadOptions ¶
type ListOptions ¶
type ListOptions struct { S3ClientType S3ClientType Endpoint string Bucket string Prefix string }
type Option ¶
type Option func(c *Controller)
func WithBucket ¶
func WithCompression ¶
func WithCompression() Option
func WithDefaultLogger ¶
func WithDefaultLogger() Option
func WithEndpoint ¶
func WithFileHandler ¶
func WithFileHandler(handler internal.IFileHandler) Option
func WithLogger ¶
func WithS3Client ¶
func WithS3Client(key S3ClientType, client internal.IS3Client) Option
type S3ClientType ¶
type S3ClientType string
const (
S3ClientTypeOSS S3ClientType = "oss"
)
func (S3ClientType) Validate ¶
func (t S3ClientType) Validate() error
type S3Clients ¶
type S3Clients map[S3ClientType]internal.IS3Client
type UploadOptions ¶
Click to show internal directories.
Click to hide internal directories.