Documentation ¶
Index ¶
- type Client
- func (c *Client) ConfigDir() string
- func (c *Client) ConfigFileExists(configFileName string) bool
- func (c *Client) ConfigFilePath(configFileName string) string
- func (c *Client) Load(configFileName string, v interface{}, allowEmpty bool) error
- func (c *Client) LoadAndStore(configFileName string, v interface{}, allowEmpty bool) error
- func (c *Client) SetPassword(password, salt string)
- func (c *Client) Store(configFileName string, v interface{}) error
- type MgrCenter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ConfigFileExists ¶
ConfigFileExists returns true if config file exists. configFileName is config file short name with suffix, for example `myapp.json`.
func (*Client) ConfigFilePath ¶
ConfigFilePath returns config file full path.
func (*Client) Load ¶
Load loads config and Unmarshal it into `v`. configFileName is config file short name with suffix, for example `myapp.json`.
func (*Client) LoadAndStore ¶
LoadAndStore loads config from config file first, then encrypt and store config to disk. configFileName is config file short name with suffix, for example `myapp.json`.
func (*Client) SetPassword ¶
SetPassword sets password for config.
Click to show internal directories.
Click to hide internal directories.