Documentation ¶
Index ¶
- Constants
- Variables
- func NewFake() *fake
- type Config
- type Minio
- type Object
- type S3
- func (s *S3) AccessData() map[string][]byte
- func (s *S3) Delete(path string) error
- func (s *S3) K8sSecretName() string
- func (s *S3) List(path string) ([]*Object, error)
- func (s *S3) PodEnvVars() map[string]string
- func (s *S3) Type() string
- func (s *S3) UploadFile(path string, file io.ReadSeeker) error
- type S3Client
- type Storage
Constants ¶
View Source
const ( S3Type storageType = "s3" MinioType storageType = "minio" FakeType storageType = "fake" )
Variables ¶
View Source
var (
ErrInvalidStorageType = errors.New("Invalid storage type")
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Type storageType `envconfig:"type" default:"s3"` AwsKey string `envconfig:"aws_key"` AwsSecret string `envconfig:"aws_secret"` AwsRegion string `envconfig:"aws_region"` AwsBucket string `envconfig:"aws_bucket"` AwsEndpoint string `envconfig:"aws_endpoint" default:""` AwsDisableSSL bool `envconfig:"aws_disable_ssl" default:"false"` AwsS3ForcePathStyle bool `envconfig:"aws_s3_force_path_style" default:"false"` }
type S3 ¶
type S3 struct { Client S3Client Key string Secret string Region string Bucket string Endpoint string DisableSSL bool S3ForcePathStyle bool }
func (*S3) AccessData ¶
func (*S3) K8sSecretName ¶
func (*S3) PodEnvVars ¶
func (*S3) UploadFile ¶
func (s *S3) UploadFile(path string, file io.ReadSeeker) error
type S3Client ¶
type S3Client interface { PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error) ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error) DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) }
Click to show internal directories.
Click to hide internal directories.