domain

package
v0.0.0-...-133c720 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: GPL-3.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 Cmd

type Cmd interface {
	Run(runDir Path) error
}

type Cmds

type Cmds []Cmd

func (Cmds) Run

func (c Cmds) Run(runDir Path) error

type CommandSet

type CommandSet struct {
	Global       GlobalCommandSet
	WatchTargets WatchTargetsCommandSets
}

type EmptyCmd

type EmptyCmd struct{}

func (EmptyCmd) Run

func (e EmptyCmd) Run(_ Path) error

type Event

type Event struct {
	Path
	Operation
}

func NewEventByFsnotify

func NewEventByFsnotify(input fsnotify.Event) Event

type FileName

type FileName string

func (FileName) IsDefaultExcludeFile

func (n FileName) IsDefaultExcludeFile() bool

type GlobalCommandSet

type GlobalCommandSet struct {
	LifeCycle GlobalLifeCycle
}

type GlobalLifeCycle

type GlobalLifeCycle struct {
	OnStartWatch   Cmd
	OnBeforeChange Cmd
	OnAfterChange  Cmd
	OnFinishWatch  Cmd
}

type Millisecond

type Millisecond uint

func (Millisecond) Duration

func (m Millisecond) Duration() time.Duration

type MultiLineCmd

type MultiLineCmd struct {
	Cmds []SingleCmd
}

func (MultiLineCmd) Run

func (m MultiLineCmd) Run(runDir Path) error

type Operation

type Operation uint
const (
	Unknown           = 0
	Create  Operation = 1 << iota
	Write
	Remove
	Rename
	Chmod
)

func NewOperationByFsnotify

func NewOperationByFsnotify(input fsnotify.Op) Operation

type Path

type Path string

func (Path) Abs

func (p Path) Abs() string

func (Path) Equal

func (p Path) Equal(input Path) bool

func (Path) IsDir

func (p Path) IsDir() bool

func (Path) IsSubDir

func (p Path) IsSubDir(input Path) bool

func (Path) String

func (p Path) String() string

type PathSuffix

type PathSuffix string

func (PathSuffix) Contain

func (s PathSuffix) Contain(input Path) bool

type PathSuffixes

type PathSuffixes []PathSuffix

func (PathSuffixes) Contain

func (s PathSuffixes) Contain(input Path) bool

type Paths

type Paths []Path

func (Paths) Equal

func (p Paths) Equal(input Path) bool

func (Paths) IsSubFolder

func (p Paths) IsSubFolder(input Path) bool

type SingleCmd

type SingleCmd string

func (SingleCmd) Run

func (c SingleCmd) Run(runDir Path) error

type StructuredCmd

type StructuredCmd struct {
	Cmd Cmd
	Dir Path
}

func (StructuredCmd) Run

func (s StructuredCmd) Run(_ Path) error

type WatchTargetsCommandSet

type WatchTargetsCommandSet struct {
	Path      Path
	LifeCycle WatchTargetsLifeCycle
	Option    WatchTargetsOption
}

type WatchTargetsCommandSets

type WatchTargetsCommandSets []WatchTargetsCommandSet

type WatchTargetsLifeCycle

type WatchTargetsLifeCycle struct {
	OnStartWatch  Cmd
	OnChange      Cmd
	OnFinishWatch Cmd
}

type WatchTargetsOption

type WatchTargetsOption struct {
	ExcludeDir      Paths
	ExcludeSuffix   PathSuffixes
	WaitMillisecond Millisecond
}

Jump to

Keyboard shortcuts

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