Documentation
¶
Index ¶
- Constants
- Variables
- func FileExists(path string) (bool, error)
- func GetConfig(configFilePath string) *currentConfig
- func NewLoggerConfig(configPath Path, overrides Overrider) (*logger.Config, error)
- func PortFromAddress(address string) (string, error)
- func SetEnvVars(fileContents string) (string, error)
- type APIKey
- type AuthnConfig
- type CallOptions
- type CommandMode
- type Common
- type Config
- type Generator
- func (g *Generator) CreateCertsDir() (string, error)
- func (g *Generator) CreateConfigDir() (string, error)
- func (g *Generator) CreateDataDir() (string, error)
- func (g *Generator) GenerateConfig(w io.Writer, templateData string) error
- func (g *Generator) WithConfigName(configName string) *Generator
- func (g *Generator) WithEdgeDirectory(enabled bool) *Generator
- func (g *Generator) WithEnableDirectoryV2(enabled bool) *Generator
- func (g *Generator) WithLocalPolicy(local bool) *Generator
- func (g *Generator) WithPolicyName(policyName string) *Generator
- func (g *Generator) WithResource(resource string) *Generator
- func (g *Generator) WithVersion(version int) *Generator
- type Loader
- type LoggerConfig
- type OptionOverrides
- type Options
- type Overrider
- type Path
- type ServicesConfig
Constants ¶
View Source
const ConfigFileVersion = 2
View Source
const LocalImageTemplate string = templatePreamble + opaLocalPolicyImage + topazFileDecisionLoggerPlugin + asertoEdgePlugin
View Source
const RemoteImageTemplate string = templatePreamble + opaRemotePolicyImage + topazFileDecisionLoggerPlugin + asertoEdgePlugin
Variables ¶
View Source
var CertificateSets = []string{"grpc", "gateway"}
Functions ¶
func FileExists ¶
func NewLoggerConfig ¶
NewLoggerConfig creates a new LoggerConfig.
func PortFromAddress ¶
func SetEnvVars ¶
Types ¶
type AuthnConfig ¶
type AuthnConfig struct {
APIKeys map[string]string `json:"api_keys"`
Options CallOptions `json:"options"`
Keys []string `json:"keys"`
}
type CallOptions ¶
type CallOptions struct {
Default Options `json:"default"`
Overrides []OptionOverrides `json:"overrides"`
}
func (*CallOptions) ForPath ¶
func (co *CallOptions) ForPath(path string) *Options
type CommandMode ¶
type CommandMode int
CommandMode -- enum type.
const ( CommandModeUnknown CommandMode = 0 + iota CommandModeRun CommandModeBuild )
CommandMode -- enum constants.
type Common ¶
type Common struct {
Version int `json:"version"`
Logging logger.Config `json:"logging"`
DebugService debug.Config `json:"debug_service"`
Command struct {
Mode CommandMode
} `json:"-"`
APIConfig ServicesConfig `json:"api"`
JWT struct {
// Specifies the duration in which exp (Expiry) and nbf (Not Before)
// claims may differ by. This value should be positive.
AcceptableTimeSkewSeconds int `json:"acceptable_time_skew_seconds"`
} `json:"jwt"`
// Directory configuration
Edge directory.Config `json:"directory"`
// Authorizer directory resolver configuration
DirectoryResolver client.Config `json:"remote_directory"`
// Default OPA configuration
OPA runtime.Config `json:"opa"`
}
Common holds the shared configuration elements.
type Config ¶
type Config struct {
Common `json:"common,squash"` //nolint:staticcheck // squash is used by mapstructure
Auth AuthnConfig `json:"auth"`
}
type Generator ¶
type Generator struct {
ConfigName string
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) CreateCertsDir ¶
func (*Generator) CreateConfigDir ¶
func (*Generator) CreateDataDir ¶
func (*Generator) GenerateConfig ¶
func (*Generator) WithConfigName ¶ added in v0.33.15
func (*Generator) WithEdgeDirectory ¶
func (*Generator) WithEnableDirectoryV2 ¶
func (*Generator) WithLocalPolicy ¶
func (*Generator) WithPolicyName ¶
func (*Generator) WithResource ¶
func (*Generator) WithVersion ¶
type Loader ¶
func LoadConfiguration ¶
type LoggerConfig ¶
type LoggerConfig Config
LoggerConfig is a basic Config copy that gets loaded before everything else, so we can log during resolving configuration.
type OptionOverrides ¶
type ServicesConfig ¶
type ServicesConfig struct {
Health struct {
ListenAddress string `json:"listen_address"`
Certificates client.TLSConfig `json:"certs"`
} `json:"health"`
Metrics struct {
ListenAddress string `json:"listen_address"`
Certificates client.TLSConfig `json:"certs"`
ZPages bool `json:"zpages"`
} `json:"metrics"`
Services map[string]*builder.API `json:"services"`
}
Click to show internal directories.
Click to hide internal directories.