Documentation ¶
Index ¶
Constants ¶
View Source
const ( HOOK_SUCCESS = 0 HOOK_DOES_NOT_EXIST = -1 HOOK_STAT_FAILED = -2 HOOK_CANNOT_GET_EXIT_STATUS = -3 HOOK_INVALID_NAME = -4 HOOK_VTROOT_ERROR = -5 )
the hook will return a value between 0 and 255. 0 if it succeeds. so we have these additional values here for more information.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
func NewSimpleHook ¶
func (*Hook) Execute ¶
func (hook *Hook) Execute() (result *HookResult)
func (*Hook) ExecuteOptional ¶
Execute an optional hook, returns a printable error
type HookResult ¶
type HookResult struct { ExitStatus int // HOOK_SUCCESS if it succeeded Stdout string Stderr string }
func (*HookResult) String ¶
func (hr *HookResult) String() string
String returns a printable version of the HookResult
Click to show internal directories.
Click to hide internal directories.