27 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
package config
 | 
						|
 | 
						|
import "github.com/deranjer/gvc/common"
 | 
						|
 | 
						|
//Gvcconfig will be the struct that holds the entire client settings
 | 
						|
type Gvcconfig struct {
 | 
						|
	Version        string           `toml:"version"`
 | 
						|
	LogLevel       int              `toml:"loglevel"` // Panic: 5, Fatal: 4, Error: 3, Warn: 2, Info: 1, debug: 0, trace: -1
 | 
						|
	RootPath       string           `toml:"rootpath"`
 | 
						|
	RepoName       string           `toml:"reponame"`
 | 
						|
	Remotes        []Remote         `toml:"remote"` //The remote servers for the repo
 | 
						|
	CurrentBranch  string           `toml:"currentbranch"`
 | 
						|
	LocalBranches  []string         `toml:"localbranches"`  // LocalBranches constains a string list of branches on the local client.  Names must be unique. \\TODO: someday add folders like git for branches
 | 
						|
	RemoteBranches []string         `toml:"remotebranches"` // RemoteBranches constains a string list of branches on the server.  Names must be unique. \\TODO: someday add folders like git for branches
 | 
						|
	Locked         common.FileTypes `toml:"locked"`
 | 
						|
	Ignores        common.FileTypes `toml:"ignore"`     //These files will be ignored for all add functions
 | 
						|
	NoCompress     common.FileTypes `toml:"nocompress"` //For binary compression some files should be ignored because the performance hit isn't worth the size savings
 | 
						|
}
 | 
						|
 | 
						|
//Remote will be a slice of remote server information
 | 
						|
type Remote struct {
 | 
						|
	Name    string `toml:"name"`
 | 
						|
	Host    string `toml:"host"`
 | 
						|
	Port    int    `toml:"port"`
 | 
						|
	Default bool   `toml:"default"` //Is this repo the default repo?
 | 
						|
}
 |