Documentation ¶
Index ¶
- func Archive(c *gin.Context)
- func CreateServer(c *gin.Context)
- func CreateServerTask(c *gin.Context)
- func DeleteFile(c *gin.Context)
- func DeleteServer(c *gin.Context)
- func DeleteServerTask(c *gin.Context)
- func EditServerAdmin(c *gin.Context)
- func EditServerData(c *gin.Context)
- func EditServerTask(c *gin.Context)
- func Extract(c *gin.Context)
- func GetFile(c *gin.Context)
- func GetLogs(c *gin.Context)
- func GetServerAdmin(c *gin.Context)
- func GetServerData(c *gin.Context)
- func GetServerTasks(c *gin.Context)
- func GetStats(c *gin.Context)
- func GetStatus(c *gin.Context)
- func InstallServer(c *gin.Context)
- func KillServer(c *gin.Context)
- func OpenSocket(c *gin.Context)
- func PostConsole(c *gin.Context)
- func PutFile(c *gin.Context)
- func RegisterDaemonRoutes(e *gin.RouterGroup)
- func RegisterServerRoutes(e *gin.RouterGroup)
- func ReloadServer(c *gin.Context)
- func StartServer(c *gin.Context)
- func StopServer(c *gin.Context)
- type Features
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive ¶ added in v2.3.0
@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 ¶
@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 DeleteFile ¶
@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 ¶
@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 EditServerAdmin ¶
@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
@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 Extract ¶ added in v2.3.0
@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 ¶
@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 ¶
@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 ¶
@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
@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 GetStats ¶
@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 ¶
@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 ¶
@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 ¶
@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 PostConsole ¶
@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 ¶
@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 ¶
@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 ¶
@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 ¶
@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]