refactor foundry lib structure; add transport classes for db,http,websocket; add action interface instead of multiple function that accepts action classes; add changing foundry status on websocket responses
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func (conf *Config) PostAuthenticationData() (*http.Response, error) {
|
||||
func (conf *FoundryHttpRequest) PostAuthenticationData() (*http.Response, error) {
|
||||
authData := url.Values{}
|
||||
authData.Add("adminPassword", conf.Password)
|
||||
authData.Add("action", "adminAuth")
|
||||
@@ -30,7 +30,7 @@ func (conf *Config) PostAuthenticationData() (*http.Response, error) {
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (conf *Config) PostLaunchWorld(world string) (*http.Response, error) {
|
||||
func (conf *FoundryHttpRequest) PostLaunchWorld(world string) (*http.Response, error) {
|
||||
launchData := url.Values{}
|
||||
launchData.Add("world", world)
|
||||
launchData.Add("action", "launchWorld")
|
||||
@@ -53,7 +53,7 @@ func (conf *Config) PostLaunchWorld(world string) (*http.Response, error) {
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (conf *Config) PostReturnToSetup() (*http.Response, error) {
|
||||
func (conf *FoundryHttpRequest) PostReturnToSetup() (*http.Response, error) {
|
||||
launchData := url.Values{}
|
||||
launchData.Add("action", "shutdown")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user