driver

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Depth

type Depth int
const (
	DepthUnknown Depth = iota
	DepthType
	DepthTarget
	DepthFile
)

type Driver

type Driver interface {
	Name() string
	GetContent(path string) ([]byte, error)
	PutContent(path string, content []byte) error
	Reader(path string) (io.ReadCloser, error)
	Writer(path string) (FileWriter, error)
	Stat(path string) (FileInfo, error)
	List(path string) ([]string, error)
	Move(sourcePath string, destPath string) error
	Delete(path string) error
	Walk(path string) ([]FileInfo, error)
	WalkDir(path string) ([]string, error)
	Mkdir(path string) error
	RootDirectory() string
}

https://github.com/distribution/distribution/blob/v2.8.2/registry/storage/driver/storagedriver.go#L41

type FileInfo

type FileInfo interface {
	Fullpath() string
	Size() int64
	ModTime() time.Time
	IsDir() bool
}

type FileWriter

type FileWriter interface {
	io.WriteCloser
	Size() int64
	Cancel() error
	Commit() error
}

type LogPath

type LogPath struct {
	RootDirectory string
	Subpath       string
	// contains filtered or unexported fields
}

func (*LogPath) Depth

func (l *LogPath) Depth() Depth

func (*LogPath) Filename

func (l *LogPath) Filename() string

func (*LogPath) Fullpath

func (l *LogPath) Fullpath() string

func (*LogPath) LogType

func (l *LogPath) LogType() string

func (*LogPath) Target

func (l *LogPath) Target() string

type PathNotFoundError

type PathNotFoundError struct {
	Path string
	Err  error
}

func (PathNotFoundError) Error

func (err PathNotFoundError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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