Documentation
¶
Index ¶
- Constants
- func IsErrBlobMissing(err error) bool
- func MakeDefault(context errors.Context, do debug.Options) env
- func MakeDefaultAndInitialize(context errors.Context, do debug.Options, overrideXDG bool) env
- func MakeFromXDGDotenvPath(context errors.Context, config config_mutable_cli.Config, xdgDotenvPath string) env
- func MakeWithHome(context errors.Context, home string, do debug.Options, ...) (s env)
- func MakeWithHomeAndInitialize(context errors.Context, home string, do debug.Options, cwdXDGOverride bool) (s env)
- func MakeWithXDG(context errors.Context, do debug.Options, xdg xdg.XDG) (s env)
- func NewFileReader(options FileReadOptions) (readCloser interfaces.ShaReadCloser, err error)
- func NewReader(options ReadOptions) (r *reader, err error)
- func NewWriter(o WriteOptions) (w *writer, err error)
- type Config
- type Env
- type ErrAlreadyExists
- type ErrBlobMissing
- type ErrTempAlreadyExists
- type FileReadOptions
- type MoveOptions
- type Mover
- type ReadOptions
- type RelativePath
- type TemporaryFS
- type WriteOptions
- type Writer
Constants ¶
View Source
const ( EnvDir = "DIR_ZIT" EnvBin = "BIN_ZIT" )
Variables ¶
This section is empty.
Functions ¶
func IsErrBlobMissing ¶
func MakeFromXDGDotenvPath ¶
func MakeFromXDGDotenvPath( context errors.Context, config config_mutable_cli.Config, xdgDotenvPath string, ) env
func MakeWithHome ¶
func MakeWithXDG ¶
func NewFileReader ¶
func NewFileReader( options FileReadOptions, ) (readCloser interfaces.ShaReadCloser, err error)
func NewReader ¶
func NewReader(options ReadOptions) (r *reader, err error)
func NewWriter ¶
func NewWriter(o WriteOptions) (w *writer, err error)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func MakeConfig ¶
func MakeConfig( compression interfaces.BlobCompression, encryption interfaces.BlobEncryption, lockInternalFiles bool, ) Config
func MakeConfigFromImmutableBlobConfig ¶
func MakeConfigFromImmutableBlobConfig( config interfaces.BlobStoreConfigImmutable, ) Config
func (*Config) GetBlobCompression ¶
func (c *Config) GetBlobCompression() interfaces.BlobCompression
func (*Config) GetBlobEncryption ¶
func (c *Config) GetBlobEncryption() interfaces.BlobEncryption
func (Config) GetBlobStoreConfigImmutable ¶
func (c Config) GetBlobStoreConfigImmutable() interfaces.BlobStoreConfigImmutable
func (Config) GetLockInternalFiles ¶
type Env ¶
type Env interface {
IsDryRun() bool
GetCwd() string
GetXDG() xdg.XDG
GetExecPath() string
GetTempLocal() TemporaryFS
MakeDir(ds ...string) (err error)
MakeDirPerms(perms os.FileMode, ds ...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 ErrAlreadyExists ¶
func MakeErrAlreadyExists ¶
func MakeErrAlreadyExists( sh interfaces.Sha, path string, ) (err *ErrAlreadyExists)
func (*ErrAlreadyExists) Error ¶
func (e *ErrAlreadyExists) Error() string
func (*ErrAlreadyExists) Is ¶
func (e *ErrAlreadyExists) Is(target error) bool
type ErrBlobMissing ¶
type ErrBlobMissing struct {
interfaces.ShaGetter
Path string
}
func (ErrBlobMissing) Error ¶
func (e ErrBlobMissing) Error() string
func (ErrBlobMissing) Is ¶
func (e ErrBlobMissing) Is(target error) bool
type ErrTempAlreadyExists ¶
type ErrTempAlreadyExists struct {
Path string
}
func MakeErrTempAlreadyExists ¶
func MakeErrTempAlreadyExists( path string, ) (err *ErrTempAlreadyExists)
func (*ErrTempAlreadyExists) Error ¶
func (e *ErrTempAlreadyExists) Error() string
func (*ErrTempAlreadyExists) ErrorCause ¶
func (e *ErrTempAlreadyExists) ErrorCause() string
func (*ErrTempAlreadyExists) ErrorRecovery ¶
func (e *ErrTempAlreadyExists) ErrorRecovery() string
func (*ErrTempAlreadyExists) ErrorRecoveryAutomatic ¶
func (e *ErrTempAlreadyExists) ErrorRecoveryAutomatic() string
func (*ErrTempAlreadyExists) Is ¶
func (e *ErrTempAlreadyExists) Is(target error) bool
type FileReadOptions ¶
type MoveOptions ¶
type MoveOptions struct {
Config
TemporaryFS
ErrorOnAttemptedOverwrite bool
FinalPath string
GenerateFinalPathFromSha bool
}
type Mover ¶
type Mover struct {
// contains filtered or unexported fields
}
func NewMover ¶
func NewMover(o MoveOptions) (m *Mover, err error)
func (Mover) GetShaLike ¶
func (w Mover) GetShaLike() (s interfaces.Sha)
func (Mover) WriteString ¶
type ReadOptions ¶
type RelativePath ¶
type TemporaryFS ¶
type TemporaryFS struct {
BasePath string
}
func (TemporaryFS) DirTemp ¶
func (s TemporaryFS) DirTemp() (d string, err error)
func (TemporaryFS) DirTempWithTemplate ¶
func (s TemporaryFS) DirTempWithTemplate( template string, ) (d string, err error)
func (TemporaryFS) FileTempWithTemplate ¶
func (s TemporaryFS) FileTempWithTemplate(t string) (f *os.File, err error)
type WriteOptions ¶
type Writer ¶
type Writer interface {
sha.WriteCloser
}
Click to show internal directories.
Click to hide internal directories.