Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalFileConfig ¶
type LocalFileConfig struct {
// contains filtered or unexported fields
}
LocalFileConfig implement the WeChatConfigurator by local file system
func (*LocalFileConfig) GetConfig ¶
func (l *LocalFileConfig) GetConfig() *WeChatConfig
GetConfig just return exists config object
func (*LocalFileConfig) LoadConfig ¶
func (l *LocalFileConfig) LoadConfig(configFile string) ( cfg *WeChatConfig, err error)
LoadConfig load config from the file
func (*LocalFileConfig) SaveConfig ¶
func (l *LocalFileConfig) SaveConfig() (err error)
SaveConfig save the config into local file
type WeChatConfig ¶
type WeChatConfig struct { GitURL string `yaml:"git_url"` GitBranch string `yaml:"git_branch"` GitHubWebHookSecret string `yaml:"github_webhook_secret"` ServerPort int `yaml:"server_port"` AppID string `yaml:"appID"` AppSecret string `yaml:"appSecret"` Token string `yaml:"token"` Valid bool `yaml:"valid"` }
WeChatConfig represents WeChat config
type WeChatConfigurator ¶
type WeChatConfigurator interface { LoadConfig(string) (*WeChatConfig, error) GetConfig() *WeChatConfig SaveConfig() error }
WeChatConfigurator represent the spec for configuration reader
Click to show internal directories.
Click to hide internal directories.