cmd

package
v0.0.0-...-beab8ce Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 77 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERRORIDUnknownError = "IDUnknownError"
	ERRORTest           = "Test"
	ERRORTest2          = "Test2"
)
View Source
const LOGFORMAT = `%{time:2006-01-02T15:04:05.000} %{shortpkg}::%{longfunc} [%{shortfile}] > %{level:.5s} - %{message}`

Variables

View Source
var DigestIds = map[DigestFlag][]string{
	DIGESTSHA512:     {"sha512"},
	DIGESTSHA256:     {"sha256"},
	DIGESTMD5:        {"md5"},
	DIGESTSHA1:       {"sha1"},
	DIGESTBlake2b160: {"blake2b160"},
	DIGESTBlake2b256: {"blake2b256"},
	DIGESTBlake2b384: {"blake2b384"},
	DIGESTBlake2b512: {"blake2b512"},
}
View Source
var ErrorFactory = archiveerror.NewFactory("gocfl")
View Source
var LogLevelIds = map[LogLevelFlag][]string{
	LOGLEVELDEBUG:    {"DEBUG"},
	LOGLEVELINFO:     {"INFO"},
	LOGLEVELNOTICE:   {"NOTICE"},
	LOGLEVELWARNING:  {"WARNING"},
	LOGLEVELERROR:    {"ERROR"},
	LOGLEVELCRITICAL: {"CRITICAL"},
}
View Source
var VersionIds = map[VersionFlag][]string{
	VERSION1_1: {"1.1", "v1.1"},
	VERSION1_0: {"1.0", "v1.0"},
}

Functions

func CreateStorageRoot

func CreateStorageRoot(ctx context.Context, objectWriteFS appendfs.FS, extensionConfigFS fs.FS, ver version.OCFLVersion, digest checksum.DigestAlgorithm, params map[string]string, logger ocfllogger.OCFLLogger) (storageroot.StorageRoot, error)

func Execute

func Execute()

func GetLogger

func GetLogger() ocfllogger.OCFLLogger

func GetMiniConfig

func GetMiniConfig() configutil.MiniConfig

func GetRootCmd

func GetRootCmd() *cobra.Command

func GetVFS

func GetVFS() vfsrw.VFSRW

func LoadStorageRoot

func LoadStorageRoot(
	ctx context.Context,
	storageRootFS appendfs.FS,
	extensionFactory extension.Factory[storageroot.ExtensionManager],
	logger ocfllogger.OCFLLogger,
) (storageroot.StorageRoot, error)

func LoadStorageRootRO

func LoadStorageRootRO(
	ctx context.Context,
	storageRootFS fs.FS,
	extensionFactory extension.Factory[storageroot.ExtensionManager],
	logger ocfllogger.OCFLLogger,
) (storageroot.StorageRoot, error)

func ResetForTest

func ResetForTest()

Types

type AddFS

type AddFS interface {
	AddFS(name string, fsys fs.FS)
}

type DigestFlag

type DigestFlag uint
const (
	DIGESTSHA512 DigestFlag = iota
	DIGESTSHA256
	DIGESTMD5
	DIGESTSHA1
	DIGESTBlake2b160
	DIGESTBlake2b256
	DIGESTBlake2b384
	DIGESTBlake2b512
)

type LogLevelFlag

type LogLevelFlag uint
const (
	LOGLEVELCRITICAL LogLevelFlag = iota
	LOGLEVELERROR
	LOGLEVELWARNING
	LOGLEVELNOTICE
	LOGLEVELINFO
	LOGLEVELDEBUG
)

type VersionFlag

type VersionFlag uint
const (
	VERSION1_1 VersionFlag = iota
	VERSION1_0
)

Directories

Path Synopsis
from https://github.com/mattetti/filebuffer
from https://github.com/mattetti/filebuffer

Jump to

Keyboard shortcuts

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