Completely re-work the server configuration to be separated out better

This commit is contained in:
Dane Everitt
2020-07-19 16:27:55 -07:00
parent a00288aa64
commit 0cbaad5c72
16 changed files with 495 additions and 409 deletions

17
server/allocations.go Normal file
View File

@@ -0,0 +1,17 @@
package server
// Defines the allocations available for a given server. When using the Docker environment
// driver these correspond to mappings for the container that allow external connections.
type Allocations struct {
// Defines the default allocation that should be used for this server. This is
// what will be used for {SERVER_IP} and {SERVER_PORT} when modifying configuration
// files or the startup arguments for a server.
DefaultMapping struct {
Ip string `json:"ip"`
Port int `json:"port"`
} `json:"default"`
// Mappings contains all of the ports that should be assigned to a given server
// attached to the IP they correspond to.
Mappings map[string][]int `json:"mappings"`
}