Phase5
This commit is contained in:
@@ -44,6 +44,8 @@ const (
|
||||
TypeServerWorldReplace MessageType = "server.world.replace"
|
||||
TypeServerStorageUpload MessageType = "server.storage.upload"
|
||||
TypeServerStorageDownload MessageType = "server.storage.download"
|
||||
TypeServerAddonInstall MessageType = "server.addon.install"
|
||||
TypeServerAddonRemove MessageType = "server.addon.remove"
|
||||
TypeServerMetricsSub MessageType = "server.metrics.subscribe"
|
||||
TypeServerLogsSubscribe MessageType = "server.logs.subscribe"
|
||||
)
|
||||
@@ -80,6 +82,8 @@ var controlToAgentTypes = map[MessageType]struct{}{
|
||||
TypeServerWorldReplace: {},
|
||||
TypeServerStorageUpload: {},
|
||||
TypeServerStorageDownload: {},
|
||||
TypeServerAddonInstall: {},
|
||||
TypeServerAddonRemove: {},
|
||||
TypeServerMetricsSub: {},
|
||||
TypeServerLogsSubscribe: {},
|
||||
}
|
||||
@@ -220,6 +224,20 @@ type ServerWorldReplacePayload struct {
|
||||
ArchivePath string `json:"archivePath"`
|
||||
}
|
||||
|
||||
// ServerAddonInstallPayload downloads and installs an addon file.
|
||||
type ServerAddonInstallPayload struct {
|
||||
OperationMeta
|
||||
DownloadURL string `json:"downloadUrl"`
|
||||
RelativePath string `json:"relativePath"`
|
||||
Sha512 string `json:"sha512,omitempty"`
|
||||
}
|
||||
|
||||
// ServerAddonRemovePayload removes an installed addon file.
|
||||
type ServerAddonRemovePayload struct {
|
||||
OperationMeta
|
||||
RelativePath string `json:"relativePath"`
|
||||
}
|
||||
|
||||
// FileEntry describes a file or directory in a list response.
|
||||
type FileEntry struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
Reference in New Issue
Block a user