apiv1

package
v0.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const EventEventAll = "event:all"

EventEvent Event send in WS when an internal event (eg. Syncthing event is received)

View Source
const EventEventType = "event:" // following by event type
View Source
const MakeExitEvent = "make:exit"

MakeExitEvent Event send in WS when command exited

View Source
const MakeOutEvent = "make:output"

MakeOutEvent Event send in WS when characters are received on stdout/stderr

Variables

This section is empty.

Functions

This section is empty.

Types

type APIService

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

APIService .

func New

func New(r *gin.Engine, sess *session.Sessions, cfg *xdsconfig.Config, mfolders *model.Folders, sdks *crosssdk.SDKs) *APIService

New creates a new instance of API service

type EventMsg

type EventMsg struct {
	Time   string              `json:"time"`
	Type   string              `json:"type"`
	Folder folder.FolderConfig `json:"folder"`
}

EventMsg Message send

type EventRegisterArgs

type EventRegisterArgs struct {
	Name      string `json:"name"`
	ProjectID string `json:"filterProjectID"`
}

EventArgs is the parameters (json format) of /events/register command

type EventUnRegisterArgs

type EventUnRegisterArgs struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

type ExecArgs

type ExecArgs struct {
	ID              string   `json:"id" binding:"required"`
	SdkID           string   `json:"sdkid"` // sdk ID to use for setting env
	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 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 MakeArgs

type MakeArgs struct {
	ID            string   `json:"id"`
	SdkID         string   `json:"sdkid"` // sdk ID to use for setting env
	Args          []string `json:"args"`  // args to pass to make command
	Env           []string `json:"env"`
	RPath         string   `json:"rpath"`         // relative path into project
	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
}

MakeArgs is the parameters (json format) of /make command

type MakeExitMsg

type MakeExitMsg struct {
	CmdID     string `json:"cmdID"`
	Timestamp string `json:"timestamp"`
	Code      int    `json:"code"`
	Error     error  `json:"error"`
}

MakeExitMsg Message send on make command exit

type MakeOutMsg

type MakeOutMsg struct {
	CmdID     string `json:"cmdID"`
	Timestamp string `json:"timestamp"`
	Stdout    string `json:"stdout"`
	Stderr    string `json:"stderr"`
}

MakeOutMsg Message send on each output (stdout+stderr) of make command

type XDSAgentInfo

type XDSAgentInfo struct {
	Tarballs []XDSAgentTarball `json:"tarballs"`
}

XDSAgentInfo .

type XDSAgentTarball

type XDSAgentTarball struct {
	OS         string `json:"os"`
	Arch       string `json:"arch"`
	Version    string `json:"version"`
	RawVersion string `json:"raw-version"`
	FileURL    string `json:"fileUrl"`
}

XDSAgentTarball .

Jump to

Keyboard shortcuts

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