Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultConfigDir ¶
GetDefaultConfigDir returns the default config directory
func GetUserConfigDir ¶
Types ¶
type Config ¶
type Config struct {
General GeneralConfig `yaml:"General"`
Gist GistConfig `yaml:"Gist"`
GitLab GitLabConfig `yaml:"GitLab"`
Daemon DaemonConfig `yaml:"Daemon"`
}
Config is a struct of config
var Conf Config
Conf is global config variable
type DaemonConfig ¶
type DaemonConfig struct {
Port int `yaml:"port"`
}
type FlagConfig ¶
type FlagConfig struct {
Debug bool
Query string
FilterTag string
Command bool
Copy bool
Delimiter string
OneLine bool
Color bool
Tag bool
Detach bool
HasClipboard bool
}
FlagConfig is a struct of flag
var Flag FlagConfig
Flag is global flag variable
type GeneralConfig ¶
type GeneralConfig struct {
SnippetFile string `yaml:"snippetfile"`
CredFile string `yaml:"credfile"`
AliasFile string `yaml:"aliasfile"`
BackupFile string `yaml:"backupfile"`
ClipboardFile string `yaml:"clipboardfile"`
SvcFile string `yaml:"svcfile"`
SyncFile string `yaml:"syncfile"`
// General purpose app state
StateFile string `yaml:"statefile"`
Editor string `yaml:"editor"`
Column int `yaml:"column"`
Backend string `yaml:"backend"`
SortBy string `yaml:"sortby"`
Cmd []string `yaml:"cmd"`
}
GeneralConfig is a struct of general config
type GistConfig ¶
type GistConfig struct {
FileName string `yaml:"file_name"`
AccessToken string `yaml:"access_token"`
GistID string `yaml:"gist_id"`
Public bool `yaml:"public"`
AutoSync bool `yaml:"auto_sync"`
}
GistConfig is a struct of config for Gist
type GitLabConfig ¶
type GitLabConfig struct {
FileName string `yaml:"file_name"`
AccessToken string `yaml:"access_token"`
Url string `yaml:"url"`
ID string `yaml:"id"`
Visibility string `yaml:"visibility"`
AutoSync bool `yaml:"auto_sync"`
Insecure bool `yaml:"skip_ssl"`
}
GitLabConfig is a struct of config for GitLabSnippet
Click to show internal directories.
Click to hide internal directories.