config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig()

func PrintConfig

func PrintConfig(configData *Config)

Types

type AuthConfig

type AuthConfig struct {
	OIDC AuthOIDC
	JWT  AuthJWT
}

type AuthJWT

type AuthJWT struct {
	Enabled                bool
	TokenHeader            string
	UsernameClaim          string
	GroupsClaim            string
	ProviderUsernamesClaim string
	HeaderPrefix           string
	JWKSURL                string
	Issuer                 string
}

type AuthOIDC

type AuthOIDC struct {
	Enabled   bool
	IssuerURL string
	ClientID  string
}

type Config

type Config struct {
	Swagger       SwaggerConfig
	Auth          AuthConfig
	Tracing       TracingConfig
	Events        EventsConfig
	Log           LogConfig
	Db            DbConfig
	Creds         map[string]models.Credential `json:"-"`
	Roles         []models.AccessRole
	ApprovalRules []models.ApprovalRule
	SharedSecret  string `json:"-"`
}

func GetConfig

func GetConfig() *Config

func (*Config) GetCredentials

func (c *Config) GetCredentials(provider string) models.Credential

type DbConfig

type DbConfig struct {
	Engine string
	Psql   PsqlConfig
	Mysql  MysqlConfig
	Sqlite SqliteConfig
}

type EventsConfig

type EventsConfig struct {
	Kafka    EventsKafkaConfig
	Console  EventsConsoleConfig
	Database EventsDatabaseConfig
	Data     EventsData
}

type EventsConsoleConfig

type EventsConsoleConfig struct {
	Enabled bool
}

type EventsData

type EventsData struct {
	Tenant     string
	TypePrefix string
}

type EventsDatabaseConfig added in v0.3.0

type EventsDatabaseConfig struct {
	Enabled bool
}

type EventsKafkaConfig

type EventsKafkaConfig struct {
	Enabled           bool
	Hostname          string
	Topic             string
	NumPartitions     int
	ReplicationFactor int
}

type LogConfig

type LogConfig struct {
	Level  string
	Pretty bool
	Caller bool
}

type MysqlConfig

type MysqlConfig struct {
	Host     string
	Port     string
	Username string
	Password string
	Database string
}

type PsqlConfig

type PsqlConfig struct {
	Host     string
	Port     string
	Username string
	Password string
	Database string
	Schema   string
	SSLMode  string
}

type SqliteConfig

type SqliteConfig struct {
	Filename string
}

type SwaggerConfig

type SwaggerConfig struct {
	Host string
}

type TracingConfig

type TracingConfig struct {
	Enabled         bool
	URL             string
	ConnectionType  string
	ServiceName     string
	EnvironmentName string
}

Jump to

Keyboard shortcuts

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