Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleRequests ¶
func HandleRequests(d bool)
func WriteToFile ¶
Types ¶
type Client ¶
type Client struct {
Token string
// contains filtered or unexported fields
}
var clients = make(map[*websocket.Conn]bool) // connected clients
type Config ¶
type Config struct {
Tokens []struct {
CaptainID string `json:"captain_id"`
Token string `json:"token"`
} `json:"tokens"`
Servers []struct {
Name string `json:"name"`
Address string `json:"address"`
Requires []struct {
Command string `json:"command"`
} `json:"requires"`
} `json:"servers"`
Host string `json:"host"`
Port string `json:"port"`
SSLMode string `json:"ssl_mode"`
}
func LoadConfiguration ¶
type SocketRequest ¶
Define our message object
type SocketResponse ¶
type Task ¶
type Task struct {
gorm.Model
CaptainID int
ProcessID int
Command string
Status string
Response string
Origin string
Token string `gorm:"index"`
// ArgsJSON persists the argv for the new array protocol so queued/resumed
// tasks reconstruct exactly (the human-readable Command stays display-only).
ArgsJSON string `json:"-"`
// Args and Payload are decoded from the request body only (never persisted).
Args []string `json:"args" gorm:"-"`
Payload string `json:"payload" gorm:"-"`
}
Click to show internal directories.
Click to hide internal directories.