Documentation
¶
Index ¶
- Constants
- func DebugDBFileError() error
- func GetHistoryDBFileName() (string, error)
- func GetLocalIpAddr() string
- func HistoryDisabledFile() bool
- func InsertHistoryItem(item *HistoryItem) error
- func ReNumberHistory() error
- func RemoveDB() error
- func RemoveHistoryItems(removeAll bool, startId int, endId int) (int, error)
- func UpdateHistoryItem(item *HistoryItem) error
- type HistoryEnv
- type HistoryItem
- func (item *HistoryItem) CompactString(henv HistoryEnv) string
- func (item *HistoryItem) DecodeCmdLine() []string
- func (item *HistoryItem) EncodeCmdLine(args []string)
- func (item *HistoryItem) FullString(henv HistoryEnv) string
- func (item *HistoryItem) MarshalJSON() ([]byte, error)
- func (item *HistoryItem) ScriptString(henv HistoryEnv) string
- type HistoryQuery
Constants ¶
View Source
const VersionMdKey = "version"
Variables ¶
This section is empty.
Functions ¶
func DebugDBFileError ¶
func DebugDBFileError() error
func GetHistoryDBFileName ¶
func GetLocalIpAddr ¶
func GetLocalIpAddr() string
func HistoryDisabledFile ¶ added in v0.5.0
func HistoryDisabledFile() bool
func InsertHistoryItem ¶
func InsertHistoryItem(item *HistoryItem) error
func ReNumberHistory ¶
func ReNumberHistory() error
func RemoveHistoryItems ¶
returns (numRemoved, error)
func UpdateHistoryItem ¶
func UpdateHistoryItem(item *HistoryItem) error
Types ¶
type HistoryEnv ¶ added in v0.4.0
func (HistoryEnv) TruncatePath ¶ added in v0.4.0
func (henv HistoryEnv) TruncatePath(fullPath string) string
type HistoryItem ¶
type HistoryItem struct { HistoryId int64 Ts int64 ScVersion string ProjectDir string // set if playbook file is relative to project root ProjectName string // set if playbook file is relative to project root PlaybookFile string // can have prefix "^" or "." (".." will be resolved away) PlaybookCommand string ScriptType string // language Metadata string Cwd string HostName string IpAddr string SysUser string CmdLine string DurationMs sql.NullInt64 // update ExitCode sql.NullInt64 // update }
func BuildHistoryItem ¶
func BuildHistoryItem() *HistoryItem
func QueryHistory ¶
func QueryHistory(query HistoryQuery) ([]*HistoryItem, error)
func (*HistoryItem) CompactString ¶
func (item *HistoryItem) CompactString(henv HistoryEnv) string
func (*HistoryItem) DecodeCmdLine ¶
func (item *HistoryItem) DecodeCmdLine() []string
func (*HistoryItem) EncodeCmdLine ¶
func (item *HistoryItem) EncodeCmdLine(args []string)
func (*HistoryItem) FullString ¶
func (item *HistoryItem) FullString(henv HistoryEnv) string
func (*HistoryItem) MarshalJSON ¶
func (item *HistoryItem) MarshalJSON() ([]byte, error)
func (*HistoryItem) ScriptString ¶
func (item *HistoryItem) ScriptString(henv HistoryEnv) string
type HistoryQuery ¶
Click to show internal directories.
Click to hide internal directories.