Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
Path string
Args []string
Env [][2]string
Dir string
Shell bool // hack for when ssh-ing, try to start a shell instead of just executing a command (gives you working environment vars, etc)
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Context context.Context
// ReadOnly indicates that this command does not have side effects, and is safe to run in dry-run mode.
ReadOnly bool
}
type Host ¶
type Host interface {
String() string
Info() (*Info, error)
TmpFile() (string, error)
TmpDir() (string, error)
Cleanup() error
Exec(cmd *Cmd) error
Stat(string) (os.FileInfo, error)
Open(string) (io.ReadCloser, error)
ReadFile(string) ([]byte, error)
Create(string) (io.WriteCloser, error)
Remove(string) error // I'd rather call this Delete. But in this case, follow "os" package style.
Chmod(string, os.FileMode) error
Chown(string, uint32, uint32) error
Rename(string, string) error
User(string) (*User, error)
CreateUser(*User) error
UpdateUser(*User) error
DeleteUser(string) error
Group(string) (*Group, error)
CreateGroup(*Group) error
UpdateGroup(*Group) error
DeleteGroup(string) error
Password(string) (*Password, error)
UpdatePassword(*Password) error
}
Click to show internal directories.
Click to hide internal directories.