command

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Error   = '1'
	Ping    = '2'
	Pong    = '3'
	Input   = '4'
	Output  = '5'
	GetSize = '6'
	Size    = '7'
	SetSize = '8'
)
View Source
const BufferSize = 1024

Variables

This section is empty.

Functions

func Command

func Command(w http.ResponseWriter, r *http.Request)

func DiceDownload

func DiceDownload(w http.ResponseWriter, r *http.Request)

func GetFileName

func GetFileName(path string) string

func ReadDownloadResult

func ReadDownloadResult(w http.ResponseWriter, r *http.Request)

func Terminal

func Terminal(w http.ResponseWriter, r *http.Request)

Types

type Action

type Action struct {
	Env  []string         `json:"env"`
	Name string           `json:"name"`
	Args *json.RawMessage `json:"args"`
}

func (Action) CleanCI

func (a Action) CleanCI() ([]string, error)

func (Action) CommandContext

func (a Action) CommandContext(ctx context.Context) (cmd *exec.Cmd, err error)

func (Action) Docker

func (a Action) Docker() ([]string, error)

func (Action) DockerLogs

func (a Action) DockerLogs() ([]string, error)

func (Action) SSH

func (a Action) SSH() ([]string, error)

func (Action) TerminalContext

func (a Action) TerminalContext(ctx context.Context) (cmd *exec.Cmd, err error)

type ActionCleanCI

type ActionCleanCI struct {
	Days int `json:"days"`
}

type ActionDocker

type ActionDocker struct {
	Host      string `json:"host"`
	Port      int    `json:"port"`
	Container string `json:"container"`
}

type ActionDockerLogs

type ActionDockerLogs struct {
	Host      string `json:"host"`
	Port      int    `json:"port"`
	Container string `json:"container"`
	Since     string `json:"since"`
	Tail      string `json:"tail"`
}

type ActionSSH

type ActionSSH struct {
	Host string `json:"host"`
	Port int    `json:"port"`
	User string `json:"user"`
}

type Download

type Download struct {
	GetDumpRequest
	Key string
	DB  *leveldb.DB
}

func (*Download) FileCopy

func (d *Download) FileCopy() error

type DumpError

type DumpError struct {
	Dump     string `json:"dump"`
	Copy     string `json:"copy"`
	Compress string `json:"compress"`
	Upload   string `json:"upload"`
}

type DumpResult

type DumpResult struct {
	Dump     int `json:"dump"`
	Copy     int `json:"copy"`
	Compress int `json:"compress"`
	Upload   int `json:"upload"`
}

type GetDumpRequest

type GetDumpRequest struct {
	User     string `json:"user"`
	Host     string `json:"host"`
	App      string `json:"app"`
	Docker   string `json:"docker"`
	FilePath string `json:"filePath"`
	Option   string `json:"option"`
}

type GetDumpResponse

type GetDumpResponse struct {
	Key         string `json:"key"`
	Description string `json:"description"`
}

type GetDumpStatusResponse

type GetDumpStatusResponse struct {
	Data  *DumpResult `json:"data"`
	Error *DumpError  `json:"error"`
}

Jump to

Keyboard shortcuts

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