Remove all legacy config
This commit is contained in:
@ -9,10 +9,6 @@ import (
|
||||
type Config struct {
|
||||
// Named keys above maintained for backwards compatibility
|
||||
// Ideally only Gitlabs is used
|
||||
GitlabHost string `yaml:"gitlabHost,omitempty" json:"gitlabHost,omitempty"`
|
||||
GitlabToken string `yaml:"gitlabToken,omitempty" json:"gitlabToken,omitempty"`
|
||||
Gitlabs []GitlabConfig `yaml:"gitlabs" json:"gitlabs"`
|
||||
Giteas []GiteaConfig `yaml:"giteas" json:"giteas"`
|
||||
Remotes []info.RemoteInfo
|
||||
LogLevel string `yaml:"logLevel" json:"logLevel" enum:"info,warn,debug,error"`
|
||||
ProjectPath string `yaml:"projectPath" json:"projectPath"`
|
||||
@ -23,20 +19,6 @@ type Config struct {
|
||||
Editor editorConfig `yaml:"editor" json:"editor"`
|
||||
}
|
||||
|
||||
type GiteaConfig struct {
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
Token string `yaml:"token" json:"token"`
|
||||
CloneProto info.CloneProto `yaml:"cloneProto" json:"cloneProto"`
|
||||
}
|
||||
|
||||
type GitlabConfig struct {
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
Token string `yaml:"token" json:"token"`
|
||||
CloneProto info.CloneProto `yaml:"cloneProto" json:"cloneProto"`
|
||||
}
|
||||
|
||||
type editorConfig struct {
|
||||
DisplayName string `yaml:"displanName,omitempty" json:"displanName,omitempty"`
|
||||
Binary string `yaml:"binary,omitempty" json:"binary,omitempty"`
|
||||
@ -63,11 +45,12 @@ type cacheConfig struct {
|
||||
var DefaultConfig = Config{
|
||||
LogLevel: "warn",
|
||||
ProjectPath: "~/work/projects",
|
||||
Gitlabs: []GitlabConfig{{
|
||||
Remotes: []info.RemoteInfo{{
|
||||
Host: "https://gitlab.com",
|
||||
Token: "yourtokenhere",
|
||||
CloneProto: info.CloneProtoSSH,
|
||||
Name: "GitLab",
|
||||
Type: "gitlab",
|
||||
}},
|
||||
Cache: cacheConfig{
|
||||
Ttl: 168 * time.Hour,
|
||||
|
Reference in New Issue
Block a user