pwd

package
v0.0.0-...-2a1a1f5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: MIT, MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SessionNotEmpty

func SessionNotEmpty(e error) bool

Types

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ClientClose

func (m *Mock) ClientClose(client *types.Client)

func (*Mock) ClientCount

func (m *Mock) ClientCount() int

func (*Mock) ClientNew

func (m *Mock) ClientNew(id string, session *types.Session) *types.Client

func (*Mock) ClientResizeViewPort

func (m *Mock) ClientResizeViewPort(client *types.Client, cols, rows uint)

func (*Mock) InstanceDelete

func (m *Mock) InstanceDelete(session *types.Session, instance *types.Instance) error

func (*Mock) InstanceExec

func (m *Mock) InstanceExec(instance *types.Instance, cmd []string) (int, error)

func (*Mock) InstanceFSTree

func (m *Mock) InstanceFSTree(instance *types.Instance) (io.Reader, error)

func (*Mock) InstanceFile

func (m *Mock) InstanceFile(instance *types.Instance, filePath string) (io.Reader, error)

func (*Mock) InstanceFindBySession

func (m *Mock) InstanceFindBySession(session *types.Session) ([]*types.Instance, error)

func (*Mock) InstanceGet

func (m *Mock) InstanceGet(session *types.Session, name string) *types.Instance

func (*Mock) InstanceGetTerminal

func (m *Mock) InstanceGetTerminal(instance *types.Instance) (net.Conn, error)

func (*Mock) InstanceNew

func (m *Mock) InstanceNew(session *types.Session, conf types.InstanceConfig) (*types.Instance, error)

func (*Mock) InstanceResizeTerminal

func (m *Mock) InstanceResizeTerminal(instance *types.Instance, cols, rows uint) error

func (*Mock) InstanceUploadFromReader

func (m *Mock) InstanceUploadFromReader(instance *types.Instance, fileName, dest string, reader io.Reader) error

func (*Mock) InstanceUploadFromUrl

func (m *Mock) InstanceUploadFromUrl(instance *types.Instance, fileName, dest, url string) error

func (*Mock) PlaygroundFindByDomain

func (m *Mock) PlaygroundFindByDomain(domain string) *types.Playground

func (*Mock) PlaygroundGet

func (m *Mock) PlaygroundGet(id string) *types.Playground

func (*Mock) PlaygroundList

func (m *Mock) PlaygroundList() ([]*types.Playground, error)

func (*Mock) PlaygroundNew

func (m *Mock) PlaygroundNew(playground types.Playground) (*types.Playground, error)

func (*Mock) SessionClose

func (m *Mock) SessionClose(session *types.Session) error

func (*Mock) SessionDeployRepo

func (m *Mock) SessionDeployRepo(session *types.Session) error

func (*Mock) SessionDeployStack

func (m *Mock) SessionDeployStack(session *types.Session) error

func (*Mock) SessionGet

func (m *Mock) SessionGet(id string) (*types.Session, error)

func (*Mock) SessionGetSmallestViewPort

func (m *Mock) SessionGetSmallestViewPort(sessionId string) types.ViewPort

func (*Mock) SessionNew

func (m *Mock) SessionNew(ctx context.Context, config types.SessionConfig) (*types.Session, error)

func (*Mock) SessionSetup

func (m *Mock) SessionSetup(session *types.Session, conf SessionSetupConf) error

func (*Mock) UserGet

func (m *Mock) UserGet(id string) (*types.User, error)

func (*Mock) UserGetLoginRequest

func (m *Mock) UserGetLoginRequest(id string) (*types.LoginRequest, error)

func (*Mock) UserLogin

func (m *Mock) UserLogin(loginRequest *types.LoginRequest, user *types.User) (*types.User, error)

func (*Mock) UserNewLoginRequest

func (m *Mock) UserNewLoginRequest(providerName string) (*types.LoginRequest, error)

type PWDApi

type PWDApi interface {
	SessionNew(ctx context.Context, config types.SessionConfig) (*types.Session, error)
	SessionClose(session *types.Session) error
	SessionGetSmallestViewPort(sessionId string) types.ViewPort
	SessionDeployStack(session *types.Session) error
	SessionDeployRepo(session *types.Session) error
	SessionGet(id string) (*types.Session, error)
	SessionSetup(session *types.Session, conf SessionSetupConf) error

	InstanceNew(session *types.Session, conf types.InstanceConfig) (*types.Instance, error)
	InstanceResizeTerminal(instance *types.Instance, cols, rows uint) error
	InstanceGetTerminal(instance *types.Instance) (net.Conn, error)
	InstanceUploadFromUrl(instance *types.Instance, fileName, dest, url string) error
	InstanceUploadFromReader(instance *types.Instance, fileName, dest string, reader io.Reader) error
	InstanceGet(session *types.Session, name string) *types.Instance
	InstanceFindBySession(session *types.Session) ([]*types.Instance, error)
	InstanceDelete(session *types.Session, instance *types.Instance) error
	InstanceExec(instance *types.Instance, cmd []string) (int, error)
	InstanceFSTree(instance *types.Instance) (io.Reader, error)
	InstanceFile(instance *types.Instance, filePath string) (io.Reader, error)

	ClientNew(id string, session *types.Session) *types.Client
	ClientResizeViewPort(client *types.Client, cols, rows uint)
	ClientClose(client *types.Client)
	ClientCount() int

	UserNewLoginRequest(providerName string) (*types.LoginRequest, error)
	UserGetLoginRequest(id string) (*types.LoginRequest, error)
	UserLogin(loginRequest *types.LoginRequest, user *types.User) (*types.User, error)
	UserGet(id string) (*types.User, error)

	PlaygroundNew(playground types.Playground) (*types.Playground, error)
	PlaygroundGet(id string) *types.Playground
	PlaygroundFindByDomain(domain string) *types.Playground
	PlaygroundList() ([]*types.Playground, error)
}

type SessionSetupConf

type SessionSetupConf struct {
	Instances      []SessionSetupInstanceConf `json:"instances"`
	PlaygroundFQDN string
}

type SessionSetupInstanceConf

type SessionSetupInstanceConf struct {
	Image          string     `json:"image"`
	Hostname       string     `json:"hostname"`
	IsSwarmManager bool       `json:"is_swarm_manager"`
	IsSwarmWorker  bool       `json:"is_swarm_worker"`
	Type           string     `json:"type"`
	Run            [][]string `json:"run"`
	Tls            bool       `json:"tls"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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