storage

package
v0.0.0-...-01d18ac Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadDatabase

func DownloadDatabase(ctx context.Context, dbPath string) error

func UploadDatabase

func UploadDatabase(ctx context.Context, dbPath string) error

UploadDatabase uploads the SQLite database to object storage

Types

type S3Client

type S3Client struct {
	AccessKeyID     string
	SecretAccessKey string
	Region          string
	EndpointURL     string
	// contains filtered or unexported fields
}

S3Client is a lightweight S3-compatible client using only standard library

func NewS3Client

func NewS3Client(accessKeyID, secretAccessKey, region, endpointURL string) *S3Client

NewS3Client creates a new S3 client

func (*S3Client) GetObject

func (c *S3Client) GetObject(ctx context.Context, bucket, key string) (io.ReadCloser, error)

GetObject downloads an object from S3 and returns the response body

func (*S3Client) PutObject

func (c *S3Client) PutObject(ctx context.Context, bucket, key string, reader io.ReadSeeker, size int64) error

PutObject uploads an object to S3 from a file

Jump to

Keyboard shortcuts

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