s3

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

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

New creates a new S3 client based on the provided configuration.

Types

type AmazonS3

type AmazonS3 struct {
	// contains filtered or unexported fields
}

func (*AmazonS3) Download

func (s *AmazonS3) Download(ctx context.Context) (io.Reader, error)

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) Download

func (*AzureBlobStorage) Upload

type Error

type Error struct {
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type FileSystemStorage

type FileSystemStorage struct {
	// contains filtered or unexported fields
}

func (*FileSystemStorage) Download

func (s *FileSystemStorage) Download(context.Context) (io.Reader, error)

func (*FileSystemStorage) Upload

type GCPCloudStorage

type GCPCloudStorage struct {
	// contains filtered or unexported fields
}

func (*GCPCloudStorage) Download

func (*GCPCloudStorage) Download(context.Context) (io.Reader, error)

func (*GCPCloudStorage) Upload

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL