bucket

package
v0.0.0-...-0a0123b Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationKey = "bucket"

Variables

View Source
var ProviderSet = wire.NewSet(
	NewConfig,
	NewBuilder,
)

Functions

func CreateLocalDir

func CreateLocalDir(dirName string) (string, error)

func EnsureDirExists

func EnsureDirExists(p string) error

Types

type Builder

type Builder struct {
	Bucket *blob.Bucket
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(c Config) (*Builder, error)

func (*Builder) Build

func (s *Builder) Build() (string, error)

func (*Builder) Dir

func (s *Builder) Dir(name string) *Builder

func (*Builder) File

func (s *Builder) File(name string) (string, error)

func (*Builder) ListBucket

func (s *Builder) ListBucket(ctx context.Context) ([]os.FileInfo, error)

TODO breadchris can we use the fs interface? https://github.com/google/go-cloud/pull/3272/files

func (*Builder) SignedURL

func (s *Builder) SignedURL(ctx context.Context, objectKey string, duration time.Duration) (string, error)

type Config

type Config struct {
	Bucket string `yaml:"bucket"`

	// TODO breadchris this might be brittle
	Url *url.URL
}

func NewConfig

func NewConfig(config config.Provider) (Config, error)

func NewDefaultConfig

func NewDefaultConfig() Config

Jump to

Keyboard shortcuts

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