Documentation ¶
Index ¶
- Constants
- func Exist(ctx context.Context, p Path) (bool, error)
- func MaybeAddCompression(file string, w io.WriteCloser) (io.WriteCloser, error)
- func MaybeAddDecompression(file string, r io.ReadCloser) (io.ReadCloser, error)
- func NewReader(ctx context.Context, p Path) (io.ReadCloser, error)
- func NewWriter(ctx context.Context, p Path) (io.WriteCloser, error)
- func RegisterDriver(driver StorageDriver) error
- func Walk(ctx context.Context, p Path, w WalkFunc)
- type DriverType
- type FileStorage
- type FileStoreBase
- type Path
- type StorageDriver
- type WalkFunc
Constants ¶
View Source
const DefaultProtoMaxSize = 10000000
Variables ¶
This section is empty.
Functions ¶
func MaybeAddCompression ¶
func MaybeAddCompression(file string, w io.WriteCloser) (io.WriteCloser, error)
func MaybeAddDecompression ¶ added in v1.0.0
func MaybeAddDecompression(file string, r io.ReadCloser) (io.ReadCloser, error)
func RegisterDriver ¶ added in v1.0.0
func RegisterDriver(driver StorageDriver) error
Types ¶
type DriverType ¶ added in v1.0.0
type DriverType *string
type FileStorage ¶ added in v1.0.0
type FileStorage interface { RegisterDriver(driver StorageDriver) error FileStoreBase MustParse(p string) Path NewReaderS(p Path) (io.ReadCloser, error) NewPbReaderS(p Path) (pbio.ReadCloser, error) NewWriterS(p Path) (io.WriteCloser, error) NewPbWriterS(p Path) (pbio.WriteCloser, error) }
func DefaultFileStore ¶ added in v1.0.0
func DefaultFileStore() FileStorage
func New ¶ added in v1.0.0
func New() FileStorage
type FileStoreBase ¶ added in v1.0.0
type FileStoreBase interface { Parse(s string) (Path, error) Exist(context.Context, Path) (bool, error) Delete(context.Context, Path) error NewReader(context.Context, Path) (io.ReadCloser, error) NewWriter(context.Context, Path) (io.WriteCloser, error) List(context.Context, Path) ([]Path, error) Walk(context.Context, Path, WalkFunc) error }
type Path ¶ added in v1.0.0
type StorageDriver ¶ added in v1.0.0
type StorageDriver interface { Name() string Scheme() string Type() DriverType FileStoreBase }
Click to show internal directories.
Click to hide internal directories.