Documentation
¶
Index ¶
- type Buffer
- type BufferOut
- type Command
- type Context
- type Func
- type Hooks
- type Ignore
- type Project
- func (p *Project) After()
- func (p *Project) Before()
- func (p *Project) Change(event fsnotify.Event)
- func (p *Project) CloseExit()
- func (p *Project) Err(err error)
- func (p *Project) GetExit() chan os.Signal
- func (p *Project) InitExit()
- func (p *Project) IsExitOpen() bool
- func (p *Project) Reload(path string, stop <-chan bool)
- func (p *Project) SetHooks(h Hooks)
- func (p *Project) Validate(path string, fcheck bool) bool
- func (p *Project) Watch(wg *sync.WaitGroup)
- type Response
- type Schema
- type Tool
- type Tools
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
StdOut []BufferOut `json:"stdOut"`
StdLog []BufferOut `json:"stdLog"`
StdErr []BufferOut `json:"stdErr"`
}
Buffer holds log entries per stream.
type BufferOut ¶
type BufferOut struct {
Time time.Time `json:"time"`
Text string `json:"text"`
Path string `json:"path"`
Type string `json:"type"`
Stream string `json:"stream"`
Errors []string `json:"errors"`
}
BufferOut is one log entry exchanged between CLI and web UI.
type Command ¶
type Command struct {
Cmd string `yaml:"command" json:"command"`
Type string `yaml:"type" json:"type"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Global bool `yaml:"global,omitempty" json:"global,omitempty"`
Output bool `yaml:"output,omitempty" json:"output,omitempty"`
}
Command fields
type Context ¶
type Context struct {
Path string
Project *Project
Stop <-chan bool
Watcher watcher.FileWatcher
Event fsnotify.Event
}
Context is passed to lifecycle callbacks.
type Hooks ¶
type Hooks struct {
After Func
Before Func
Err Func
Change Func
Reload Func
Settings *config.Settings
Sync chan string
}
Hooks holds runtime callbacks and settings injected into a Project by Realize.
type Ignore ¶
type Ignore struct {
Exts []string `yaml:"exts,omitempty" json:"exts,omitempty"`
Paths []string `yaml:"paths,omitempty" json:"paths,omitempty"`
}
Ignore lists exts/paths to skip.
type Project ¶
type Project struct {
// public fields
Name string `yaml:"name" json:"name"`
Path string `yaml:"path" json:"path"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
Args []string `yaml:"args,omitempty" json:"args,omitempty"`
Tools Tools `yaml:"commands" json:"commands"`
Watcher Watch `yaml:"watcher" json:"watcher"`
Buffer Buffer `yaml:"-" json:"buffer"`
ErrPattern string `yaml:"pattern,omitempty" json:"pattern,omitempty"`
// contains filtered or unexported fields
}
Project holds all project config and runtime state.
func (*Project) IsExitOpen ¶
IsExitOpen reports whether the exit channel is non-nil.
type Schema ¶
type Schema struct {
Projects []Project `yaml:"schema" json:"schema"`
}
Schema holds the project list.
type Tool ¶
type Tool struct {
Args []string `yaml:"args,omitempty" json:"args,omitempty"`
Method string `yaml:"method,omitempty" json:"method,omitempty"`
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Dir string `yaml:"dir,omitempty" json:"dir,omitempty"`
Status bool `yaml:"status,omitempty" json:"status,omitempty"`
Output bool `yaml:"output,omitempty" json:"output,omitempty"`
// contains filtered or unexported fields
}
Tool info
type Tools ¶
type Tools struct {
Clean Tool `yaml:"clean,omitempty" json:"clean,omitempty"`
Vet Tool `yaml:"vet,omitempty" json:"vet,omitempty"`
Fmt Tool `yaml:"fmt,omitempty" json:"fmt,omitempty"`
Test Tool `yaml:"test,omitempty" json:"test,omitempty"`
Generate Tool `yaml:"generate,omitempty" json:"generate,omitempty"`
Install Tool `yaml:"install,omitempty" json:"install,omitempty"`
Build Tool `yaml:"build,omitempty" json:"build,omitempty"`
Run Tool `yaml:"run,omitempty" json:"run,omitempty"`
// contains filtered or unexported fields
}
Tools go
type Watch ¶
type Watch struct {
Exts []string `yaml:"extensions" json:"extensions"`
Paths []string `yaml:"paths" json:"paths"`
Scripts []Command `yaml:"scripts,omitempty" json:"scripts,omitempty"`
Hidden bool `yaml:"hidden,omitempty" json:"hidden,omitempty"`
Ignore []string `yaml:"ignored_paths,omitempty" json:"ignored_paths,omitempty"`
}
Watch info
Click to show internal directories.
Click to hide internal directories.