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:
lbenedar
2026-04-09 18:29:41 +03:00
parent 468e027418
commit fb4e371348
28 changed files with 900 additions and 791 deletions

View File

@@ -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")