s3

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Region          string
	Bucket          string
	AccessKeyID     string
	SecretAccessKey string
	Endpoint        string // optional; leave empty for real AWS S3
}

Config carries the per-request S3 credentials and target. Your Majesty should populate this from whatever source is appropriate (database, JWT claims, request headers, etc.)

type Provider

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

func NewProvider

func NewProvider(cfg Config) (*Provider, error)

func (*Provider) CreateFolder

func (p *Provider) CreateFolder(ctx context.Context, parent *string, name string, metadata map[string]string) (*string, error)

func (*Provider) GetContent

func (p *Provider) GetContent(
	ctx context.Context,
	id string,
	start int64,
	end int64,
) ([]byte, error)

func (*Provider) ToTusHandler

func (p *Provider) ToTusHandler(
	storageProviderId uuid.UUID,
	basePath string,
	uploadPrefix string,
	callback types.Callback,
) (*handler.Handler, error)

Jump to

Keyboard shortcuts

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