Documentation ¶
Index ¶
- func CheckProcStateIsStopped(pid int) (bool, error)
- func IsExist(path string) bool
- type Command
- func (c *Command) CheckRoot() error
- func (c *Command) Close()
- func (c *Command) Command(cmdl string, args ...string) (pid int, err error)
- func (c *Command) GetOutput() ([]byte, error)
- func (c *Command) GetPid() int
- func (c *Command) GetStderrOutput() ([]byte, error)
- func (c *Command) GetUser() *UserAccount
- func (c *Command) Lsof(path string) (output []byte, err error)
- func (c *Command) Mkdir(path string, perm os.FileMode) (output []byte, err error)
- func (c *Command) NeedInput(text string)
- func (c *Command) Pause() error
- func (c *Command) Resume() error
- func (c *Command) Run() (output []byte, err error)
- func (c *Command) RunCommand(cmdl string, args ...string) (output []byte, err error)
- func (c *Command) SetDebug(debug bool) *Command
- func (c *Command) SetEnv(envs []string) *Command
- func (c *Command) SetNoSetGroups(noSetGroups bool) *Command
- func (c *Command) SetSysCredential(credential syscall.Credential) *Command
- func (c *Command) SetSysProcAttr(procAttr syscall.SysProcAttr) *Command
- func (c *Command) SetTimeout(t time.Duration) *Command
- func (c *Command) SetUser(u *user.User)
- func (c *Command) SetUsername(username string) error
- func (c *Command) SetWorkDir(wd string) *Command
- type IOReadCloser
- type UserAccount
- func (c *UserAccount) GetGid() int
- func (c *UserAccount) GetGid_ui32() uint32
- func (c *UserAccount) GetUid() int
- func (c *UserAccount) GetUid_ui32() uint32
- func (c *UserAccount) GetUser() *user.User
- func (c *UserAccount) SetGid(g uint64)
- func (c *UserAccount) SetUid(u uint64)
- func (c *UserAccount) SetUser(u *user.User)
- func (c *UserAccount) SetUsername(username string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckProcStateIsStopped ¶ added in v0.0.15
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func NewCommand ¶
func NewCommand() *Command
func (*Command) GetStderrOutput ¶ added in v0.0.3
func (*Command) GetUser ¶
func (c *Command) GetUser() *UserAccount
func (*Command) RunCommand ¶
func (*Command) SetNoSetGroups ¶ added in v0.0.24
func (*Command) SetSysCredential ¶ added in v0.0.24
func (c *Command) SetSysCredential(credential syscall.Credential) *Command
func (*Command) SetSysProcAttr ¶ added in v0.0.7
func (c *Command) SetSysProcAttr(procAttr syscall.SysProcAttr) *Command
func (*Command) SetUsername ¶
func (*Command) SetWorkDir ¶ added in v0.0.6
type IOReadCloser ¶ added in v0.0.26
type IOReadCloser struct {
// contains filtered or unexported fields
}
func NewReader ¶ added in v0.0.26
func NewReader(io io.ReadCloser) *IOReadCloser
func (*IOReadCloser) Bytes ¶ added in v0.0.26
func (io *IOReadCloser) Bytes() []byte
func (*IOReadCloser) Read ¶ added in v0.0.26
func (io *IOReadCloser) Read() (string, error)
type UserAccount ¶ added in v0.0.26
type UserAccount struct {
// contains filtered or unexported fields
}
func NewFromUser ¶ added in v0.0.26
func NewFromUser(user *user.User) *UserAccount
func NewFromUsername ¶ added in v0.0.26
func NewFromUsername(username string) (*UserAccount, error)
func NewUserAccount ¶ added in v0.0.26
func NewUserAccount() *UserAccount
func (*UserAccount) GetGid ¶ added in v0.0.26
func (c *UserAccount) GetGid() int
func (*UserAccount) GetGid_ui32 ¶ added in v0.0.26
func (c *UserAccount) GetGid_ui32() uint32
func (*UserAccount) GetUid ¶ added in v0.0.26
func (c *UserAccount) GetUid() int
func (*UserAccount) GetUid_ui32 ¶ added in v0.0.26
func (c *UserAccount) GetUid_ui32() uint32
func (*UserAccount) GetUser ¶ added in v0.0.26
func (c *UserAccount) GetUser() *user.User
func (*UserAccount) SetGid ¶ added in v0.0.26
func (c *UserAccount) SetGid(g uint64)
func (*UserAccount) SetUid ¶ added in v0.0.26
func (c *UserAccount) SetUid(u uint64)
func (*UserAccount) SetUser ¶ added in v0.0.26
func (c *UserAccount) SetUser(u *user.User)
func (*UserAccount) SetUsername ¶ added in v0.0.26
func (c *UserAccount) SetUsername(username string) error
Click to show internal directories.
Click to hide internal directories.