storage

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SimpleDirNameGeneratorFunc = func(pluginID string) string {
	return pluginID
}

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	ID      string
	Version string
}

type DirNameGeneratorFunc

type DirNameGeneratorFunc = func(pluginID string) string

type ErrPermissionDenied

type ErrPermissionDenied struct {
	Path string
}

func (ErrPermissionDenied) Error

func (e ErrPermissionDenied) Error() string

type ExtractedPluginArchive

type ExtractedPluginArchive struct {
	ID           string
	Version      string
	Dependencies []*Dependency
	Path         string
}

type FS

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

func FileSystem

func FileSystem(logger log.PrettyLogger, pluginsDir string) *FS

func (*FS) Extract

func (fs *FS) Extract(ctx context.Context, pluginID string, dirNameFunc DirNameGeneratorFunc, pluginArchive *zip.ReadCloser) (
	*ExtractedPluginArchive, error)

type ZipExtractor

type ZipExtractor interface {
	Extract(ctx context.Context, pluginID string, destDir DirNameGeneratorFunc, rc *zip.ReadCloser) (*ExtractedPluginArchive, error)
}

Jump to

Keyboard shortcuts

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