Documentation ¶
Index ¶
- Constants
- func ConfigurationExists() bool
- func GetListOfSupportedFormats(quote bool) (formats []string)
- func Import(format string)
- type Configuration
- func (conf Configuration) Authenticate(targetURL *string)
- func (conf Configuration) Copy() *Configuration
- func (conf Configuration) Display(format string, export bool)
- func (conf *Configuration) GetProgressbarDescriptionForVerb(verb string, repo Repository) string
- func (conf Configuration) GetToken() string
- func (conf Configuration) Remove(purge bool)
- func (conf Configuration) Save()
- type Repositories
- type Repository
Constants ¶
View Source
const ( ConfigInvalidFormat = "Invalid format %q. Supported formats are: [%s]." ConfigNotFound = "No configuration found. Make sure to run 'init' to create initial configuration " + "or run 'import' to import configuration from stdin." ConfigShouldNotExist = "Configuration already exists. " + "Please run 'update' if you want to update your settings. " + "Alternatively, run 'remove' if you want to setup from scratch once again." )
Variables ¶
This section is empty.
Functions ¶
func ConfigurationExists ¶ added in v1.0.5
func ConfigurationExists() bool
func GetListOfSupportedFormats ¶ added in v1.2.0
Types ¶
type Configuration ¶
type Configuration struct { XMLName xml.Name `json:"-" yaml:"-"` Username string `json:"username" yaml:"username"` Fullname string `json:"fullname" yaml:"fullname"` Email string `json:"email,omitempty" yaml:"email,omitempty"` BaseDirectory string `json:"baseDirectory" yaml:"baseDirectory"` BaseURL string `json:"baseURL" yaml:"baseURL"` Concurrency uint `json:"concurrency" yaml:"concurrency"` SubDirectories bool `json:"subDirectories" yaml:"subDirectories"` Verbose bool `json:"verbose" yaml:"verbose"` Timeout time.Duration `json:"timeout" yaml:"timeout"` Excluded []string `json:"exluded,omitempty" yaml:"exluded,omitempty"` Included []string `json:"included,omitempty" yaml:"included,omitempty"` Repositories Repositories `json:"repositories" yaml:"repositories"` }
Configuration holds gr configuration data
func Load ¶
func Load() *Configuration
func (Configuration) Authenticate ¶
func (conf Configuration) Authenticate(targetURL *string)
func (Configuration) Copy ¶ added in v1.0.11
func (conf Configuration) Copy() *Configuration
func (Configuration) Display ¶ added in v1.0.5
func (conf Configuration) Display(format string, export bool)
func (*Configuration) GetProgressbarDescriptionForVerb ¶ added in v1.1.3
func (conf *Configuration) GetProgressbarDescriptionForVerb(verb string, repo Repository) string
func (Configuration) GetToken ¶
func (conf Configuration) GetToken() string
func (Configuration) Remove ¶
func (conf Configuration) Remove(purge bool)
func (Configuration) Save ¶
func (conf Configuration) Save()
type Repositories ¶ added in v1.0.11
type Repositories []Repository
func (*Repositories) Append ¶ added in v1.1.0
func (r *Repositories) Append(repo Repository)
func (Repositories) Has ¶ added in v1.1.0
func (r Repositories) Has(repo Repository) bool
func (Repositories) LongestName ¶ added in v1.1.3
func (r Repositories) LongestName() string
type Repository ¶
type Repository struct { URL string `json:"url" yaml:"url"` Directory string `json:"directory" yaml:"directory"` Branch string `json:"branch" yaml:"branch"` ParentURL string `json:"parentUrl,omitempty" yaml:"parentUrl,omitempty"` }
Repository holds a repository URL and its local directory equivalent.
Click to show internal directories.
Click to hide internal directories.