s3

package
v0.24.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidS3URLScheme

func IsValidS3URLScheme(s3URL string) bool

IsValidS3URLScheme returns true if the scheme is http:// or https:// and the url parses correctly, otherwise, return false

Types

type ObjectStore

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

func NewStore

func NewStore(logger logr.Logger) *ObjectStore

func (*ObjectStore) GetObject

func (o *ObjectStore) GetObject(ctx context.Context) (io.ReadCloser, error)

func (*ObjectStore) Init

func (o *ObjectStore) Init(config *Options) error

func (*ObjectStore) PutObject

func (o *ObjectStore) PutObject(ctx context.Context, body io.Reader) error

func (*ObjectStore) Target

func (o *ObjectStore) Target() string

type Options

type Options struct {
	SkipClientCredentials bool `json:"skip-client-credentials,omitempty"`

	AccessKeyID     string `json:"access-key-id,omitempty"`
	SecretAccessKey string `json:"secret-access-key,omitempty"`
	SessionToken    string `json:"session-token,omitempty"`

	Region    string `json:"region,omitempty"`
	Bucket    string `json:"bucket,omitempty"`
	Key       string `json:"key,omitempty"`
	Profile   string `json:"profile,omitempty"`
	S3URL     string `json:"url,omitempty"`
	PublicURL string `json:"public-url,omitempty"`
	KmsKeyID  string `json:"kms-key-id,omitempty"`
	Tagging   string `json:"tagging,omitempty"`

	S3ForcePathStyle      bool `json:"force-path-style,omitempty"`
	InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`

	CustomerKeyEncryptionFile string `json:"custom-key-encryption-file,omitempty"`
	CredentialsFile           string `json:"credentials-file,omitempty"`
	ServerSideEncryption      string `json:"server-side-encryption,omitempty"`
	CaCert                    string `json:"ca-cert,omitempty"`
	ChecksumAlgorithm         string `json:"checksum-algorithm,omitempty"`
}

func (*Options) FillCredentials

func (o *Options) FillCredentials(isClient bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳