Documentation ¶
Index ¶
- type Runner
- func (r Runner) Backup(name string, worldId int64, c echo.Context) error
- func (r Runner) BackupUtil(name string, worldId int64, c echo.Context) error
- func (r Runner) CleanOldBackups(worldId, days int64, c echo.Context) error
- func (r Runner) DeleteBackup(id int64, c echo.Context) error
- func (r Runner) DeleteServer(id int64, c echo.Context) error
- func (r Runner) DeleteWorld(id int64, c echo.Context) error
- func (r Runner) GetServer(version string, c echo.Context) error
- func (r Runner) InitDir() error
- func (r Runner) Restore(id int64, ifBackup bool, c echo.Context) error
- func (r Runner) Start(worldId int64) error
- func (r Runner) Stop(worldId int64) error
- func (r Runner) UploadSaveData(worldId int64, worldFile *multipart.FileHeader, c echo.Context) error
- func (r Runner) UseServer(serverId, worldId int64, c echo.Context) error
- type ServerInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct { Db *dal.Db ServerInstances map[int64]*ServerInstance McPath string LogFolder string ServersFolder string BackupsFolder string }
func (Runner) BackupUtil ¶
BackupUtil is used by backup and restore
func (Runner) CleanOldBackups ¶
CleanOldBackups deletes backups older than days
func (Runner) DeleteBackup ¶
func (Runner) DeleteServer ¶
func (Runner) DeleteWorld ¶
func (Runner) UploadSaveData ¶
func (r Runner) UploadSaveData(worldId int64, worldFile *multipart.FileHeader, c echo.Context) error
UploadSaveData receives and unzips a world file for later usage
type ServerInstance ¶
type ServerInstance struct { Running bool // contains filtered or unexported fields }
func (*ServerInstance) Start ¶
func (s *ServerInstance) Start(logPath, serverPath string, world dal.Worlds) error
func (*ServerInstance) Stop ¶
func (s *ServerInstance) Stop() error
Click to show internal directories.
Click to hide internal directories.