dal

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirEntry

type DirEntry struct {
	Name  string
	IsDir bool
}

DirEntry is a minimal directory entry.

type Executor

type Executor interface {
	Run(name string, args ...string) (string, error)
	RunInDir(dir, name string, args ...string) (string, error)
	RunOsascript(script string) string
	Which(cmd string) bool
}

Executor abstracts command execution and PATH lookups.

type ExecutorImpl

type ExecutorImpl struct{}

ExecutorImpl is the real OS-backed Executor.

func NewExecutor

func NewExecutor() *ExecutorImpl

NewExecutor returns a new ExecutorImpl.

func (*ExecutorImpl) Run

func (e *ExecutorImpl) Run(name string, args ...string) (string, error)

func (*ExecutorImpl) RunInDir

func (e *ExecutorImpl) RunInDir(dir, name string, args ...string) (string, error)

func (*ExecutorImpl) RunOsascript

func (e *ExecutorImpl) RunOsascript(script string) string

func (*ExecutorImpl) Which

func (e *ExecutorImpl) Which(cmd string) bool

type FileSystem

type FileSystem interface {
	Exists(path string) bool
	EnsureDir(dir string) error
	ReadFile(path string) ([]byte, error)
	WriteFile(path string, data []byte, perm int) error
	ReadDir(path string) ([]DirEntry, error)
	BaseName(path string) string
}

FileSystem abstracts file and directory operations.

type FileSystemImpl

type FileSystemImpl struct{}

FileSystemImpl is the real OS-backed FileSystem.

func NewFileSystem

func NewFileSystem() *FileSystemImpl

NewFileSystem returns a new FileSystemImpl.

func (*FileSystemImpl) BaseName

func (f *FileSystemImpl) BaseName(path string) string

func (*FileSystemImpl) EnsureDir

func (f *FileSystemImpl) EnsureDir(dir string) error

func (*FileSystemImpl) Exists

func (f *FileSystemImpl) Exists(path string) bool

func (*FileSystemImpl) ReadDir

func (f *FileSystemImpl) ReadDir(path string) ([]DirEntry, error)

func (*FileSystemImpl) ReadFile

func (f *FileSystemImpl) ReadFile(path string) ([]byte, error)

func (*FileSystemImpl) WriteFile

func (f *FileSystemImpl) WriteFile(path string, data []byte, perm int) error

type Logger

type Logger interface {
	Init(verbose bool, w io.Writer)
}

Logger abstracts structured logger initialization.

type LoggerImpl

type LoggerImpl struct{}

LoggerImpl is the real zerolog-backed Logger.

func NewLogger

func NewLogger() *LoggerImpl

NewLogger returns a new LoggerImpl.

func (*LoggerImpl) Init

func (l *LoggerImpl) Init(verbose bool, w io.Writer)

Jump to

Keyboard shortcuts

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