fs

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(_ context.Context, fs fs.FS, v storage.ConfigProvider) (*Client, error)

func (Client) GetObject

func (c Client) GetObject(_ context.Context, objectPath string) (*storage.ObjectReader, error)

func (Client) HeadObject

func (c Client) HeadObject(ctx context.Context, objectPath string) (obj *storage.Object, err error)

func (Client) ListObject

func (c Client) ListObject(ctx context.Context, objectPrefix string, recursion bool, callback func(key storage.Object)) error

func (Client) MarshalJSON

func (c Client) MarshalJSON() ([]byte, error)

func (Client) Name

func (c Client) Name() string

func (Client) Open added in v1.4.0

func (c Client) Open(name string) (fs.File, error)

func (Client) PutObject

func (c Client) PutObject(ctx context.Context, objectPath string, obj io.Reader, headers http.Header, metadata map[string]string) error

func (Client) ReadDir added in v1.4.0

func (c Client) ReadDir(name string) ([]fs.DirEntry, error)

func (Client) Type

func (c Client) Type() string

type OpenFileFS added in v1.4.0

type OpenFileFS interface {
	OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
}

type Options

type Options struct {
	Base string `json:"base,omitempty" yaml:"base,omitempty"`
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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