more server work on structs and config
This commit is contained in:
		@@ -1,13 +1,19 @@
 | 
			
		||||
package config
 | 
			
		||||
 | 
			
		||||
// GvcServerConfig will hold the base server settings
 | 
			
		||||
type GvcServerConfig struct {
 | 
			
		||||
	Version string       `toml:"version"` // The server version
 | 
			
		||||
	Repos   []RepoConfig `toml:"repos"`   // A struct of all the repos and their settings for the serve
 | 
			
		||||
	Version      string       `toml:"version"`      // The server version
 | 
			
		||||
	Port         int          `toml:"port"`         // The port that the server will listed on
 | 
			
		||||
	BindIP       string       `toml:"ip"`           // What IP to bind the server to.  If empty will bind to all interfaces
 | 
			
		||||
	RawPort      int          `toml:"rawport"`      // The optional TCP port that the server will send raw files over
 | 
			
		||||
	RepoRootPath string       `toml:"reporootpath"` // This will be the root path where (by default) all new repos will be stored at
 | 
			
		||||
	Repos        []RepoConfig `toml:"repos"`        // A struct of all the repos and their settings for the serve
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//GvcServerConfig will be the struct that holds the entire server settings
 | 
			
		||||
// RepoConfig will be the struct that holds the config for a single repo
 | 
			
		||||
type RepoConfig struct {
 | 
			
		||||
	KnownClients   []Clients `toml:"clients"` //The remote servers for the repo
 | 
			
		||||
	KnownClients   []Clients `toml:"clients"`  //The remote servers for the repo
 | 
			
		||||
	RootPath       string    `toml:"rootpath"` // The absolute path to the root of this particular repo
 | 
			
		||||
	DefaultBranch  string    `toml:"defaultbranch"`
 | 
			
		||||
	LocalBranches  []string  `toml:"localbranches"` // LocalBranches constains a string list of branches on the server.  Names must be unique. \\TODO: someday add folders like git for branches
 | 
			
		||||
	Locked         FileTypes `toml:"locked"`
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user