Documentation ¶
Index ¶
- Constants
- type Action
- type Data
- func (t Data) AllModules() Modules
- func (t Data) AllModulesMap() map[string]*Module
- func (t Data) CascadingModulesetModules(name string) map[string]string
- func (t Data) ExpandModules(modsetNames, modNames []string) Modules
- func (t Data) HeadModulesets() []string
- func (t Data) ModulesetTree(modset string) *ModulesetTree
- func (t Data) ModulesetsTree() *ModulesetTree
- func (t Data) Render() string
- func (t Data) Ruleset(name string) Ruleset
- func (t Data) RulesetsMD5() string
- type Envs
- type ExitCode
- type LogEntries
- type LogEntry
- type LogLevel
- type Module
- type ModuleAction
- type ModuleActions
- type Modules
- type Moduleset
- type ModulesetModule
- type ModulesetRelations
- type ModulesetRulesetRelations
- type ModulesetTree
- type Modulesets
- type Ruleset
- type Rulesets
- type Run
- func (t *Run) Auto() error
- func (t *Run) Check() error
- func (t *Run) Close()
- func (t *Run) Env() (Envs, error)
- func (t *Run) Fix() error
- func (t *Run) Fixable() error
- func (t Run) Push() error
- func (t Run) Render() string
- func (t *Run) SetAttach(v bool)
- func (t *Run) SetForce(v bool)
- func (t *Run) SetModules(l []string)
- func (t *Run) SetModulesExpr(s string)
- func (t *Run) SetModulesets(l []string)
- func (t *Run) SetModulesetsExpr(s string)
- func (t Run) Stat() RunStat
- type RunStat
- type T
- func (t T) AttachModuleset(s string) error
- func (t T) AttachModulesets(l []string) error
- func (t T) AttachRuleset(s string) error
- func (t T) DetachModuleset(s string) error
- func (t T) DetachRuleset(s string) error
- func (t T) GetAllData(modsets []string) (Data, error)
- func (t T) GetData(modsets []string) (Data, error)
- func (t T) GetNodeData(modsets []string) (Data, error)
- func (t T) GetObjectData(p naming.Path, modsets []string) (Data, error)
- func (t T) GetRulesets() (Rulesets, error)
- func (t T) ListModuleNames() ([]string, error)
- func (t T) ListModules() (Modules, error)
- func (t T) ListModulesets(filter string) ([]string, error)
- func (t T) ListRulesets(filter string) ([]string, error)
- func (t *T) NewRun() *Run
- func (t *T) NewValidModule(name string) (*Module, error)
- func (t *T) SetCollectorClient(c *collector.Client)
- func (t *T) SetLogger(v *plog.Logger)
- func (t *T) SetObjectPath(s naming.Path)
- func (t *T) SetVarDir(s string)
- func (t *T) Validate(mod *Module) error
- type Var
- type Vars
Constants ¶
View Source
const ( ActionCheck Action = "check" ActionFix Action = "fix" ActionFixable Action = "fixable" ActionAuto Action = "auto" ExitCodeOk int = 0 ExitCodeNok int = 1 ExitCodeNA int = 2 )
View Source
const (
VarPrefix = "OSVC_COMP_"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Modsets Modulesets `json:"modulesets,omitempty"` Rsets Rulesets `json:"rulesets,omitempty"` ModsetRsetRelations ModulesetRulesetRelations `json:"modset_rset_relations,omitempty"` ModsetRelations ModulesetRelations `json:"modset_relations,omitempty"` }
func (Data) AllModules ¶
func (Data) AllModulesMap ¶
func (Data) CascadingModulesetModules ¶
func (Data) ExpandModules ¶
ExpandModules returns a map indexed by module name, with the hosting moduleset name as value.
func (Data) HeadModulesets ¶
HeadModulesets returns the name of modulesets that either
- have no parent in ModsetRelations
- have a parent in ModsetRelations, but this parent is not in Modsets, ie not attached
func (Data) ModulesetTree ¶
func (t Data) ModulesetTree(modset string) *ModulesetTree
func (Data) ModulesetsTree ¶
func (t Data) ModulesetsTree() *ModulesetTree
func (Data) RulesetsMD5 ¶
type LogEntries ¶
type LogEntries struct {
// contains filtered or unexported fields
}
func NewLogEntries ¶
func NewLogEntries() *LogEntries
func (*LogEntries) Entries ¶
func (t *LogEntries) Entries() []LogEntry
func (*LogEntries) Err ¶
func (t *LogEntries) Err(s string)
func (*LogEntries) MarshalJSON ¶
func (t *LogEntries) MarshalJSON() ([]byte, error)
MarshalJSON marshals the data as a quoted json string
func (*LogEntries) Out ¶
func (t *LogEntries) Out(s string)
func (*LogEntries) Render ¶
func (t *LogEntries) Render() string
func (*LogEntries) RenderForCollector ¶
func (t *LogEntries) RenderForCollector() string
func (*LogEntries) UnmarshalJSON ¶
func (t *LogEntries) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a quoted json string to value
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (Module) ModulesetName ¶
func (*Module) SetAutofix ¶
func (*Module) SetModulesetName ¶
type ModuleAction ¶
type ModuleAction struct { Action Action Module string BeginAt time.Time EndAt time.Time ExitCode int Log LogEntries }
func (*ModuleAction) Duration ¶
func (t *ModuleAction) Duration() time.Duration
func (*ModuleAction) Render ¶
func (t *ModuleAction) Render() string
func (*ModuleAction) Status ¶
func (t *ModuleAction) Status() string
func (*ModuleAction) StatusAndExitCode ¶
func (t *ModuleAction) StatusAndExitCode() string
type ModuleActions ¶
type ModuleActions []*ModuleAction
func (ModuleActions) Render ¶
func (t ModuleActions) Render() string
type ModulesetModule ¶
func (ModulesetModule) MarshalJSON ¶
func (t ModulesetModule) MarshalJSON() ([]byte, error)
MarshalJSON marshals the data as a quoted json string
func (ModulesetModule) Render ¶
func (t ModulesetModule) Render() string
func (ModulesetModule) String ¶
func (t ModulesetModule) String() string
func (*ModulesetModule) UnmarshalJSON ¶
func (t *ModulesetModule) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to value
type ModulesetRelations ¶
func (ModulesetRelations) Parents ¶
func (t ModulesetRelations) Parents() map[string][]string
func (ModulesetRelations) Render ¶
func (t ModulesetRelations) Render() string
type ModulesetRulesetRelations ¶
func (ModulesetRulesetRelations) Render ¶
func (t ModulesetRulesetRelations) Render() string
type ModulesetTree ¶
type ModulesetTree struct { Name string Modules []ModulesetModule Modulesets []*ModulesetTree }
func (*ModulesetTree) AddModuleset ¶
func (t *ModulesetTree) AddModuleset(data Data, modset string)
func (ModulesetTree) Render ¶
func (t ModulesetTree) Render() string
type Modulesets ¶
func (Modulesets) ModulesOf ¶
func (t Modulesets) ModulesOf(modset string) []ModulesetModule
func (Modulesets) Render ¶
func (t Modulesets) Render() string
type Run ¶
type Run struct { Modsets []string Mods []string Attach bool Force bool InitAt time.Time BeginAt time.Time EndAt time.Time ModuleActions ModuleActions // contains filtered or unexported fields }
func (*Run) SetModules ¶
func (*Run) SetModulesExpr ¶
func (*Run) SetModulesets ¶
func (*Run) SetModulesetsExpr ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (T) AttachModuleset ¶
func (T) AttachModulesets ¶
func (T) AttachRuleset ¶
func (T) DetachModuleset ¶
func (T) DetachRuleset ¶
func (T) GetRulesets ¶
func (T) ListModuleNames ¶
func (T) ListModules ¶
func (*T) SetCollectorClient ¶
func (*T) SetObjectPath ¶
type Var ¶
func (Var) MarshalJSON ¶
MarshalJSON marshals the data as a quoted json string
func (*Var) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to value
Click to show internal directories.
Click to hide internal directories.