package shared

type Operation string

const (
	Deploy    = Operation("deploy")
	Withdraw  = Operation("withdraw")
	Upgrade   = Operation("upgrade")
	Start     = Operation("start")
	Restart   = Operation("restart")
	Stop      = Operation("stop")
	Upload    = Operation("upload")
	Exception = Operation("exception")
)

type DeployRequest struct {
	Name        string
	Version     string
	Url         string
	Config      string
	AccessToken string
}

type WithdrawRequest struct {
	Name    string
	Version string
}

type StartProcessRequest struct {
	Name          string
	Version       string
	Args          []string
	AutoRestart   bool
	OutputLogFile string
}

type StopProcessRequest struct {
	Name    string
	Version string
	Pid     int32
}

type RestartProcessRequest struct {
	Name   string
	Pid    int32
	Config string
}

type UploadRequest struct {
	Name                string
	Version             string
	Url                 string
	Filter              string
	DeleteAfterUploaded string // true, false
}
