config

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousAuthConfig added in v0.2.0

type AnonymousAuthConfig struct {
	Enabled bool   `mapstructure:"enabled"`
	Role    string `mapstructure:"role"`
}

type BannerConfig added in v0.4.0

type BannerConfig struct {
	Enabled     bool   `mapstructure:"enabled"`
	Dismissible bool   `mapstructure:"dismissible"`
	Variant     string `mapstructure:"variant"`
	Message     string `mapstructure:"message"`
	ID          string `mapstructure:"id"`
}

type Config

type Config struct {
	Server struct {
		Port                  int               `mapstructure:"port"`
		Host                  string            `mapstructure:"host"`
		RootURL               string            `mapstructure:"root_url"`
		CustomResponseHeaders map[string]string `mapstructure:"customer_response_headers"`
		EncryptionKey         string            `mapstructure:"encryption_key"`
		AllowUnencrypted      bool              `mapstructure:"allow_unencrypted"`
	} `mapstructure:"server"`

	Metrics struct {
		Enabled             bool     `mapstructure:"enabled"`
		Port                int      `mapstructure:"port"`
		OwnerMetadataFields []string `mapstructure:"owner_metadata_fields"`
		Schemas             struct {
			ExcludedAssetTypes []string `mapstructure:"excluded_asset_types"`
			ExcludedProviders  []string `mapstructure:"excluded_providers"`
		} `mapstructure:"schemas"`
	} `mapstructure:"metrics"`

	Database struct {
		Host         string `mapstructure:"host"`
		Port         int    `mapstructure:"port"`
		User         string `mapstructure:"user"`
		Password     string `mapstructure:"password"`
		Name         string `mapstructure:"name"`
		SSLMode      string `mapstructure:"sslmode"`
		MaxConns     int    `mapstructure:"max_conns"`
		IdleConns    int    `mapstructure:"idle_conns"`
		ConnLifetime int    `mapstructure:"conn_lifetime"`
	} `mapstructure:"database"`

	Logging struct {
		Level  string `mapstructure:"level"`
		Format string `mapstructure:"format"`
	} `mapstructure:"logging"`

	Auth struct {
		Google    *OAuthProviderConfig `mapstructure:"google"`
		GitHub    *OAuthProviderConfig `mapstructure:"github"`
		GitLab    *OAuthProviderConfig `mapstructure:"gitlab"`
		Okta      *OAuthProviderConfig `mapstructure:"okta"`
		Slack     *OAuthProviderConfig `mapstructure:"slack"`
		Auth0     *OAuthProviderConfig `mapstructure:"auth0"`
		Anonymous AnonymousAuthConfig  `mapstructure:"anonymous"`
	} `mapstructure:"auth"`

	OpenLineage struct {
		Auth struct {
			Enabled bool `mapstructure:"enabled"`
		} `mapstructure:"auth"`
	} `mapstructure:"openlineage"`

	RateLimit RateLimitConfig `mapstructure:"rate_limit"`

	UI struct {
		Banner BannerConfig `mapstructure:"banner"`
	} `mapstructure:"ui"`

	Pipelines struct {
		MaxWorkers        int `mapstructure:"max_workers"`
		SchedulerInterval int `mapstructure:"scheduler_interval"`
		LeaseExpiry       int `mapstructure:"lease_expiry"`
		ClaimExpiry       int `mapstructure:"claim_expiry"`
	} `mapstructure:"pipelines"`
}

Config holds all configuration for the application

func Get

func Get() *Config

Get returns the current config, panics if config is not loaded

func Load

func Load(configPath string) (*Config, error)

Load initializes and loads the config

func (*Config) BuildDSN

func (c *Config) BuildDSN() string

BuildDSN builds a PostgreSQL connection string from config

type GroupMapConfig

type GroupMapConfig struct {
	GroupName string   `mapstructure:"group_name"`
	Roles     []string `mapstructure:"roles"`
}

type OAuthProviderConfig

type OAuthProviderConfig struct {
	Enabled      bool             `mapstructure:"enabled"`
	Type         string           `mapstructure:"type"`
	Name         string           `mapstructure:"name"`
	ClientID     string           `mapstructure:"client_id"`
	ClientSecret string           `mapstructure:"client_secret"`
	URL          string           `mapstructure:"url"`
	RedirectURL  string           `mapstructure:"redirect_url"`
	Scopes       []string         `mapstructure:"scopes"`
	AllowSignup  bool             `mapstructure:"allow_signup"`
	GroupMapping []GroupMapConfig `mapstructure:"group_mapping"`
	TeamSync     TeamSyncConfig   `mapstructure:"team_sync"`
}

type RateLimitConfig added in v0.3.2

type RateLimitConfig struct {
	Enabled bool `mapstructure:"enabled"`
}

type TeamGroupConfig added in v0.4.0

type TeamGroupConfig struct {
	Claim  string          `mapstructure:"claim"`
	Filter TeamGroupFilter `mapstructure:"filter"`
}

type TeamGroupFilter added in v0.4.0

type TeamGroupFilter struct {
	Mode    string `mapstructure:"mode"`
	Pattern string `mapstructure:"pattern"`
}

type TeamSyncConfig added in v0.4.0

type TeamSyncConfig struct {
	Enabled     bool            `mapstructure:"enabled"`
	StripPrefix string          `mapstructure:"strip_prefix"`
	Group       TeamGroupConfig `mapstructure:"group"`
}

Jump to

Keyboard shortcuts

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