Documentation
¶
Index ¶
- Constants
- Variables
- func IsErrBlobAlreadyExists(err error) bool
- func IsErrBlobMissing(err error) bool
- func MakeDefault(context errors.Context, utilityName string, debugOptions debug.Options) env
- func MakeDefaultAndInitialize(context errors.Context, utilityName string, do debug.Options, ...) env
- func MakeDefaultNoInit(context errors.Context, utilityName string, debugOptions debug.Options) env
- func MakeFromXDGDotenvPath(context errors.Context, debugOptions debug.Options, xdgDotenvPath string) env
- func MakeHashBucketPathFromMerkleId(id domain_interfaces.MarklId, buckets []int, multiHash bool, ...) string
- func MakeWithDefaultHome(context errors.Context, utilityName string, debugOptions debug.Options, ...) (env env)
- func MakeWithHomeAndInitialize(context errors.Context, utilityName string, home string, ...) (env env)
- func MakeWithXDG(context errors.Context, debugOptions debug.Options, xdg xdg.XDG) (env env)
- func MakeWithXDGRootOverrideHomeAndInitialize(context errors.Context, xdgRootOverride string, utilityName string, ...) (env env)
- func NewFileReaderOrErrNotExist(config Config, path string) (blobReader domain_interfaces.BlobReader, err error)
- func NewMover(config Config, moveOptions MoveOptions) (domain_interfaces.BlobWriter, error)
- func NewNopReader() (blobReader domain_interfaces.BlobReader, err error)
- func NewReader(config Config, readSeeker io.ReadSeeker) (reader *blobReader, err error)
- func NewWriter(config Config, ioWriter io.Writer) (wrighter *writer, err error)
- type Config
- type Env
- type ErrBlobAlreadyExists
- type ErrBlobMissing
- type ErrTempAlreadyExists
- type MoveOptions
- type RelativePath
- type TemporaryFS
Constants ¶
View Source
const ( EnvDir = "DIR_DODDER" // TODO chang to dodder-prefixed EnvBin = "BIN_DODDER" // TODO change to dodder-prefixed XDGUtilityNameDodder = "dodder" )
Variables ¶
View Source
var ( DefaultConfig = Config{ // contains filtered or unexported fields } )
View Source
var MakeDirIfNecessary = files.MakeDirIfNecessary
View Source
var MakeDirIfNecessaryForStringerWithHeadAndTail = files.MakeDirIfNecessaryForStringerWithHeadAndTail
View Source
var MakeHashBucketPath = files.MakeHashBucketPath
View Source
var MakeHashBucketPathJoinFunc = files.MakeHashBucketPathJoinFunc
View Source
var PathFromHeadAndTail = files.PathFromHeadAndTail
Functions ¶
func MakeDefault ¶
func MakeDefaultAndInitialize ¶
func MakeDefaultNoInit ¶
func MakeFromXDGDotenvPath ¶
func MakeHashBucketPathFromMerkleId ¶
func MakeWithDefaultHome ¶
func MakeWithHomeAndInitialize ¶
func MakeWithXDG ¶
func MakeWithXDGRootOverrideHomeAndInitialize ¶
func NewFileReaderOrErrNotExist ¶
func NewFileReaderOrErrNotExist( config Config, path string, ) (blobReader domain_interfaces.BlobReader, err error)
func NewMover ¶
func NewMover( config Config, moveOptions MoveOptions, ) (domain_interfaces.BlobWriter, error)
func NewNopReader ¶
func NewNopReader() (blobReader domain_interfaces.BlobReader, err error)
func NewReader ¶
func NewReader( config Config, readSeeker io.ReadSeeker, ) (reader *blobReader, err error)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func MakeConfig ¶
func MakeConfig( hashFormat domain_interfaces.FormatHash, funcJoin func(string, ...string) string, compression interfaces.IOWrapper, encryption domain_interfaces.MarklId, ) Config
func (Config) GetBlobCompression ¶
func (config Config) GetBlobCompression() interfaces.IOWrapper
func (Config) GetBlobEncryption ¶
func (config Config) GetBlobEncryption() interfaces.IOWrapper
type Env ¶
type Env interface {
interfaces.ActiveContextGetter
interfaces.EnvVarsAdder
IsDryRun() bool
GetCwd() string
GetXDG() xdg.XDG
GetXDGForBlobStores() xdg.XDG
GetXDGForBlobStoreId(blob_store_id.Id) xdg.XDG
GetExecPath() string
GetTempLocal() TemporaryFS
MakeDirs(dirs ...string) (err error)
MakeDirsPerms(perms os.FileMode, dirs ...string) (err error)
Rel(p string) (out string)
RelToCwdOrSame(p string) (p1 string)
MakeCommonEnv() map[string]string
MakeRelativePathStringFormatWriter() interfaces.StringEncoderTo[string]
AbsFromCwdOrSame(p string) (p1 string)
Delete(paths ...string) (err error)
}
type ErrBlobAlreadyExists ¶
type ErrBlobAlreadyExists struct {
BlobId domain_interfaces.MarklId
Path string
}
func MakeErrBlobAlreadyExists ¶
func MakeErrBlobAlreadyExists( blobId domain_interfaces.MarklId, path string, ) ErrBlobAlreadyExists
func (ErrBlobAlreadyExists) Error ¶
func (err ErrBlobAlreadyExists) Error() string
func (ErrBlobAlreadyExists) GetErrorType ¶
func (err ErrBlobAlreadyExists) GetErrorType() pkgErrDisamb
func (ErrBlobAlreadyExists) Is ¶
func (err ErrBlobAlreadyExists) Is(target error) bool
type ErrBlobMissing ¶
type ErrBlobMissing struct {
// TODO add blob store
BlobId domain_interfaces.MarklId
Path string
}
TODO create a constructor function to enable debugging
func (ErrBlobMissing) Error ¶
func (err ErrBlobMissing) Error() string
func (ErrBlobMissing) GetErrorType ¶
func (err ErrBlobMissing) GetErrorType() pkgErrDisamb
func (ErrBlobMissing) Is ¶
func (err ErrBlobMissing) Is(target error) bool
type ErrTempAlreadyExists ¶
type ErrTempAlreadyExists struct {
Path string
}
func MakeErrTempAlreadyExists ¶
func MakeErrTempAlreadyExists( path string, ) (err ErrTempAlreadyExists)
func (ErrTempAlreadyExists) Error ¶
func (err ErrTempAlreadyExists) Error() string
func (ErrTempAlreadyExists) GetErrorCause ¶
func (err ErrTempAlreadyExists) GetErrorCause() []string
func (ErrTempAlreadyExists) GetErrorRecovery ¶
func (err ErrTempAlreadyExists) GetErrorRecovery() []string
func (ErrTempAlreadyExists) GetErrorType ¶
func (err ErrTempAlreadyExists) GetErrorType() pkgErrDisamb
func (ErrTempAlreadyExists) Is ¶
func (err ErrTempAlreadyExists) Is(target error) bool
type MoveOptions ¶
type MoveOptions struct {
TemporaryFS
ErrorOnAttemptedOverwrite bool
FinalPathOrDir string
GenerateFinalPathFromDigest bool
}
type TemporaryFS ¶
type TemporaryFS = files.TemporaryFS
Source Files
¶
- before_xdg.go
- blob_config.go
- blob_mover.go
- blob_reader.go
- blob_writer.go
- construction.go
- delete.go
- errors.go
- main.go
- rel.go
- temp.go
- util.go
Click to show internal directories.
Click to hide internal directories.