Documentation ¶
Index ¶
- Constants
- Variables
- func InitEnv()
- func Run(command string) (output []byte, err error)
- func RunWithMatch(command string) (output []byte, match bool, err error)
- func RunWithMatchf(format string, args ...interface{}) ([]byte, bool, error)
- func Runf(format string, args ...interface{}) ([]byte, error)
- type ActivateCommand
- type CleanCommand
- type EnvCommand
- type FileObject
- type FileObjects
- type FileType
- type PackageObject
- type ScriptObject
- type SetCommand
- type SettingObject
- type SettingObjects
- type StateObject
- type TemplateType
- type UnsetCommand
- type VersionCommand
Constants ¶
View Source
const ( DEFAULT_PREFIX = "/home/r" WORKDIR = "/var/rogi" DATAFILE = WORKDIR + "/rogi.db" SETTING_BUCKET = "setting" )
View Source
const ( FTDir = iota FTFile FTBinary FTGlob FTConfig )
View Source
const ( TTNone = iota TTTemplate TTExpand )
Variables ¶
View Source
var Debug bool
Debug shows debug messages in functions like Run.
Functions ¶
func Run ¶
Run executes external commands just like RunWithMatch, but does not return the boolean `match`.
func RunWithMatchf ¶
RunWithMatchf is like RunWithMatch, but formats its arguments according to the format. Analogous to Printf().
Types ¶
type ActivateCommand ¶
func (*ActivateCommand) Help ¶
func (c *ActivateCommand) Help() string
func (*ActivateCommand) Run ¶
func (c *ActivateCommand) Run(args []string) int
Run will return integer as true or false.
func (*ActivateCommand) Synopsis ¶
func (c *ActivateCommand) Synopsis() string
type CleanCommand ¶
func (*CleanCommand) Help ¶
func (c *CleanCommand) Help() string
func (*CleanCommand) Run ¶
func (c *CleanCommand) Run(args []string) int
Run will return integer as true or false.
func (*CleanCommand) Synopsis ¶
func (c *CleanCommand) Synopsis() string
type EnvCommand ¶
func (*EnvCommand) Help ¶
func (c *EnvCommand) Help() string
func (*EnvCommand) Run ¶
func (c *EnvCommand) Run(args []string) int
Run will return integer as true or false.
func (*EnvCommand) Synopsis ¶
func (c *EnvCommand) Synopsis() string
type FileObject ¶
type FileObjects ¶
type FileObjects []FileObject
type PackageObject ¶
type PackageObject struct { Name string `toml:"name"` Version string `toml:"version"` LongDesc string `toml:"long_desc"` ShortDesc string `toml:"short_desc"` Custodian string `toml:"custodian"` Homepage string `toml:"homepage,omitempty"` Scripts ScriptObject `toml:"scripts,omitempty"` Settings *SettingObjects `toml:"settings,omitempty"` Owner string `toml:"owner,omitempty"` Group string `toml:"group,omitempty"` Mode string `toml:"mode,omitempty"` Files []string `toml:"files,omitempty"` FDetail *FileObjects `toml:"fdetail,omitempty"` }
type ScriptObject ¶
type SetCommand ¶
func (*SetCommand) Help ¶
func (c *SetCommand) Help() string
func (*SetCommand) Run ¶
func (c *SetCommand) Run(args []string) int
func (*SetCommand) Synopsis ¶
func (c *SetCommand) Synopsis() string
type SettingObject ¶
type SettingObjects ¶
type SettingObjects []SettingObject
type StateObject ¶
type TemplateType ¶
type TemplateType int
type UnsetCommand ¶
func (*UnsetCommand) Help ¶
func (c *UnsetCommand) Help() string
func (*UnsetCommand) Run ¶
func (c *UnsetCommand) Run(args []string) int
Run will return integer as true or false.
func (*UnsetCommand) Synopsis ¶
func (c *UnsetCommand) Synopsis() string
type VersionCommand ¶
func (*VersionCommand) Help ¶
func (c *VersionCommand) Help() string
func (*VersionCommand) Run ¶
func (c *VersionCommand) Run(_ []string) int
func (*VersionCommand) Synopsis ¶
func (c *VersionCommand) Synopsis() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.