Documentation ¶
Index ¶
- type FilePrefix
- type IStorage
- type S3
- func (s *S3) CommitFileUploaded(c context.Context, key string, parent string, target string, prefix FilePrefix) (string, func(*string) error, func() error, error)
- func (s *S3) CopyObject(c context.Context, sourceKey string, destKey string, ...) error
- func (s *S3) DeleteObject(c context.Context, key string) error
- func (s *S3) FetchMetadata(c context.Context, key string) (map[string]string, error)
- func (s *S3) Init(ctx context.Context) (*gobs.ServiceLifeCycle, error)
- func (s *S3) IsExisted(ctx context.Context, key string) (bool, error)
- func (s *S3) Setup(ctx context.Context, deps ...gobs.IService) error
- type S3Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IStorage ¶
type IStorage interface { IsExisted(ctx context.Context, key string) (bool, error) FetchMetadata(c context.Context, key string) (map[string]string, error) CopyObject(c context.Context, sourceKey string, destKey string, metadata map[string]string) error DeleteObject(c context.Context, key string) error CommitFileUploaded(c context.Context, key string, parent string, target string, prefix FilePrefix) (string, func(*string) error, func() error, error) }
func NewIStorage ¶
func NewIStorage() IStorage
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
func (*S3) CommitFileUploaded ¶
func (*S3) CopyObject ¶
func (*S3) FetchMetadata ¶
type S3Config ¶
type S3Config struct { AccessKey string `env:"S3_ACCESS_KEY" mapstructure:"S3_ACCESS_KEY"` SecretKey string `env:"S3_SECRET_KEY" mapstructure:"S3_SECRET_KEY"` Region string `env:"S3_REGION" mapstructure:"S3_REGION"` Bucket string `env:"S3_BUCKET_NAME" mapstructure:"S3_BUCKET_NAME"` URI string `env:"S3_URI" mapstructure:"S3_URI"` }
Click to show internal directories.
Click to hide internal directories.