aws

package
v8.23.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AWSS3IDKey = http.CanonicalHeaderKey("x-rqlite-auto-backup-id")
)

Functions

This section is empty.

Types

type S3Client

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

S3Client is a client for uploading data to S3.

func NewS3Client

func NewS3Client(endpoint, region, accessKey, secretKey, bucket, key string, forcePathStyle bool) (*S3Client, error)

NewS3Client returns an instance of an S3Client.

func (*S3Client) CurrentID added in v8.16.5

func (s *S3Client) CurrentID(ctx context.Context) (string, error)

CurrentID returns the last ID uploaded to S3.

func (*S3Client) Download

func (s *S3Client) Download(ctx context.Context, writer io.WriterAt) error

Download downloads data from S3.

func (*S3Client) String

func (s *S3Client) String() string

String returns a string representation of the S3Client.

func (*S3Client) Upload

func (s *S3Client) Upload(ctx context.Context, reader io.Reader, id string) error

Upload uploads data to S3.

type S3Config

type S3Config struct {
	Endpoint        string `json:"endpoint,omitempty"`
	Region          string `json:"region"`
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
	Bucket          string `json:"bucket"`
	Path            string `json:"path"`
	ForcePathStyle  bool   `json:"force_path_style"`
}

S3Config is the subconfig for the S3 storage type

Jump to

Keyboard shortcuts

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