daemon

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive added in v2.3.0

func Archive(c *gin.Context)

@Summary Archive file(s) @Description Archives file(s) with the @Accept json @Success 204 {object} response.Empty "If file(s) was archived" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param filename path string true "Destination" @Router /daemon/server/{id}/archive/{filename} [post]

func CreateServer

func CreateServer(c *gin.Context)

@Summary Create server @Description Creates the server @Accept json @Produce json @Success 200 {object} pufferpanel.ServerIdResponse "Server created" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param server body pufferpanel.Server true "Server to create" @Router /daemon/server/{id} [put]

func CreateServerTask added in v2.3.2

func CreateServerTask(c *gin.Context)

func DeleteFile

func DeleteFile(c *gin.Context)

@Summary Delete file @Description Deletes a file from the server @Accept json @Produce json @Success 204 {object} response.Empty "If file was deleted" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param filename path string true "File name" @Router /daemon/server/{id}/file/{filename} [delete]

func DeleteServer

func DeleteServer(c *gin.Context)

@Summary Deletes server @Description Deletes the given server @Accept json @Produce json @Success 204 {object} response.Empty "Server deleted" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id} [delete]

func DeleteServerTask added in v2.3.2

func DeleteServerTask(c *gin.Context)

func EditServerAdmin

func EditServerAdmin(c *gin.Context)

@Summary Updates a server @Description Updates a server @Accept json @Produce json @Success 204 {object} response.Empty @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id} [post]

func EditServerData added in v2.3.2

func EditServerData(c *gin.Context)

@Summary Edit server data @Description Edits the given server data @Accept json @Produce json @Success 204 {object} response.Empty "Server edited" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param data body pufferpanel.ServerData true "Server data" @Router /daemon/server/{id}/data [post]

func EditServerTask added in v2.3.2

func EditServerTask(c *gin.Context)

func Extract added in v2.3.0

func Extract(c *gin.Context)

@Summary Extract files @Description Extracts files from an archive @Accept json @Produce json @Success 204 {object} response.Empty "If file was extracted" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param filename path string true "File name" @Param destination path string true "Destination directory (URI Parameter)" @Router /daemon/server/{id}/extract/{filename} [get]

func GetFile

func GetFile(c *gin.Context)

@Summary Get file/list @Description Gets a file or a file list from the server @Accept json @Produce json @Produce octet-stream @Success 200 {object} string "File" @Success 200 {object} messages.FileDesc "File List" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param filename path string true "File name" @Router /daemon/server/{id}/file/{filename} [get]

func GetLogs

func GetLogs(c *gin.Context)

@Summary Gets server logs @Description Gets the given server logs since a certain time period @Accept json @Produce json @Success 200 {object} pufferpanel.ServerLogs "Logs for this server" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param time query int false "Only get data from after this UNIX timestamp" default(0) @Router /daemon/server/{id}/console [get]

func GetServerAdmin

func GetServerAdmin(c *gin.Context)

@Summary Gets server data as admin @Description Gets the given server data from an admin's view @Accept json @Produce json @Success 200 {object} pufferpanel.ServerDataAdmin "Data for this server" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id} [get]

func GetServerData added in v2.3.2

func GetServerData(c *gin.Context)

@Summary Gets server data @Description Gets the given server data @Accept json @Produce json @Success 200 {object} pufferpanel.ServerData "Data for this server" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id}/data [get]

func GetServerTasks added in v2.3.2

func GetServerTasks(c *gin.Context)

func GetStats

func GetStats(c *gin.Context)

@Summary Gets server stats @Description Gets the given server stats @Accept json @Produce json @Success 200 {object} pufferpanel.ServerStats "Stats for this server" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id}/stats [get]

func GetStatus

func GetStatus(c *gin.Context)

@Summary Gets server status @Description Gets the given server status @Accept json @Produce json @Success 200 {object} pufferpanel.ServerRunning @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id}/status [get]

func InstallServer

func InstallServer(c *gin.Context)

@Summary Installs server @Description installs the given server @Accept json @Produce json @Success 202 {object} response.Empty "Install has been queued" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param wait query bool false "Wait for the operation to complete" @Router /daemon/server/{id}/install [post]

func KillServer

func KillServer(c *gin.Context)

@Summary Kill server @Description Stops the given server forcefully @Accept json @Produce json @Success 204 {object} response.Empty "Server killed" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id}/kill [post]

func OpenSocket

func OpenSocket(c *gin.Context)

func PostConsole

func PostConsole(c *gin.Context)

@Summary Run command @Description Runs a command in the server @Accept json @Produce json @Success 204 {object} response.Empty "If command was ran" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param commands body string true "Command to run" @Router /daemon/server/{id}/console [post]

func PutFile

func PutFile(c *gin.Context)

@Summary Put file/folder @Description Puts a file or folder on the server @Accept json @Produce json @Success 204 {object} response.Empty "If file/folder was created" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param filename path string true "File name" @Param folder path bool true "If this is a folder" @Param file formData file false "File to place" @Router /daemon/server/{id}/file/{filename} [put]

func RegisterDaemonRoutes

func RegisterDaemonRoutes(e *gin.RouterGroup)

func RegisterServerRoutes

func RegisterServerRoutes(e *gin.RouterGroup)

func ReloadServer

func ReloadServer(c *gin.Context)

@Summary Reload server @Description Reloads the server from disk @Accept json @Produce json @Success 204 {object} response.Empty "Reloaded server" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Router /daemon/server/{id}/reload [post]

func StartServer

func StartServer(c *gin.Context)

@Summary Starts server @Description Starts the given server @Accept json @Produce json @Success 204 {object} response.Empty "Server started" @Success 202 {object} response.Empty "Start has been queued" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param wait query bool false "Wait for the operation to complete" @Router /daemon/server/{id}/start [post]

func StopServer

func StopServer(c *gin.Context)

@Summary Stop server @Description Stops the given server @Accept json @Produce json @Success 204 {object} response.Empty "Server stopped" @Success 202 {object} response.Empty "Stop has been queued" @Failure 400 {object} response.Error @Failure 403 {object} response.Empty @Failure 404 {object} response.Empty @Failure 500 {object} response.Error @Param id path string true "Server Identifier" @Param wait query bool false "Wait for the operation to complete" @Router /daemon/server/{id}/stop [post]

Types

type Features added in v2.3.2

type Features struct {
	Features []string `json:"features"`
}

Jump to

Keyboard shortcuts

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