Documentation ¶
Index ¶
- Constants
- Variables
- func LoadAgentConfig(agentConfig *AgentConfiguration, filePath string) error
- func LoadAthenzConfig(athenzConfig *AthenzConfiguration, filePath string) error
- func LoadGlobalAgentConfig(filePath string) error
- func LoadGlobalAthenzConfig(filePath string) error
- func LoadGlobalZpeConfig(filePath string) error
- func LoadGlobalZpuConfig(athenzConfPath, zpuConfPath string) error
- func LoadZpeConfig(zpeConfig *ZpeConfiguration, filePath string) error
- func LoadZpuConfig(zpuConfig *ZpuConfiguration, athenzConfPath, zpuConfPath string) error
- type AgentConfiguration
- type AthenzConfiguration
- type Loader
- type MtlsProperties
- type Properties
- type PublicKeys
- type ServerProperties
- type ZpeConfiguration
- type ZpuConfiguration
Constants ¶
const ( // EnvKeyZpeConfigPath the environment variable key for ZPE config path EnvKeyZpeConfigPath = "ZPE_CONFIG_PATH" // EnvKeyAthenzConfigPath the environment variable key for Athenz server config path EnvKeyAthenzConfigPath = "ATHENZ_CONFIG_PATH" // EnvKeyZpuConfigPath the environment variable key for ZPU config path EnvKeyZpuConfigPath = "ZPU_CONFIG_PATH" // EnvKeyAgentConfigPath the environment variable key for agent config path EnvKeyAgentConfigPath = "AGENT_CONFIG_PATH" // DefaultZpeConfigPath the default value ZPE config DefaultZpeConfigPath = "config/zpe.conf" // DefaultAthenzConfigPath the default value for Athenz config DefaultAthenzConfigPath = "config/athenz.conf" // DefaultZpuConfigPath the default value for ZPU config DefaultZpuConfigPath = "config/zpu.conf" // DefaultAgentConfigPath the default value for agent config DefaultAgentConfigPath = "config/agent.json" )
const ( LogFile = "agent.out" LogDir = "logs" )
Variables ¶
var ( KeyStore = newAthenzConfiguration() ZpeConfig = newZpeConfiguration() )
var (
AgentConfig = newAgentConfiguration()
)
var (
ZpuConfig = new(ZpuConfiguration)
)
Functions ¶
func LoadAgentConfig ¶
func LoadAgentConfig(agentConfig *AgentConfiguration, filePath string) error
LoadAgentConfig reads config file from a specific address and loads it into a AgentConfiguration object
func LoadAthenzConfig ¶
func LoadAthenzConfig(athenzConfig *AthenzConfiguration, filePath string) error
LoadAthenzConfig reads config file from a specific address and loads it into a AthenzConfiguration object.
func LoadGlobalAgentConfig ¶
LoadGlobalAgentConfig loads config file from input path into the global variable AgentConfig.
func LoadGlobalAthenzConfig ¶
LoadGlobalAthenzConfig loads config file from input path into the global variable KeyStore.
func LoadGlobalZpeConfig ¶
LoadGlobalZpeConfig loads config file from input path into the global variable ZpeConfig.
func LoadGlobalZpuConfig ¶
LoadGlobalZpuConfig loads config file from input path into the global variable ZpuConfig.
func LoadZpeConfig ¶
func LoadZpeConfig(zpeConfig *ZpeConfiguration, filePath string) error
LoadZpeConfig reads config file from a specific address and loads it into a ZpeConfiguration object
func LoadZpuConfig ¶
func LoadZpuConfig(zpuConfig *ZpuConfiguration, athenzConfPath, zpuConfPath string) error
LoadZpuConfig reads config file from a specific address and loads it into a ZpuConfiguration object.
Types ¶
type AgentConfiguration ¶
type AgentConfiguration struct { Properties *agentProperties // contains filtered or unexported fields }
type AthenzConfiguration ¶
type AthenzConfiguration struct { Properties *athenzProperties // contains filtered or unexported fields }
func (AthenzConfiguration) GetZmsPublicKey ¶
func (config AthenzConfiguration) GetZmsPublicKey(id string) string
func (AthenzConfiguration) GetZtsPublicKey ¶
func (config AthenzConfiguration) GetZtsPublicKey(id string) string
type Loader ¶
type Loader interface { // LoadConfig loads config file from filePath ro config object LoadConfig(config interface{}, filePath string) error // WithDefaultConfig performs default configuration to config loader WithDefaultConfig() }
Loader is the interface that wraps the basic config loader.
func NewConfigLoader ¶
func NewConfigLoader() Loader
NewConfigLoader creates new instance of Leader type
type MtlsProperties ¶
type MtlsProperties struct { CaPath string `mapstructure:"ca_path"` CrtPath string `mapstructure:"crt_path"` PrivateKeyPath string `mapstructure:"key_path"` }
func (MtlsProperties) IsEmpty ¶
func (p MtlsProperties) IsEmpty() bool
IsEmpty checks if MtlsProperties has value or not. If not returns true else returns false.
type Properties ¶
type PublicKeys ¶
type ServerProperties ¶
type ServerProperties struct { Name string Port string MtlsProperties }
type ZpeConfiguration ¶
type ZpeConfiguration struct { Properties *zpeProperties // contains filtered or unexported fields }
type ZpuConfiguration ¶
type ZpuConfiguration struct {
// Yahoo zpu configuration
Properties *zpu.ZpuConfiguration
}