30 lines
917 B
Go
30 lines
917 B
Go
// Package daemonapi defines the local Unix Socket request and response protocol.
|
|
package daemonapi
|
|
|
|
const (
|
|
OperationUpdate = "update"
|
|
OperationRestart = "restart"
|
|
InputTypeRepackZIP = "repack-zip"
|
|
InputTypeNativeJAR = "native-jar"
|
|
InputTypeContainerImage = "container-image"
|
|
ResponseProgress = "progress"
|
|
ResponseResult = "result"
|
|
)
|
|
|
|
type Request struct {
|
|
Operation string `json:"operation"`
|
|
Service string `json:"service"`
|
|
InputType string `json:"inputType"`
|
|
File string `json:"file"`
|
|
ImageReference string `json:"imageReference"`
|
|
StartLog bool `json:"startLog"`
|
|
}
|
|
|
|
type Response struct {
|
|
Kind string `json:"kind"`
|
|
TransactionID string `json:"transactionId,omitempty"`
|
|
State string `json:"state,omitempty"`
|
|
Message string `json:"message,omitempty"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|