s3

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package s3 implements an apt.Store in Amazon S3

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Client        *s3.Client
	Bucket        string
	Prefix        string
	MaxAgeSeconds int32
}

func NewStore

func NewStore(c aws.Config, bucket string) *Store

func (*Store) Create

func (store *Store) Create(ctx context.Context, name string, content io.Reader, contentLen int64) (apt.FileToken, error)

func (*Store) Delete

func (store *Store) Delete(ctx context.Context, name string) error

func (*Store) Get

func (store *Store) Get(ctx context.Context, name string) (io.ReadCloser, apt.FileToken, error)
func (store *Store) Link(ctx context.Context, oldName string, newName string) error

func (*Store) List

func (store *Store) List(ctx context.Context, name string) ([]string, error)

func (*Store) Overwrite

func (store *Store) Overwrite(ctx context.Context, name string, content io.Reader, contentLen int64) (apt.FileToken, error)

func (*Store) Replace

func (store *Store) Replace(ctx context.Context, name string, token apt.FileToken, content io.Reader, contentLen int64) (apt.FileToken, error)

func (*Store) URL

func (store *Store) URL(ctx context.Context, name string) (string, error)

Jump to

Keyboard shortcuts

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