Documentation ¶
Index ¶
- type Client
- type Local
- func (c *Local) Append(path string, b []byte) error
- func (c *Local) Chmod(path string, mode os.FileMode) error
- func (c *Local) Chown(path string, uid, gid int) error
- func (c *Local) Copy(src, dst string) error
- func (c *Local) Exec(name string, arg ...string) ([]byte, error)
- func (c *Local) Exists(path string) (bool, error)
- func (c *Local) MkdirAll(path string, perm os.FileMode) error
- func (c *Local) Move(src, dst string) error
- func (c *Local) ReadFile(path string) ([]byte, error)
- func (c *Local) Remove(path string) error
- func (c *Local) Write(path string, b []byte) error
- type SSH
- func (c *SSH) Append(path string, b []byte) error
- func (c *SSH) Chmod(path string, mode os.FileMode) error
- func (c *SSH) Chown(path string, uid, gid int) error
- func (c *SSH) Copy(src, dst string) error
- func (c *SSH) Exec(name string, arg ...string) ([]byte, error)
- func (c *SSH) Exists(path string) (bool, error)
- func (c *SSH) MkdirAll(path string, perm os.FileMode) error
- func (c *SSH) Move(src, dst string) error
- func (c *SSH) ReadFile(path string) ([]byte, error)
- func (c *SSH) Remove(path string) error
- func (c *SSH) Write(path string, b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Exec(name string, arg ...string) ([]byte, error) Chmod(path string, mode os.FileMode) error Chown(path string, uid, gid int) error Exists(path string) (bool, error) MkdirAll(path string, perm os.FileMode) error Write(path string, b []byte) error Append(path string, b []byte) error ReadFile(path string) ([]byte, error) Remove(src string) error Copy(src, dst string) error Move(src, dst string) error }
Client is the responsible for executing commands in a OS. It can be the local OS or an OS connected through SSH
type Local ¶
type Local struct{}
Local is the OS where the server is getting executed
func (*Local) Copy ¶
Copy copies from a source to a destination. It's recursive, tries to preserve permissions and skips symlinks Copied from: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
func (*Local) MkdirAll ¶
MkdirAll creates a new directory with the specified name and permission bits (before umask)
type SSH ¶
SSH is an OS client using SSH
func (*SSH) Copy ¶
Copy copies from a source to a destination. It's recursive, tries to preserve permissions and skips symlinks Copied from: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
func (*SSH) Exists ¶
Exists checks if a file exists or not TODO: Check that the error returned is os.IsNotExist()
func (*SSH) MkdirAll ¶
MkdirAll creates a new directory with the specified name and permission bits (before umask)