Documentation ¶
Index ¶
- func GetSDKInfo(scriptDir, url, filename, md5sum string, log *logrus.Logger) (xsapiv1.SDK, error)
- func ListCrossSDK(scriptDir string, update bool, log *logrus.Logger) ([]xsapiv1.SDK, error)
- func UpdateSDKDb(scriptDir string, log *logrus.Logger) (string, error)
- type APIService
- type ClientSession
- type Context
- type CrossSDK
- func (s *CrossSDK) AbortInstallRemove(timeout int) error
- func (s *CrossSDK) Get() *xsapiv1.SDK
- func (s *CrossSDK) GetEnvCmd() []string
- func (s *CrossSDK) Install(file string, force bool, timeout int, args []string, sess *ClientSession) error
- func (s *CrossSDK) Remove(timeout int, sess *ClientSession) error
- type EventDef
- type Events
- type FolderEventCB
- type FolderEventCBData
- type Folders
- func (f *Folders) Add(newF xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *Folders) Delete(id string) (xsapiv1.FolderConfig, error)
- func (f *Folders) ForceSync(id string) error
- func (f *Folders) Get(id string) *IFOLDER
- func (f *Folders) GetConfigArr() []xsapiv1.FolderConfig
- func (f *Folders) IsFolderInSync(id string) (bool, error)
- func (f *Folders) LoadConfig() error
- func (f *Folders) ResolveID(id string) (string, error)
- func (f *Folders) SaveConfig() error
- func (f *Folders) Update(id string, cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- type IFOLDER
- type ITARGET
- type ITERMINAL
- type PathMap
- func (f *PathMap) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *PathMap) ConvPathCli2Svr(s string) string
- func (f *PathMap) ConvPathSvr2Cli(s string) string
- func (f *PathMap) GetConfig() xsapiv1.FolderConfig
- func (f *PathMap) GetFullPath(dir string) string
- func (f *PathMap) IsInSync() (bool, error)
- func (f *PathMap) NewUID(suffix string) string
- func (f *PathMap) Remove() error
- func (f *PathMap) Setup(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *PathMap) Sync() error
- func (f *PathMap) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- type RegisteredCB
- type SDKs
- func (s *SDKs) AbortInstall(id string, timeout int) (*xsapiv1.SDK, error)
- func (s *SDKs) Get(id string) *xsapiv1.SDK
- func (s *SDKs) GetAll() []xsapiv1.SDK
- func (s *SDKs) GetByPath(path string) (*xsapiv1.SDK, error)
- func (s *SDKs) GetEnvCmd(id string, defaultID string) []string
- func (s *SDKs) Install(id, filepath string, force bool, timeout int, args []string, ...) (*xsapiv1.SDK, error)
- func (s *SDKs) Remove(id string, timeout int, sess *ClientSession) (*xsapiv1.SDK, error)
- func (s *SDKs) ResolveID(id string) (string, error)
- func (s *SDKs) Stop()
- type STFolder
- func (f *STFolder) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *STFolder) ConvPathCli2Svr(s string) string
- func (f *STFolder) ConvPathSvr2Cli(s string) string
- func (f *STFolder) GetConfig() xsapiv1.FolderConfig
- func (f *STFolder) GetFullPath(dir string) string
- func (f *STFolder) IsInSync() (bool, error)
- func (f *STFolder) NewUID(suffix string) string
- func (f *STFolder) Remove() error
- func (f *STFolder) Setup(fld xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *STFolder) Sync() error
- func (f *STFolder) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- type STFolderDisable
- func (f *STFolderDisable) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *STFolderDisable) ConvPathCli2Svr(s string) string
- func (f *STFolderDisable) ConvPathSvr2Cli(s string) string
- func (f *STFolderDisable) GetConfig() xsapiv1.FolderConfig
- func (f *STFolderDisable) GetFullPath(dir string) string
- func (f *STFolderDisable) IsInSync() (bool, error)
- func (f *STFolderDisable) NewUID(suffix string) string
- func (f *STFolderDisable) Remove() error
- func (f *STFolderDisable) Setup(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- func (f *STFolderDisable) Sync() error
- func (f *STFolderDisable) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
- type Sessions
- type Targets
- func (t *Targets) Add(newT xsapiv1.TargetConfig, sess *ClientSession) (*xsapiv1.TargetConfig, error)
- func (t *Targets) CloseTerminal(targetID, termID string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Targets) CreateUpdateTerminal(targetID string, tmCfg xsapiv1.TerminalConfig, initial bool) (*xsapiv1.TerminalConfig, error)
- func (t *Targets) Delete(id string, sess *ClientSession) (xsapiv1.TargetConfig, error)
- func (t *Targets) DeleteTerminal(targetID, termID string) (*xsapiv1.TerminalConfig, error)
- func (t *Targets) Get(id string) *ITARGET
- func (t *Targets) GetConfigArr() []xsapiv1.TargetConfig
- func (t *Targets) GetTerminal(targetID, termID string) (*ITERMINAL, error)
- func (t *Targets) GetTerminalsArr(targetID string) ([]xsapiv1.TerminalConfig, error)
- func (t *Targets) LoadConfig() error
- func (t *Targets) OpenTerminal(targetID, termID string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Targets) ResizeTerminal(targetID, termID string, cols, rows uint16, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Targets) ResolveID(id string) (string, error)
- func (t *Targets) ResolveTerminalID(termID string) (string, error)
- func (t *Targets) SaveConfig() error
- func (t *Targets) SignalTerminal(targetID, termID, sigNum string) error
- type TermSSH
- func (t *TermSSH) Close() (*xsapiv1.TerminalConfig, error)
- func (t *TermSSH) GetConfig() xsapiv1.TerminalConfig
- func (t *TermSSH) Open(sock *socketio.Socket, sessID string) (*xsapiv1.TerminalConfig, error)
- func (t *TermSSH) Resize(cols, rows uint16) (*xsapiv1.TerminalConfig, error)
- func (t *TermSSH) Signal(sigName string) error
- func (t *TermSSH) UpdateConfig(newCfg xsapiv1.TerminalConfig) *xsapiv1.TerminalConfig
- type Terminals
- func (t *Terminals) Close(id string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Terminals) Free(id string) (*xsapiv1.TerminalConfig, error)
- func (t *Terminals) Get(id string) *ITERMINAL
- func (t *Terminals) GetConfigArr() []xsapiv1.TerminalConfig
- func (t *Terminals) New(cfg xsapiv1.TerminalConfig, targetID string) (*xsapiv1.TerminalConfig, error)
- func (t *Terminals) Open(id string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Terminals) Resize(id string, cols, rows uint16, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
- func (t *Terminals) Signal(id, sigName string) error
- type TgtStd
- func (t *TgtStd) Add(cfg xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error)
- func (t *TgtStd) Delete() error
- func (t *TgtStd) GetConfig() xsapiv1.TargetConfig
- func (t *TgtStd) NewUID(suffix string) string
- func (t *TgtStd) Setup(cfg xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error)
- type WebServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSDKInfo ¶
GetSDKInfo Used get-sdk-info script to extract SDK get info from a SDK file/tarball
func ListCrossSDK ¶
ListCrossSDK List all available and installed SDK (call "db-dump" script)
Types ¶
type APIService ¶
type APIService struct { *Context // contains filtered or unexported fields }
APIService .
func NewAPIV1 ¶
func NewAPIV1(ctx *Context) *APIService
NewAPIV1 creates a new instance of API service
type ClientSession ¶
type ClientSession struct { ID string WSID string // only one WebSocket per client/session MaxAge int64 IOSocket *socketio.Socket // contains filtered or unexported fields }
ClientSession contains the info of a user/client session
type Context ¶
type Context struct { ProgName string Cli *cli.Context Config *xdsconfig.Config Log *logrus.Logger LogLevelSilly bool LogSillyf func(format string, args ...interface{}) SThg *st.SyncThing SThgCmd *exec.Cmd SThgInotCmd *exec.Cmd WWWServer *WebServer Exit chan os.Signal // contains filtered or unexported fields }
Context holds the XDS server context
func NewXdsServer ¶
NewXdsServer Create a new instance of XDS server
type CrossSDK ¶
type CrossSDK struct { *Context // contains filtered or unexported fields }
CrossSDK Hold SDK config
func NewCrossSDK ¶
NewCrossSDK creates a new instance of CrossSDK
func (*CrossSDK) AbortInstallRemove ¶
AbortInstallRemove abort an install or remove command
func (*CrossSDK) GetEnvCmd ¶
GetEnvCmd returns the command used to initialized the environment
func (*CrossSDK) Install ¶
func (s *CrossSDK) Install(file string, force bool, timeout int, args []string, sess *ClientSession) error
Install a SDK (non blocking command, IOW run in background)
func (*CrossSDK) Remove ¶
func (s *CrossSDK) Remove(timeout int, sess *ClientSession) error
Remove Used to remove/uninstall a SDK
type EventDef ¶
type EventDef struct {
// contains filtered or unexported fields
}
EventDef Definition on one event
type Events ¶
type Events struct { *Context // contains filtered or unexported fields }
Events Hold registered events per context
func EventsConstructor ¶ added in v1.1.0
EventsConstructor creates an instance of Events
func (*Events) Emit ¶
Emit Used to manually emit an event
func (*Events) GetList ¶
GetList returns the list of all supported events
func (*Events) Register ¶
Register Used by a client/session to register to a specific (or all) event(s)
type FolderEventCB ¶
type FolderEventCB func(cfg *xsapiv1.FolderConfig, data *FolderEventCBData)
FolderEventCB Callback prototype for FolderEvent events
type FolderEventCBData ¶
type FolderEventCBData map[string]interface{}
FolderEventCBData Data format of FolderEvent events
type Folders ¶
type Folders struct { *Context // contains filtered or unexported fields }
Folders Represent a an XDS folders
func FoldersConstructor ¶ added in v1.1.0
FoldersConstructor Create a new instance of Model Folders
func (*Folders) Add ¶
func (f *Folders) Add(newF xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Add adds a new folder
func (*Folders) Delete ¶
func (f *Folders) Delete(id string) (xsapiv1.FolderConfig, error)
Delete deletes a specific folder
func (*Folders) ForceSync ¶
ForceSync Force the synchronization of a folder
func (*Folders) Get ¶
Get returns the folder config or nil if not existing
func (*Folders) GetConfigArr ¶
func (f *Folders) GetConfigArr() []xsapiv1.FolderConfig
GetConfigArr returns the config of all folders as an array
func (*Folders) IsFolderInSync ¶
IsFolderInSync Returns true when folder is in sync
func (*Folders) LoadConfig ¶
LoadConfig Load folders configuration from disk
func (*Folders) ResolveID ¶
ResolveID Complete a Folder ID (helper for user that can use partial ID value)
func (*Folders) SaveConfig ¶
SaveConfig Save folders configuration to disk
func (*Folders) Update ¶
func (f *Folders) Update(id string, cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Update Update a specific folder
type IFOLDER ¶
type IFOLDER interface { NewUID(suffix string) string // Get a new folder UUID Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error) // Add a new folder Setup(prj xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error) // Local setup of the folder GetConfig() xsapiv1.FolderConfig // Get folder public configuration GetFullPath(dir string) string // Get folder full path ConvPathCli2Svr(s string) string // Convert path from Client to Server ConvPathSvr2Cli(s string) string // Convert path from Server to Client Remove() error // Remove a folder Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error) // Update a new folder Sync() error // Force folder files synchronization IsInSync() (bool, error) // Check if folder files are in-sync }
IFOLDER Folder interface
type ITARGET ¶ added in v1.1.0
type ITARGET interface { NewUID(suffix string) string // Get a new target UUID Add(cfg xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error) // Add a new target Delete() error // Remove a target Setup(prj xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error) // Local setup of the folder GetConfig() xsapiv1.TargetConfig // Get target public configuration }
ITARGET Target interface
type ITERMINAL ¶ added in v1.1.0
type ITERMINAL interface { GetConfig() xsapiv1.TerminalConfig // Get terminal public configuration UpdateConfig(cfg xsapiv1.TerminalConfig) *xsapiv1.TerminalConfig // Update terminal config Open(sock *socketio.Socket, sessID string) (*xsapiv1.TerminalConfig, error) // Open a terminal session Close() (*xsapiv1.TerminalConfig, error) // Close a terminal session Resize(cols, rows uint16) (*xsapiv1.TerminalConfig, error) // Resize a terminal session Signal(sigName string) error // Send a signal to a terminal session }
ITERMINAL Terminal interface
type PathMap ¶
type PathMap struct { *Context // contains filtered or unexported fields }
PathMap .
func NewFolderPathMap ¶
NewFolderPathMap Create a new instance of PathMap
func (*PathMap) Add ¶
func (f *PathMap) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Add a new folder
func (*PathMap) ConvPathCli2Svr ¶
ConvPathCli2Svr Convert path from Client to Server
func (*PathMap) ConvPathSvr2Cli ¶
ConvPathSvr2Cli Convert path from Server to Client
func (*PathMap) GetConfig ¶
func (f *PathMap) GetConfig() xsapiv1.FolderConfig
GetConfig Get public part of folder config
func (*PathMap) GetFullPath ¶
GetFullPath returns the full path of a directory (from server POV)
func (*PathMap) IsInSync ¶
IsInSync Check if folder files are in-sync
func (*PathMap) Setup ¶
func (f *PathMap) Setup(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Setup Setup local project config
func (*PathMap) Update ¶
func (f *PathMap) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Update update some fields of a folder
type RegisteredCB ¶
type RegisteredCB struct {
// contains filtered or unexported fields
}
RegisteredCB Hold registered callbacks
type SDKs ¶
type SDKs struct { *Context Sdks map[string]*CrossSDK SdksFamilies map[string]*xsapiv1.SDKFamilyConfig // contains filtered or unexported fields }
SDKs List of installed SDK
func SDKsConstructor ¶ added in v1.1.0
SDKsConstructor creates a new instance of SDKs
func (*SDKs) AbortInstall ¶
AbortInstall Used to abort SDK installation
func (*SDKs) GetByPath ¶
GetByPath Find a SDK from path
func (*SDKs) GetEnvCmd ¶
GetEnvCmd returns the command used to initialized the environment for an SDK
func (*SDKs) Install ¶
func (s *SDKs) Install(id, filepath string, force bool, timeout int, args []string, sess *ClientSession) (*xsapiv1.SDK, error)
Install Used to install a new SDK
func (*SDKs) Remove ¶
Remove Used to uninstall a SDK
func (*SDKs) ResolveID ¶
ResolveID Complete an SDK ID (helper for user that can use partial ID value)
type STFolder ¶
type STFolder struct { *Context // contains filtered or unexported fields }
STFolder .
func NewFolderST ¶
NewFolderST Create a new instance of STFolder
func (*STFolder) Add ¶
func (f *STFolder) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Add a new folder
func (*STFolder) ConvPathCli2Svr ¶
ConvPathCli2Svr Convert path from Client to Server
func (*STFolder) ConvPathSvr2Cli ¶
ConvPathSvr2Cli Convert path from Server to Client
func (*STFolder) GetConfig ¶
func (f *STFolder) GetConfig() xsapiv1.FolderConfig
GetConfig Get public part of folder config
func (*STFolder) GetFullPath ¶
GetFullPath returns the full path of a directory (from server POV)
func (*STFolder) IsInSync ¶
IsInSync Check if folder files are in-sync
func (*STFolder) Setup ¶
func (f *STFolder) Setup(fld xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Setup Setup local project config
func (*STFolder) Update ¶
func (f *STFolder) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Update update some fields of a folder
type STFolderDisable ¶
type STFolderDisable struct { *Context // contains filtered or unexported fields }
STFolderDisable .
func NewFolderSTDisable ¶
func NewFolderSTDisable(ctx *Context) *STFolderDisable
NewFolderSTDisable Create a new instance of STFolderDisable
func (*STFolderDisable) Add ¶
func (f *STFolderDisable) Add(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Add a new folder
func (*STFolderDisable) ConvPathCli2Svr ¶
func (f *STFolderDisable) ConvPathCli2Svr(s string) string
ConvPathCli2Svr Convert path from Client to Server
func (*STFolderDisable) ConvPathSvr2Cli ¶
func (f *STFolderDisable) ConvPathSvr2Cli(s string) string
ConvPathSvr2Cli Convert path from Server to Client
func (*STFolderDisable) GetConfig ¶
func (f *STFolderDisable) GetConfig() xsapiv1.FolderConfig
GetConfig Get public part of folder config
func (*STFolderDisable) GetFullPath ¶
func (f *STFolderDisable) GetFullPath(dir string) string
GetFullPath returns the full path of a directory (from server POV)
func (*STFolderDisable) IsInSync ¶
func (f *STFolderDisable) IsInSync() (bool, error)
IsInSync Check if folder files are in-sync
func (*STFolderDisable) NewUID ¶
func (f *STFolderDisable) NewUID(suffix string) string
NewUID Get a UUID
func (*STFolderDisable) Setup ¶
func (f *STFolderDisable) Setup(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Setup Setup local project config
func (*STFolderDisable) Sync ¶
func (f *STFolderDisable) Sync() error
Sync Force folder files synchronization
func (*STFolderDisable) Update ¶
func (f *STFolderDisable) Update(cfg xsapiv1.FolderConfig) (*xsapiv1.FolderConfig, error)
Update update some fields of a folder
type Sessions ¶
type Sessions struct { *Context // contains filtered or unexported fields }
Sessions holds client sessions
func ClientSessionsConstructor ¶ added in v1.1.0
ClientSessionsConstructor .
func (*Sessions) Get ¶
func (s *Sessions) Get(c *gin.Context) *ClientSession
Get returns the client session for a specific ID
func (*Sessions) IOSocketGet ¶
IOSocketGet Get socketio definition from sid
func (*Sessions) Middleware ¶
func (s *Sessions) Middleware() gin.HandlerFunc
Middleware is used to managed session
type Targets ¶ added in v1.1.0
type Targets struct { *Context // contains filtered or unexported fields }
Targets Represent a XDS targets
func TargetsConstructor ¶ added in v1.1.0
TargetsConstructor Create a new instance of Model Target
func (*Targets) Add ¶ added in v1.1.0
func (t *Targets) Add(newT xsapiv1.TargetConfig, sess *ClientSession) (*xsapiv1.TargetConfig, error)
Add adds a new target
func (*Targets) CloseTerminal ¶ added in v1.1.0
func (t *Targets) CloseTerminal(targetID, termID string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
CloseTerminal Close a target terminal
func (*Targets) CreateUpdateTerminal ¶ added in v1.1.0
func (t *Targets) CreateUpdateTerminal(targetID string, tmCfg xsapiv1.TerminalConfig, initial bool) (*xsapiv1.TerminalConfig, error)
CreateUpdateTerminal Create or Update a target terminal definition
func (*Targets) Delete ¶ added in v1.1.0
func (t *Targets) Delete(id string, sess *ClientSession) (xsapiv1.TargetConfig, error)
Delete deletes a specific target
func (*Targets) DeleteTerminal ¶ added in v1.1.0
func (t *Targets) DeleteTerminal(targetID, termID string) (*xsapiv1.TerminalConfig, error)
DeleteTerminal Delete a target terminal definition
func (*Targets) Get ¶ added in v1.1.0
Get returns the target config or nil if not existing
func (*Targets) GetConfigArr ¶ added in v1.1.0
func (t *Targets) GetConfigArr() []xsapiv1.TargetConfig
GetConfigArr returns the config of all targets as an array
func (*Targets) GetTerminal ¶ added in v1.1.0
GetTerminal Return info of a specific terminal
func (*Targets) GetTerminalsArr ¶ added in v1.1.0
func (t *Targets) GetTerminalsArr(targetID string) ([]xsapiv1.TerminalConfig, error)
GetTerminalsArr Return list of existing terminals
func (*Targets) LoadConfig ¶ added in v1.1.0
LoadConfig Load targets configuration from disk
func (*Targets) OpenTerminal ¶ added in v1.1.0
func (t *Targets) OpenTerminal(targetID, termID string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
OpenTerminal Open a target terminal
func (*Targets) ResizeTerminal ¶ added in v1.1.0
func (t *Targets) ResizeTerminal(targetID, termID string, cols, rows uint16, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
ResizeTerminal Set size (row+col) of a target terminal
func (*Targets) ResolveID ¶ added in v1.1.0
ResolveID Complete a Target ID (helper for user that can use partial ID value)
func (*Targets) ResolveTerminalID ¶ added in v1.1.0
ResolveTerminalID Complete a Terminal ID (helper for user that can use partial ID value)
func (*Targets) SaveConfig ¶ added in v1.1.0
SaveConfig Save targets configuration to disk
type TermSSH ¶ added in v1.1.0
type TermSSH struct { *Context // contains filtered or unexported fields }
TermSSH .
func NewTermSSH ¶ added in v1.1.0
func NewTermSSH(ctx *Context, cfg xsapiv1.TerminalConfig, targetID string) *TermSSH
NewTermSSH Create a new instance of TermSSH
func (*TermSSH) Close ¶ added in v1.1.0
func (t *TermSSH) Close() (*xsapiv1.TerminalConfig, error)
Close a terminal
func (*TermSSH) GetConfig ¶ added in v1.1.0
func (t *TermSSH) GetConfig() xsapiv1.TerminalConfig
GetConfig Get public part of terminal config
func (*TermSSH) Open ¶ added in v1.1.0
Open a new terminal - execute ssh command and bind stdin/stdout to WebSocket
func (*TermSSH) Resize ¶ added in v1.1.0
func (t *TermSSH) Resize(cols, rows uint16) (*xsapiv1.TerminalConfig, error)
Resize a terminal
func (*TermSSH) Signal ¶ added in v1.1.0
Signal Send a signal to a terminal
func (*TermSSH) UpdateConfig ¶ added in v1.1.0
func (t *TermSSH) UpdateConfig(newCfg xsapiv1.TerminalConfig) *xsapiv1.TerminalConfig
UpdateConfig Update terminal config
type Terminals ¶ added in v1.1.0
type Terminals struct { *Context // contains filtered or unexported fields }
Terminals Represent a XDS terminals
func TerminalsConstructor ¶ added in v1.1.0
TerminalsConstructor Create a new instance of Model Terminal
func (*Terminals) Close ¶ added in v1.1.0
func (t *Terminals) Close(id string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
Close a specific terminal
func (*Terminals) Free ¶ added in v1.1.0
func (t *Terminals) Free(id string) (*xsapiv1.TerminalConfig, error)
Free a specific terminal
func (*Terminals) Get ¶ added in v1.1.0
Get returns the terminal config or nil if not existing
func (*Terminals) GetConfigArr ¶ added in v1.1.0
func (t *Terminals) GetConfigArr() []xsapiv1.TerminalConfig
GetConfigArr returns the config of all terminals as an array
func (*Terminals) New ¶ added in v1.1.0
func (t *Terminals) New(cfg xsapiv1.TerminalConfig, targetID string) (*xsapiv1.TerminalConfig, error)
New Create a new terminal
func (*Terminals) Open ¶ added in v1.1.0
func (t *Terminals) Open(id string, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
Open adds a new terminal
func (*Terminals) Resize ¶ added in v1.1.0
func (t *Terminals) Resize(id string, cols, rows uint16, sess *ClientSession) (*xsapiv1.TerminalConfig, error)
Resize a specific terminal
type TgtStd ¶ added in v1.1.0
type TgtStd struct { *Context TgtConfig xsapiv1.TargetConfig // contains filtered or unexported fields }
TgtStd .
func NewTargetStandard ¶ added in v1.1.0
NewTargetStandard Create a new instance of TgtStd
func (*TgtStd) Add ¶ added in v1.1.0
func (t *TgtStd) Add(cfg xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error)
Add a new target
func (*TgtStd) GetConfig ¶ added in v1.1.0
func (t *TgtStd) GetConfig() xsapiv1.TargetConfig
GetConfig Get public part of target config
func (*TgtStd) NewUID ¶ added in v1.1.0
NewUID Get a UUID
func (*TgtStd) Setup ¶ added in v1.1.0
func (t *TgtStd) Setup(cfg xsapiv1.TargetConfig, terms *Terminals) (*xsapiv1.TargetConfig, error)
Setup Setup local project config
Source Files ¶
- apiv1-config.go
- apiv1-events.go
- apiv1-exec.go
- apiv1-folders.go
- apiv1-make.go
- apiv1-sdks.go
- apiv1-targets.go
- apiv1-version.go
- apiv1.go
- events.go
- folder-interface.go
- folder-pathmap.go
- folder-st-disable.go
- folder-st.go
- folders.go
- sdk.go
- sdks.go
- sessions.go
- target-interface.go
- target-standard.go
- targets.go
- terminal-interface.go
- terminal-ssh.go
- terminals.go
- webserver.go
- xdsserver.go