directory

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPathIsRequired = errors.New("path is required")

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string `mapstructure:"path"`
}

func NewConfig added in v0.1.9

func NewConfig() *Config

func (*Config) Validate added in v0.1.9

func (d *Config) Validate() error

type Storage

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

func NewStorage

func NewStorage(cfg *Config) (*Storage, error)

func (*Storage) Delete

func (d *Storage) Delete(ctx context.Context, filePaths ...string) error

func (*Storage) DeleteAll added in v0.1.8

func (d *Storage) DeleteAll(ctx context.Context, pathPrefix string) error

func (*Storage) Dirname

func (d *Storage) Dirname() string

func (*Storage) Exists

func (d *Storage) Exists(ctx context.Context, fileName string) (bool, error)

func (*Storage) GetCwd

func (d *Storage) GetCwd() string

func (*Storage) GetObject

func (d *Storage) GetObject(ctx context.Context, filePath string) (reader io.ReadCloser, err error)

func (*Storage) ListDir

func (d *Storage) ListDir(ctx context.Context) (files []string, dirs []storages.Storager, err error)

func (*Storage) PutObject

func (d *Storage) PutObject(ctx context.Context, filePath string, body io.Reader) error

func (*Storage) SubStorage

func (d *Storage) SubStorage(dp string, relative bool) storages.Storager

Jump to

Keyboard shortcuts

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