Documentation ¶
Index ¶
- Constants
- Variables
- func CreateLocalAdminUser(defaultRunAsUserName string) (err error)
- func DoesUserExist(username string) (bool, error)
- func GetUserCredentials(sessionUser string) (uint32, uint32, []uint32, error)
- func IsUserValid(userName string, password string) error
- func StrStatus(status int) string
- func SyncRunDetached(command string, arguments []string, timeout int) (exitcode int, status int, err error)
- type CmdOption
- type ProcessCmd
- func (p *ProcessCmd) Cancel()
- func (p *ProcessCmd) Pid() int
- func (p *ProcessCmd) SetEnv(env []string)
- func (p *ProcessCmd) SetHomeDir(homeDir string)
- func (p *ProcessCmd) SetPasswordInfo(password string)
- func (p *ProcessCmd) SetUserInfo(name string)
- func (p *ProcessCmd) SyncRun(workingDir string, commandName string, commandArguments []string, ...) (exitCode int, status int, err error)
- func (p *ProcessCmd) SyncRunSimple(commandName string, commandArguments []string, timeOut int) error
- type ReadCallbackFunc
- type SafeBuffer
- type WaitProcessResult
Constants ¶
View Source
const ( Success int = iota Fail Timeout )
View Source
const (
// ExitPlaceholder is simply constatn placeholder for exitcode when failed
ExitPlaceholderFailed = -1
)
Variables ¶
View Source
var ( // ErrInvalidState indicates function enters unexpected state and exits. You // should never meet such error. ErrInvalidState = errors.New("Invalid state encountered") )
View Source
var ShellPluginCommandArgs = []string{"-c"}
View Source
var ShellPluginCommandName = "sh"
Functions ¶
func CreateLocalAdminUser ¶
func DoesUserExist ¶
func GetUserCredentials ¶
func IsUserValid ¶
Types ¶
type ProcessCmd ¶
type ProcessCmd struct {
// contains filtered or unexported fields
}
func NewProcessCmd ¶
func NewProcessCmd(options ...CmdOption) *ProcessCmd
func (*ProcessCmd) Cancel ¶
func (p *ProcessCmd) Cancel()
func (*ProcessCmd) Pid ¶
func (p *ProcessCmd) Pid() int
func (*ProcessCmd) SetEnv ¶
func (p *ProcessCmd) SetEnv(env []string)
func (*ProcessCmd) SetHomeDir ¶
func (p *ProcessCmd) SetHomeDir(homeDir string)
func (*ProcessCmd) SetPasswordInfo ¶
func (p *ProcessCmd) SetPasswordInfo(password string)
func (*ProcessCmd) SetUserInfo ¶
func (p *ProcessCmd) SetUserInfo(name string)
func (*ProcessCmd) SyncRunSimple ¶
func (p *ProcessCmd) SyncRunSimple(commandName string, commandArguments []string, timeOut int) error
type SafeBuffer ¶
type SafeBuffer struct {
// contains filtered or unexported fields
}
Buffer is a goroutine safe bytes.Buffer
func (*SafeBuffer) String ¶
func (s *SafeBuffer) String() string
String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns "<nil>".
type WaitProcessResult ¶
type WaitProcessResult struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.