Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶
type CORSConfig struct {
AllowedOrigins []string `yaml:"allowed_origins" mapstructure:"allowed_origins" default:"[*]"`
}
type Config ¶
type Config struct {
LogLevel string `yaml:"log_level" mapstructure:"log_level" default:"info"`
Telemetry telemetry.Config `mapstructure:"telemetry"`
Elasticsearch esStore.Config `mapstructure:"elasticsearch"`
DB postgres.Config `mapstructure:"db"`
Service ServerConfig `mapstructure:"service"`
Client client.Config `mapstructure:"client"`
}
Config is the root configuration for the compass application.
type IdentityConfig ¶
type IdentityConfig struct {
HeaderKeyUserUUID string `yaml:"headerkey_uuid" mapstructure:"headerkey_uuid" default:"Compass-User-UUID"`
HeaderValueUserUUID string `yaml:"headervalue_uuid" mapstructure:"headervalue_uuid" default:"raystack@email.com"`
HeaderKeyUserEmail string `yaml:"headerkey_email" mapstructure:"headerkey_email" default:"Compass-User-Email"`
ProviderDefaultName string `yaml:"provider_default_name" mapstructure:"provider_default_name" default:""`
NamespaceClaimKey string `yaml:"namespace_claim_key" mapstructure:"namespace_claim_key" default:"namespace_id"`
}
type ServerConfig ¶
type ServerConfig struct {
Host string `mapstructure:"host" default:"0.0.0.0"`
Port int `mapstructure:"port" default:"8080"`
BaseUrl string `mapstructure:"baseurl" default:"localhost:8080"`
// User Identity
Identity IdentityConfig `mapstructure:"identity"`
// CORS
CORS CORSConfig `mapstructure:"cors"`
// Message size limits (for compatibility)
MaxRecvMsgSize int `yaml:"max_recv_msg_size" mapstructure:"max_recv_msg_size" default:"33554432"`
MaxSendMsgSize int `yaml:"max_send_msg_size" mapstructure:"max_send_msg_size" default:"33554432"`
}
ServerConfig holds HTTP server configuration.
func (ServerConfig) Addr ¶
func (cfg ServerConfig) Addr() string
Click to show internal directories.
Click to hide internal directories.