Documentation
¶
Index ¶
- Constants
- func AutoDetectScriptFile() (string, error)
- func GlueHome() (string, error)
- func InstallNativeGlueModules(glue *Glue)
- func TryFindFile(directory string, filename string) (string, error)
- func TryFindGlueFile(path string) (string, error)
- func ValidSelectorString(selector string) bool
- type Glue
- type GlueCodeGroup
- type GlueLogger
- func (gl *GlueLogger) Debug(msg interface{}, keyvals ...interface{})
- func (gl *GlueLogger) Debugf(format string, args ...interface{})
- func (gl *GlueLogger) Error(msg interface{}, keyvals ...interface{})
- func (gl *GlueLogger) Errorf(format string, args ...interface{})
- func (gl *GlueLogger) Info(msg interface{}, keyvals ...interface{})
- func (gl *GlueLogger) Infof(format string, args ...interface{})
- func (gl *GlueLogger) Loud()
- func (gl *GlueLogger) Quiet()
- func (gl *GlueLogger) Warn(msg interface{}, keyvals ...interface{})
- func (gl *GlueLogger) Warnf(format string, args ...interface{})
- type GlueOptions
- type GluePlugin
- type GlueScript
- type GlueStack
- func (scope *GlueStack) ActiveScript() *GlueScript
- func (scope *GlueStack) AnnotateCurrentGroup(key string, value string)
- func (scope *GlueStack) CurrentGroup() *GlueCodeGroup
- func (scope *GlueStack) GetActiveGroupAnnotation(key string) string
- func (scope *GlueStack) HasActiveScript() bool
- func (scope *GlueStack) PopGroup()
- func (scope *GlueStack) PopScript()
- func (scope *GlueStack) PushGroup(name string)
- func (scope *GlueStack) PushScript(file string, kind ScriptType)
- type GlueWriter
- type Logger
- type Plan
- type PluginKind
- type ScriptType
- type Selector
- type StepFunc
- type TestFunc
- type TestResult
- type TestSuite
- type Testable
- type TreePlan
- type UnitTest
Constants ¶
View Source
const ( EV_GLUE_PLAN_START = "glue:plan_start" EV_GLUE_PLAN_END = "glue:plan_end" EV_GROUP_START = "group:start" EV_GROUP_END = "group:end" EV_NEW_TRACE = "trace:new" )
View Source
const GroupSeparator = "."
View Source
const NegationRune = '~'
View Source
const RootLevel = "root"
View Source
const SelectorFilterSeparator = ","
View Source
const Wildcard = "*"
Variables ¶
This section is empty.
Functions ¶
func AutoDetectScriptFile ¶
func GlueHome ¶
@auteur("Configuration")
XDG_CONFIG_HOME ¶
Glue respects the `XDG_CONFIG_HOME` environment variable. If it is set, Glue will look for the configuration file in the directory specified by `XDG_CONFIG_HOME`. If the variable is not set, Glue will look for the configuration file in the default directory (`~/.config/glue`)
``` ~/.config/glue/glue.lua ```
func InstallNativeGlueModules ¶
func InstallNativeGlueModules(glue *Glue)
func TryFindGlueFile ¶
func ValidSelectorString ¶
Types ¶
type Glue ¶
type Glue struct {
q.Eventful
Testable
Stack GlueStack
BluePrint Blueprint
Verbose bool
Done bool
Unsafe bool
FailFast bool
Log *GlueLogger
Modules []*GluePlugin
UserSelector Selector
Cache q.Cache[string]
Context context.Context
Runtime runtime.Runtime
Machine machine.Machine
}
func NewGlueWithOptions ¶
func NewGlueWithOptions(options GlueOptions) *Glue
func (*Glue) CompilePlan ¶
Main entry point for glue Given a script file, it compiles it into an executable plan
func (*Glue) Getwd ¶
Getwd returns the working directory of the active script or the current working directory
func (*Glue) Plug ¶
func (glue *Glue) Plug(name string, kind PluginKind) *plugin
Entry point for creating a new module
Example:
glue.Plug().
Name("myModule").
Short("description").
Do(...)
type GlueCodeGroup ¶
func (*GlueCodeGroup) Set ¶
func (grp *GlueCodeGroup) Set(key string, value string)
type GlueLogger ¶
type GlueLogger struct {
Stdout GlueWriter
Stderr GlueWriter
// contains filtered or unexported fields
}
func CreateLogger ¶
func CreateLogger() *GlueLogger
func (*GlueLogger) Debug ¶
func (gl *GlueLogger) Debug(msg interface{}, keyvals ...interface{})
func (*GlueLogger) Debugf ¶
func (gl *GlueLogger) Debugf(format string, args ...interface{})
func (*GlueLogger) Error ¶
func (gl *GlueLogger) Error(msg interface{}, keyvals ...interface{})
func (*GlueLogger) Errorf ¶
func (gl *GlueLogger) Errorf(format string, args ...interface{})
func (*GlueLogger) Info ¶
func (gl *GlueLogger) Info(msg interface{}, keyvals ...interface{})
func (*GlueLogger) Infof ¶
func (gl *GlueLogger) Infof(format string, args ...interface{})
func (*GlueLogger) Loud ¶
func (gl *GlueLogger) Loud()
func (*GlueLogger) Quiet ¶
func (gl *GlueLogger) Quiet()
func (*GlueLogger) Warn ¶
func (gl *GlueLogger) Warn(msg interface{}, keyvals ...interface{})
func (*GlueLogger) Warnf ¶
func (gl *GlueLogger) Warnf(format string, args ...interface{})
type GlueOptions ¶
type GluePlugin ¶
type GluePlugin struct {
Name string
Brief string
Args []runtime.ArgDef
ReturnType runtime.Type
Kind PluginKind
}
A representation of a module Modules can be installed into the Lua state
type GlueScript ¶
type GlueScript struct {
Uri string
Type ScriptType
GroupStack []*GlueCodeGroup
GroupNames []string
}
type GlueStack ¶
type GlueStack struct {
ExecutionStack []*GlueScript
}
func NewGlueScope ¶
func (*GlueStack) ActiveScript ¶
func (scope *GlueStack) ActiveScript() *GlueScript
func (*GlueStack) AnnotateCurrentGroup ¶
func (*GlueStack) CurrentGroup ¶
func (scope *GlueStack) CurrentGroup() *GlueCodeGroup
func (*GlueStack) GetActiveGroupAnnotation ¶
func (*GlueStack) HasActiveScript ¶
func (*GlueStack) PushScript ¶
func (scope *GlueStack) PushScript(file string, kind ScriptType)
type GlueWriter ¶
func CreateGlueWriter ¶
func CreateGlueWriter(std io.Writer) GlueWriter
type Logger ¶
type Logger interface {
Info(msg interface{}, keyvals ...interface{})
Infof(format string, args ...interface{})
Debug(msg interface{}, keyvals ...interface{})
Debugf(format string, args ...interface{})
Warn(msg interface{}, keyvals ...interface{})
Warnf(format string, args ...interface{})
Error(msg interface{}, keyvals ...interface{})
Errorf(format string, args ...interface{})
}
type Plan ¶
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func NewSelector ¶
func NewSelectorWithPrefix ¶
type TestResult ¶
type TestSuite ¶
type TestSuite struct {
// contains filtered or unexported fields
}
func (*TestSuite) RegisterTest ¶
func (*TestSuite) TestResults ¶
func (ts *TestSuite) TestResults() []TestResult
type Testable ¶
type Testable interface {
RegisterTest(name string, t TestFunc)
Test()
Testing() bool
TestResults() []TestResult
}
func NewTestSuite ¶
func NewTestSuite() Testable
Click to show internal directories.
Click to hide internal directories.