Documentation ¶
Index ¶
- Constants
- type AWSConfig
- func (c *AWSConfig) FetchFile(key string, ifNotTag string) (io.ReadCloser, string, error)
- func (c *AWSConfig) FetchGroup(name string) ([]string, error)
- func (c *AWSConfig) FetchGroupsForUser(user string) ([]string, error)
- func (c *AWSConfig) FetchKey(user, alias string) ([]byte, error)
- func (c *AWSConfig) FetchKeys(user string) ([]string, error)
- func (c *AWSConfig) FetchNetworkInfo() (*NetworkInfo, error)
- func (c *AWSConfig) PutFile(key string, data []byte) error
- func (c *AWSConfig) RegisterDNS(zone, name string, weighted bool) error
- func (c *AWSConfig) UnregisterDNS() error
- type ConfigFile
- type ConfigFlag
- type ConfigStatement
- type ConfigurationBackend
- type LocalConfig
- func (c *LocalConfig) FetchFile(path string, ifNotTag string) (io.ReadCloser, string, error)
- func (c *LocalConfig) FetchGroup(name string) ([]string, error)
- func (c *LocalConfig) FetchGroupsForUser(user string) ([]string, error)
- func (c *LocalConfig) FetchKey(user string, key string) ([]byte, error)
- func (c *LocalConfig) FetchKeys(user string) ([]string, error)
- func (c *LocalConfig) FetchNetworkInfo() (*NetworkInfo, error)
- func (c *LocalConfig) PutFile(path string, data []byte) error
- func (c *LocalConfig) RegisterDNS(zone, name string, weighted bool) error
- func (c *LocalConfig) UnregisterDNS() error
- type NetworkInfo
- type Parser
- type Route
- type SectionConfig
- type SectionType
- type Subnet
- type UserConfig
- type UserRoute
Constants ¶
View Source
const ( GLOBAL = iota GROUP = iota USER = iota )
View Source
const ( NOT_SET = 0 OFF = 1 ON = 2 ALL = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type AWSConfig struct {
// contains filtered or unexported fields
}
func NewAWSConfig ¶
func (*AWSConfig) FetchGroupsForUser ¶
func (*AWSConfig) FetchNetworkInfo ¶
func (c *AWSConfig) FetchNetworkInfo() (*NetworkInfo, error)
func (*AWSConfig) RegisterDNS ¶
func (*AWSConfig) UnregisterDNS ¶
type ConfigFile ¶
type ConfigFile struct { WatchTime *time.Duration Network *net.IPNet Route53Zone string DomainName string Route53Weighted bool KeyStrength int GlobalConfig *SectionConfig Groups map[string]*SectionConfig Users map[string]*SectionConfig }
func ParseConfig ¶
func ParseConfig(reader io.Reader) (*ConfigFile, error)
func (*ConfigFile) GetUserConfig ¶
func (config *ConfigFile) GetUserConfig(user string, groups []string, netinfo *NetworkInfo) (*UserConfig, error)
func (*ConfigFile) String ¶
func (config *ConfigFile) String() string
type ConfigFlag ¶
type ConfigFlag byte
func (ConfigFlag) String ¶
func (flag ConfigFlag) String() string
type ConfigStatement ¶
type ConfigurationBackend ¶
type ConfigurationBackend interface { FetchFile(path string, ifNotTag string) (reader io.ReadCloser, tag string, err error) PutFile(path string, data []byte) error FetchNetworkInfo() (*NetworkInfo, error) FetchGroup(name string) ([]string, error) FetchGroupsForUser(user string) ([]string, error) FetchKeys(user string) ([]string, error) FetchKey(user, key string) ([]byte, error) RegisterDNS(zone, name string, weighted bool) error UnregisterDNS() error }
type LocalConfig ¶
type LocalConfig struct {
Root string
}
func (*LocalConfig) FetchFile ¶
func (c *LocalConfig) FetchFile(path string, ifNotTag string) (io.ReadCloser, string, error)
func (*LocalConfig) FetchGroup ¶
func (c *LocalConfig) FetchGroup(name string) ([]string, error)
func (*LocalConfig) FetchGroupsForUser ¶
func (c *LocalConfig) FetchGroupsForUser(user string) ([]string, error)
func (*LocalConfig) FetchKey ¶
func (c *LocalConfig) FetchKey(user string, key string) ([]byte, error)
func (*LocalConfig) FetchNetworkInfo ¶
func (c *LocalConfig) FetchNetworkInfo() (*NetworkInfo, error)
func (*LocalConfig) RegisterDNS ¶
func (c *LocalConfig) RegisterDNS(zone, name string, weighted bool) error
func (*LocalConfig) UnregisterDNS ¶
func (c *LocalConfig) UnregisterDNS() error
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Read ¶
func (p *Parser) Read() (*ConfigStatement, error)
type SectionConfig ¶
type SectionConfig struct { Type SectionType Name string Order int Subnets []Subnet Routes []Route NATRoutes []Route NATSetting ConfigFlag DNSSetting ConfigFlag }
func (*SectionConfig) String ¶
func (section *SectionConfig) String() string
type SectionType ¶
type SectionType byte
type UserConfig ¶
type UserConfig struct { DNSSetting ConfigFlag Routes []UserRoute }
Click to show internal directories.
Click to hide internal directories.