client

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2016 License: MIT Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(clientPrivateKey *rsa.PrivateKey) *Client

func (*Client) RequestNewSession

func (c *Client) RequestNewSession(baseServerUrl string) (Session, error)

type DownloadTarOptions

type DownloadTarOptions struct {
	FileFilter string
}

type ExecResponse

type ExecResponse struct {
	Pid int
	// contains filtered or unexported fields
}

func (*ExecResponse) TextResponseChannel

func (r *ExecResponse) TextResponseChannel() (feedback <-chan string, errors <-chan error)

type Session

type Session interface {
	SessionId() int
	SessionToken() []byte
	GetFullServerUrl(relUrl string) string
	Ping() error
	Version() (string, error)
	ExecRequestBuilder() SessionExecRequestBuilderBase
	FileSystem() SessionFileSystem
	EncryptAsJson(v interface{}) ([]byte, error)
	GetTempDir() (*dtos.TempDirDto, error)
	GetOsTypeName() (*dtos.OsTypeDto, error)
}

type SessionExecRequestBuilder

type SessionExecRequestBuilder interface {
	Exe(exe string) SessionExecRequestBuilder
	Args(args ...string) SessionExecRequestBuilder
	WorkingDir(workingDir string) SessionExecRequestBuilder
	Detached() SessionExecRequestBuilder

	BuildAndDoRequest() (*ExecResponse, error)
}

type SessionExecRequestBuilderBase

type SessionExecRequestBuilderBase interface {
	Winshell() SessionExecRequestBuilder
	Bash() SessionExecRequestBuilder
	None() SessionExecRequestBuilder
}

func NewSessionExecRequestBuilderBase

func NewSessionExecRequestBuilderBase(session *session) SessionExecRequestBuilderBase

type SessionFileSystem

type SessionFileSystem interface {
	DownloadTar(remotePath string, options *DownloadTarOptions, tarReceiver tar_io.TarReceiver) error
	UploadTar(tarProvider tar_io.TarProvider, remotePath string, isDir bool) error
	Delete(remotePath string) error
	Move(oldRemotePath, newRemotePath string) error
	Copy(srcRemotePath, destRemotePath string) error
	Symlink(srcRemotePath, destRemoteSymlinkPath string) error
	Stats(remotePath string) (*dtos.StatsDto, error)
	DirSummary(remotePath string) (*filepath_summary.DirSummary, error)
	FileSummary(remotePath string) (*filepath_summary.FileSummary, error)
}

func NewSessionFileSystem

func NewSessionFileSystem(session *session) SessionFileSystem

type UploadResponse

type UploadResponse struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL