Documentation ¶
Index ¶
- Variables
- type Config
- type ConfigManager
- func (c *ConfigManager) GetToken(ui ui.Ui, domain string) (string, error)
- func (c *ConfigManager) GetTokenOnly(domain string) string
- func (c *ConfigManager) GetTopDomain() string
- func (c *ConfigManager) Init() error
- func (c *ConfigManager) Load() (conf *Config, err error)
- func (c *ConfigManager) Save() error
- func (c *ConfigManager) SavePreferredDomain(domain string) error
- func (c *ConfigManager) SaveToken(domain, token string) error
- func (c *ConfigManager) TopPriorityDomain(domains []string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDataTest = `` /* 138-byte string literal not displayed */
View Source
var PreferredDomainTest = []string{
"gitlab.ssl.domain1.jp",
"gitlab.ssl.domain2.jp",
}
View Source
var TokensTest = yaml.MapSlice{
yaml.MapItem{
Key: "gitlab.ssl.domain1.jp",
Value: "token1",
},
yaml.MapItem{
Key: "gitlab.ssl.domain2.jp",
Value: "token2",
},
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Tokens yaml.MapSlice PreferredDomains []string }
func NewConfigWithFile ¶
func (*Config) AddRepository ¶
type ConfigManager ¶
func NewConfigManager ¶
func NewConfigManager() *ConfigManager
func NewConfigManagerPath ¶
func NewConfigManagerPath(path string) *ConfigManager
func (*ConfigManager) GetTokenOnly ¶
func (c *ConfigManager) GetTokenOnly(domain string) string
func (*ConfigManager) GetTopDomain ¶
func (c *ConfigManager) GetTopDomain() string
func (*ConfigManager) Init ¶
func (c *ConfigManager) Init() error
func (*ConfigManager) Load ¶
func (c *ConfigManager) Load() (conf *Config, err error)
func (*ConfigManager) Save ¶
func (c *ConfigManager) Save() error
func (*ConfigManager) SavePreferredDomain ¶
func (c *ConfigManager) SavePreferredDomain(domain string) error
func (*ConfigManager) SaveToken ¶
func (c *ConfigManager) SaveToken(domain, token string) error
func (*ConfigManager) TopPriorityDomain ¶
func (c *ConfigManager) TopPriorityDomain(domains []string) string
Click to show internal directories.
Click to hide internal directories.