Documentation ¶
Overview ¶
Package config provides support for Aptomi configuration - Server config, Client config, and their common sections (API config)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Schema string `yaml:",omitempty" validate:"required"` Host string `yaml:",omitempty" validate:"required,hostname|ip"` Port int `yaml:",omitempty" validate:"required,min=1,max=65535"` APIPrefix string `yaml:",omitempty" validate:"required"` }
API represents configs for the API used in both client and server
func (API) ListenAddr ¶
ListenAddr returns address server listens on
type ActualStateUpdater ¶ added in v0.1.15
type ActualStateUpdater struct { Disabled bool `validate:"-"` Interval time.Duration `validate:"-"` Noop bool `validate:"-"` NoopSleep time.Duration `validate:"-"` MaxConcurrentActions int `validate:"-"` }
ActualStateUpdater represents config for actual state updater background process that periodically refreshes actual state (e.g. retrieves endpoints for all components)
type Base ¶
Base is the interface for all configs used in Aptomi (e.g. client config, server config)
type Client ¶
type Client struct { Debug bool `yaml:",omitempty" validate:"-"` Output string `yaml:",omitempty" validate:"required"` API API `yaml:",omitempty" validate:"required"` Auth ClientAuth `yaml:",omitempty" validate:"required"` HTTP HTTP `yaml:",omitempty" validate:"required"` }
Client is the aptomictl config representation
func (*Client) GetLogLevel ¶ added in v0.1.14
GetLogLevel returns log level
type ClientAuth ¶ added in v0.1.8
type ClientAuth struct {
Token string `yaml:",omitempty" validate:"-"`
}
ClientAuth represents client auth configs
type DesiredStateEnforcer ¶ added in v0.1.15
type DesiredStateEnforcer struct { Disabled bool `validate:"-"` Interval time.Duration `validate:"-"` Noop bool `validate:"-"` NoopSleep time.Duration `validate:"-"` MaxConcurrentActions int `validate:"-"` }
DesiredStateEnforcer represents config for desired state enforcer background process that periodically gets latest policy, calculating difference between it and actual state and then applying calculated actions
type K8sRaw ¶ added in v0.1.11
type K8sRaw struct {
DataNamespace string
}
K8sRaw represents config for Kubernetes Raw code plugin
type LDAP ¶
type LDAP struct { Host string `validate:"required,hostname|ip"` Port int `validate:"required,min=1,max=65535"` BaseDN string `validate:"required"` // Filter is LDAP filter query for all users Filter string `validate:"required"` // FilterByName is LDAP filter query when doing user lookup by name FilterByName string `validate:"required"` LabelToAttributes map[string]string `validate:"required"` }
LDAP contains configuration for LDAP sync service (host, port, DN, filter query and mapping of LDAP properties to Aptomi attributes)
func (*LDAP) GetAttributes ¶
GetAttributes returns the list of attributes to be retrieved from LDAP
type Server ¶
type Server struct { Debug bool `validate:"-"` API API `validate:"required"` UI UI `validate:"omitempty"` // if UI is not defined, then UI will not be started DB DB `validate:"required"` Plugins Plugins `validate:"required"` Users UserSources `validate:"required"` SecretsDir string `validate:"omitempty,dir"` // secrets is not a first-class citizen yet, so it's not required Enforcer DesiredStateEnforcer `validate:"required"` Updater ActualStateUpdater `validate:"required"` DomainAdminOverrides map[string]bool `validate:"-"` Auth ServerAuth `validate:"-"` Profile Profile `validate:"-"` }
Server represents configs for the server
func (*Server) GetLogLevel ¶ added in v0.1.14
GetLogLevel returns log level
type ServerAuth ¶ added in v0.1.8
type ServerAuth struct {
Secret string `validate:"-"`
}
ServerAuth represents server auth config
type UserSources ¶
UserSources represents configs for the user loaders that could be file and LDAP loaders
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator is a custom validator for configs