Documentation ¶
Index ¶
- Variables
- func Create(id string, serverType string, data map[string]interface{}) bool
- func Delete(id string) (err error)
- func GetPlugins() map[string]interface{}
- func Initialize()
- func LoadFromFolder()
- func Reload(id string) error
- func Save(id string) (err error)
- type Program
- func Get(id string) (program Program, err error)
- func GetAll() []Program
- func GetFromCache(id string) Program
- func Load(id string) (program Program, err error)
- func LoadFromData(id string, source []byte) (program Program, err error)
- func LoadFromMapping(id string, source map[string]interface{}) (program Program, err error)
- type Runtime
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ServerFolder string
)
Functions ¶
func GetPlugins ¶
func GetPlugins() map[string]interface{}
func Initialize ¶
func Initialize()
func LoadFromFolder ¶
func LoadFromFolder()
Types ¶
type Program ¶
type Program interface { //Starts the program. //This includes starting the environment if it is not running. Start() (err error) //Stops the program. //This will also stop the environment it is ran in. Stop() (err error) //Kills the program. //This will also stop the environment it is ran in. Kill() (err error) //Creates any files needed for the program. //This includes creating the environment. Create() (err error) //Destroys the server. //This will delete the server, environment, and any files related to it. Destroy() (err error) Update() (err error) Install() (err error) //Determines if the server is running. IsRunning() (isRunning bool) //Sends a command to the process //If the program supports input, this will send the arguments to that. Execute(command string) (err error) SetEnabled(isEnabled bool) (err error) IsEnabled() (isEnabled bool) SetAutoStart(isAutoStart bool) (err error) IsAutoStart() (isAutoStart bool) SetEnvironment(environment environments.Environment) (err error) Id() string GetEnvironment() environments.Environment Save(file string) (err error) Edit(data map[string]interface{}) (err error) Reload(data Program) GetData() map[string]interface{} GetNetwork() string }
func GetFromCache ¶
Click to show internal directories.
Click to hide internal directories.