engine

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxIterExceeded = fmt.Errorf("max iteration exceeded. please check your ignore file")
)

Functions

This section is empty.

Types

type Engine

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

func New

func New() *Engine

func NewMemfs

func NewMemfs() *Engine

func NewWithFS

func NewWithFS(fs billy.Filesystem, isMem bool) *Engine

func (Engine) DeleteHistory

func (e Engine) DeleteHistory(h History) error

func (Engine) DotToDtt

func (e Engine) DotToDtt(
	base gp.GardenPath,
	dot gp.GardenPath,
	group string,
) gp.GardenPath

Returns corresponding dtt path

func (Engine) DttToDot

func (e Engine) DttToDot(
	base gp.GardenPath,
	dtt gp.GardenPath,
) gp.GardenPath

Returns corresponding dot path

func (Engine) GetConfigDir

func (e Engine) GetConfigDir() (gp.GardenPath, error)

func (Engine) GetConfigGroupAll

func (e Engine) GetConfigGroupAll() (map[string]bool, error)

func (Engine) GetConfigGroupBase

func (e Engine) GetConfigGroupBase(group, resolver string) (gp.GardenPath, []string, error)

func (Engine) GetConfigGroupResolvers

func (e Engine) GetConfigGroupResolvers(group string) (map[string]string, error)

func (Engine) GetConfigGroups

func (e Engine) GetConfigGroups(plan string) (map[string]bool, bool, error)

func (Engine) GetConfigMode

func (e Engine) GetConfigMode() (string, error)

func (Engine) GetConfigPlans

func (e Engine) GetConfigPlans() (map[string][]string, error)

func (Engine) GetConfigVersion

func (e Engine) GetConfigVersion() (string, error)

func (Engine) GetHistoryByMode

func (e Engine) GetHistoryByMode(mode string) ([]History, error)

func (Engine) ReadGroupIgnore

func (e Engine) ReadGroupIgnore(group string) (*ignore.Ignore, error)

func (*Engine) Tx

func (e *Engine) Tx(fn func(tx *gorm.DB) error) error

func (Engine) TxDeleteHistory

func (e Engine) TxDeleteHistory(tx *gorm.DB, h History) error

func (Engine) TxGetHistoryByMode

func (e Engine) TxGetHistoryByMode(tx *gorm.DB, mode string) ([]History, error)

func (*Engine) TxSafe

func (e *Engine) TxSafe(fn func(tx *gorm.DB) error) error

func (Engine) TxUpsertHistory

func (e Engine) TxUpsertHistory(tx *gorm.DB, h History) error

func (Engine) UpsertHistory

func (e Engine) UpsertHistory(h History) error

func (Engine) Walk

func (e Engine) Walk(
	root gp.GardenPath,
	ig *ignore.Ignore,
	selectIgnored bool,
	onSelect func(gp.GardenPath, os.FileInfo) error,
) error

Run `onSelect` selectively and recursively on files

  • If selectIgnored = true, call onSelect on ignored files.
  • If selectIgnored = false, call onSelect on non-ignored files.

func (*Engine) WalkDotDir

func (e *Engine) WalkDotDir(
	group string,
	base gp.GardenPath,
	onDot func(gp.GardenPath, os.FileInfo) error,
) (err error)

Scan dotfiles that is not ignored

func (*Engine) WalkDttDir

func (e *Engine) WalkDttDir(
	group string,
	onDtt func(gp.GardenPath, os.FileInfo) error,
) (err error)

Scan dotato files in group that is not ignored

func (Engine) WalkIgnored

func (e Engine) WalkIgnored(
	root gp.GardenPath,
	ig *ignore.Ignore,
	onIgnored func(gp.GardenPath, os.FileInfo) error,
) error

func (Engine) WalkNonIgnored

func (e Engine) WalkNonIgnored(
	root gp.GardenPath,
	ig *ignore.Ignore,
	onNonIgnored func(gp.GardenPath, os.FileInfo) error,
) error

type History

type History = state.HistoryV1

Jump to

Keyboard shortcuts

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