config

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL