Documentation ¶
Index ¶
- Variables
- func ArchiveServer(root *cmd.RootCMD, c *cmd.CMD)
- func AttachToSession(root *cmd.RootCMD, c *cmd.CMD)
- func Execute(root *cmd.RootCMD, c *cmd.CMD)
- func InitServer(root *cmd.RootCMD, c *cmd.CMD)
- func StartServer(root *cmd.RootCMD, c *cmd.CMD)
- func StopServer(root *cmd.RootCMD, c *cmd.CMD)
- func UpdateServer(root *cmd.RootCMD, c *cmd.CMD)
- type AttachArgs
- type BackupArgs
- type ExecArgs
- type GlobalFlags
- type InitArgs
- type StartArgs
- type StopArgs
- type UpdateArgs
Constants ¶
This section is empty.
Variables ¶
var Attach = cmd.CMD{ Name: "attach", Alias: "a", Short: "Open the server console", Args: &AttachArgs{}, Run: AttachToSession, }
Attach opens the server console.
var Backup = cmd.CMD{ Name: "backup", Alias: "b", Short: "Backup all server files into a .tar.gz archive", Args: &BackupArgs{}, Run: ArchiveServer, }
Backup archives the Minecraft server files.
var Exec = cmd.CMD{ Name: "exec", Alias: "e", Short: "Executes a command in the Minecraft server", Args: &ExecArgs{}, Run: Execute, }
Exec sends a command to the Minecraft server
var Init = cmd.CMD{ Name: "init", Alias: "i", Short: "Initialize the setup for a Minecraft server", Args: &InitArgs{}, Run: InitServer, }
Init sets up everything required to start a Minecraft server
var Root *cmd.RootCMD
Root is the main command for the application
var Start = cmd.CMD{ Name: "start", Alias: "s", Short: "Start the Minecraft server", Args: &StartArgs{}, Run: StartServer, }
Start attempts to start a Minecraft server.
var Stop = cmd.CMD{ Name: "stop", Alias: "st", Short: "Stop the Minecraft server", Args: &StopArgs{}, Run: StopServer, }
Stop attempts to stop a Minecraft server.
var Update = cmd.CMD{ Name: "update", Alias: "u", Short: "Update the jar file for the Minecraft server", Args: &UpdateArgs{}, Run: UpdateServer, }
Update downloads a server jar from the given URL.
Functions ¶
func ArchiveServer ¶
ArchiveServer adds all directories and files of the server into a Gzip'd tar archive.
func AttachToSession ¶
AttachToSession attaches to the server console if the server is running.
func InitServer ¶
InitServer sets up the Minecraft server directory
func StartServer ¶
StartServer starts a Minecraft server.
func StopServer ¶
StopServer stops the Minecraft server
Types ¶
type AttachArgs ¶
type AttachArgs struct{}
AttachArgs contains the command arguments for the stop command.
type BackupArgs ¶
type BackupArgs struct{}
BackupArgs contains the command arguments for the backup command.
type ExecArgs ¶
type ExecArgs struct {
Command string `desc:"The full command to send to the server. Use quotes for multiple words."`
}
ExecArgs contains the command arguments for the execute command
type InitArgs ¶
type InitArgs struct {
URL string `desc:"Location of a server jar to download"`
}
InitArgs contains the command arguments for the init command
type StartArgs ¶
type StartArgs struct{}
StartArgs contains the command arguments for the start command.
type StopArgs ¶
type StopArgs struct{}
StopArgs contains the command arguments for the stop command.
type UpdateArgs ¶
type UpdateArgs struct { Provider string `desc:"The server software we're trying to update"` Version string `desc:"The Minecraft version to download"` }
UpdateArgs contains the command arguments for the update command