Documentation ¶
Index ¶
- Constants
- Variables
- type APIConfig
- type BuilderConfig
- type CloudSyncConfig
- type EventMsg
- type EventRegisterArgs
- type EventUnRegisterArgs
- type ExecArgs
- type ExecExitMsg
- type ExecInMsg
- type ExecOutMsg
- type ExecResult
- type ExecSigResult
- type ExecSignalArgs
- type FolderConfig
- type FolderType
- type PathMapConfig
- type SDK
- type Version
Constants ¶
const ( // EventTypePrefix Used as event prefix EventTypePrefix = "event:" // following by event type // Supported Events type EVTAll = EventTypePrefix + "all" EVTFolderChange = EventTypePrefix + "folder-change" // type EventMsg with Data type xsapiv1.??? EVTFolderStateChange = EventTypePrefix + "folder-state-change" // type EventMsg with Data type xsapiv1.??? )
EventEvent Event send in WS when an internal event (eg. Syncthing event is received)
const ( // ExecInEvent Event send in WS when characters are sent (stdin) ExecInEvent = "exec:input" // ExecOutEvent Event send in WS when characters are received (stdout or stderr) ExecOutEvent = "exec:output" // ExecExitEvent Event send in WS when program exited ExecExitEvent = "exec:exit" // ExecInferiorInEvent Event send in WS when characters are sent to an inferior (used by gdb inferior/tty) ExecInferiorInEvent = "exec:inferior-input" // ExecInferiorOutEvent Event send in WS when characters are received by an inferior ExecInferiorOutEvent = "exec:inferior-output" )
const ( TypePathMap = "PathMap" TypeCloudSync = "CloudSync" TypeCifsSmb = "CIFS" )
const ( StatusErrorConfig = "ErrorConfig" StatusDisable = "Disable" StatusEnable = "Enable" StatusPause = "Pause" StatusSyncing = "Syncing" )
Folder Status definition
Variables ¶
var FolderConfigUpdatableFields = []string{
"Label", "DefaultSdk", "ClientData",
}
FolderConfigUpdatableFields List fields that can be updated using Update function
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { ServerUID string `json:"id"` Version string `json:"version"` APIVersion string `json:"apiVersion"` VersionGitTag string `json:"gitTag"` SupportedSharing map[string]bool `json:"supportedSharing"` Builder BuilderConfig `json:"builder"` }
APIConfig parameters (json format) of /config command
type BuilderConfig ¶
type BuilderConfig struct { IP string `json:"ip"` Port string `json:"port"` SyncThingID string `json:"syncThingID"` }
BuilderConfig represents the builder container configuration
type CloudSyncConfig ¶
type CloudSyncConfig struct { SyncThingID string `json:"syncThingID"` // Not exported fields (only used internally) STSvrStatus string `json:"-"` STSvrIsInSync bool `json:"-"` STLocStatus string `json:"-"` STLocIsInSync bool `json:"-"` }
CloudSyncConfig CloudSync (AKA Syncthing) specific data
type EventMsg ¶
type EventMsg struct { Time string `json:"time"` Type string `json:"type"` Folder FolderConfig `json:"folder"` }
EventMsg Message send
type EventRegisterArgs ¶
type EventRegisterArgs struct { Name string `json:"name"` ProjectID string `json:"filterProjectID"` }
EventRegisterArgs Parameters (json format) of /events/register command
type EventUnRegisterArgs ¶
EventUnRegisterArgs Parameters of /events/unregister command
type ExecArgs ¶
type ExecArgs struct { ID string `json:"id" binding:"required"` SdkID string `json:"sdkID"` // sdk ID to use for setting env CmdID string `json:"cmdID"` // command unique ID Cmd string `json:"cmd" binding:"required"` Args []string `json:"args"` Env []string `json:"env"` RPath string `json:"rpath"` // relative path into project TTY bool `json:"tty"` // Use a tty, specific to gdb --tty option TTYGdbserverFix bool `json:"ttyGdbserverFix"` // Set to true to activate gdbserver workaround about inferior output ExitImmediate bool `json:"exitImmediate"` // when true, exit event sent immediately when command exited (IOW, don't wait file synchronization) CmdTimeout int `json:"timeout"` // command completion timeout in Second }
ExecArgs JSON parameters of /exec command
type ExecExitMsg ¶
type ExecExitMsg struct { CmdID string `json:"cmdID"` Timestamp string `json:"timestamp"` Code int `json:"code"` Error error `json:"error"` }
ExecExitMsg Message sent when executed command exited
type ExecInMsg ¶
type ExecInMsg struct { CmdID string `json:"cmdID"` Timestamp string `json:"timestamp"` Stdin string `json:"stdin"` }
ExecInMsg Message used to received input characters (stdin)
type ExecOutMsg ¶
type ExecOutMsg struct { CmdID string `json:"cmdID"` Timestamp string `json:"timestamp"` Stdout string `json:"stdout"` Stderr string `json:"stderr"` }
ExecOutMsg Message used to send output characters (stdout+stderr)
type ExecResult ¶
type ExecResult struct { Status string `json:"status"` // status OK CmdID string `json:"cmdID"` // command unique ID }
ExecResult JSON result of /exec command
type ExecSigResult ¶
type ExecSigResult struct { Status string `json:"status"` // status OK CmdID string `json:"cmdID"` // command unique ID }
ExecSigResult JSON result of /signal command
type ExecSignalArgs ¶
type ExecSignalArgs struct { CmdID string `json:"cmdID" binding:"required"` // command id Signal string `json:"signal" binding:"required"` // signal number }
ExecSignalArgs JSON parameters of /exec/signal command
type FolderConfig ¶
type FolderConfig struct { ID string `json:"id"` Label string `json:"label"` ClientPath string `json:"path"` Type FolderType `json:"type"` Status string `json:"status"` IsInSync bool `json:"isInSync"` DefaultSdk string `json:"defaultSdk"` ClientData string `json:"clientData"` // free form field that can used by client // Not exported fields from REST API point of view RootPath string `json:"-"` // Specific data depending on which Type is used DataPathMap PathMapConfig `json:"dataPathMap,omitempty"` DataCloudSync CloudSyncConfig `json:"dataCloudSync,omitempty"` }
FolderConfig is the config for one folder
type PathMapConfig ¶
type PathMapConfig struct { ServerPath string `json:"serverPath"` // Don't keep temporary file name (IOW we don't want to save it and reuse it) CheckFile string `json:"checkFile" xml:"-"` CheckContent string `json:"checkContent" xml:"-"` }
PathMapConfig Path mapping specific data
type SDK ¶
type SDK struct { ID string `json:"id" binding:"required"` Name string `json:"name"` Profile string `json:"profile"` Version string `json:"version"` Arch string `json:"arch"` Path string `json:"path"` // Not exported fields EnvFile string `json:"-"` }
SDK Define a cross tool chain used to build application