setup

package
v0.0.0-...-6bd82e6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfiguration

type ApiConfiguration struct {
	Port            uint   `mapstructure:"port"`
	LogLevel        string `mapstructure:"log_level"`
	DeploymentStage string `mapstructure:"deployment_stage"`
}

type AuthConfiguration

type AuthConfiguration struct {
	Enable    *bool         `mapstructure:"enable"`
	Providers OIDCProviders `mapstructure:"oidc_providers"`
}

type Configuration

type Configuration struct {
	Auth     AuthConfiguration     `mapstructure:"auth"`
	Api      ApiConfiguration      `mapstructure:"api"`
	Database DatabaseConfiguration `mapstructure:"database"`
	TFE      TFEConfiguration      `mapstructure:"tfe"`
	Sentry   SentryConfiguration   `mapstructure:"sentry"`
}

func GetConfiguration

func GetConfiguration() *Configuration

type DBDriver

type DBDriver string
const (
	Sqlite   DBDriver = "sqlite3"
	Postgres DBDriver = "postgres"
)

func (*DBDriver) String

func (d *DBDriver) String() string

type DatabaseConfiguration

type DatabaseConfiguration struct {
	Driver         DBDriver `mapstructure:"driver"`
	DataSourceName string   `mapstructure:"data_source_name"`
	LogLevel       string   `mapstructure:"log_level"`
}

type OIDCProvider

type OIDCProvider struct {
	IssuerURL string `mapstructure:"issuer_url"`
	ClientID  string `mapstructure:"client_id"`
}

type OIDCProviders

type OIDCProviders []OIDCProvider

func (*OIDCProviders) UnmarshalText

func (p *OIDCProviders) UnmarshalText(text []byte) error

example of how to parse multiple OIDC providers with one env var: "HAPI_AUTH_OIDC_PROVIDERS": "issuer1|clientid1,issuer2|clientid2"

type SentryConfiguration

type SentryConfiguration struct {
	DSN string `mapstructure:"dsn"`
}

type TFEConfiguration

type TFEConfiguration struct {
	Token string `mapstructure:"token"`
}

Jump to

Keyboard shortcuts

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