Documentation
¶
Overview ¶
s3 connects OPA Control Plane to S3-compatible object storages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedProvider = &Error{
Message: "unsupported object storage provider",
}
ErrUnsupportedProvider is returned when an unsupported S3 provider is specified.
Functions ¶
func New ¶
func New(ctx context.Context, c config.ObjectStorage) (ext_os.ObjectStorage, error)
New creates a new S3 client based on the provided configuration.
Types ¶
type AmazonS3 ¶
type AmazonS3 struct {
// contains filtered or unexported fields
}
func (*AmazonS3) Upload ¶
func (s *AmazonS3) Upload(ctx context.Context, body io.ReadSeeker, opts ext_os.UploadOptions) error
Upload uploads a file to the S3-compatible storage. It computes the SHA256 digest of the file and records that to the object metadata. Relying on object ETag is not if the object is encrypted with SSE-C or SSE-KMS, as the ETag will not be the MD5 hash of the object. With (part) checksums, only parallellizable, less reliable checksums (CRCs) are supported.
type AzureBlobStorage ¶
type AzureBlobStorage struct {
// contains filtered or unexported fields
}
func (*AzureBlobStorage) Upload ¶
func (s *AzureBlobStorage) Upload(ctx context.Context, body io.ReadSeeker, opts ext_os.UploadOptions) error
type FileSystemStorage ¶
type FileSystemStorage struct {
// contains filtered or unexported fields
}
func (*FileSystemStorage) Upload ¶
func (s *FileSystemStorage) Upload(ctx context.Context, body io.ReadSeeker, _ ext_os.UploadOptions) error
type GCPCloudStorage ¶
type GCPCloudStorage struct {
// contains filtered or unexported fields
}
func (*GCPCloudStorage) Upload ¶
func (s *GCPCloudStorage) Upload(ctx context.Context, body io.ReadSeeker, opts ext_os.UploadOptions) error
Click to show internal directories.
Click to hide internal directories.