bucket

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ConfigurationKey = "bucket"

Variables

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	GetFile(name string) (string, error)
	GetFolder(name string) (string, error)
	WithDir(dir string) (Bucket, error)
}

type Builder

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

func NewBuilder

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

func NewTestBuilder

func NewTestBuilder() *Builder

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)

type Config

type Config struct {
	Name string `yaml:"name"`

	// TODO breadchris use builder
	LocalName string
	Path      string
}

func NewConfig

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

func NewDefaultConfig

func NewDefaultConfig() Config

type LocalBucket

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

func FromDir

func FromDir(dir string) (*LocalBucket, error)

func NewUserCache

func NewUserCache(c Config) (*LocalBucket, error)

func (*LocalBucket) GetFile

func (c *LocalBucket) GetFile(name string) (string, error)

func (*LocalBucket) GetFolder

func (c *LocalBucket) GetFolder(name string) (string, error)

func (*LocalBucket) WithDir

func (c *LocalBucket) WithDir(dir string) (Bucket, error)

Jump to

Keyboard shortcuts

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