config

package
v0.0.0-...-702f6d9 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSSettings

type AWSSettings struct {
	BUCKET_NAME *m.Secret[string]
	ID          *m.Secret[string]
	SECRET      *m.Secret[string]
	REGION      *m.Secret[string]
}

type ApplicationSettings

type ApplicationSettings struct {
	Port    uint16 `yaml:"port"`
	Host    string `yaml:"host"`
	BaseUrl string `yaml:"baseurl"`
}

type AuthSettings

type AuthSettings struct {
	AccessKey  *m.Secret[string]
	RefreshKey *m.Secret[string]
}

type DatabaseSettings

type DatabaseSettings struct {
	Username     string
	Password     *m.Secret[string]
	Port         uint
	Host         string
	DatabaseName string
	RequireSSL   bool
}

func (*DatabaseSettings) PostgresConn

func (s *DatabaseSettings) PostgresConn() string

func (*DatabaseSettings) WithDb

func (s *DatabaseSettings) WithDb() string

func (*DatabaseSettings) WithoutDb

func (s *DatabaseSettings) WithoutDb() string

type Environment

type Environment string
const (
	EnvironmentLocal      Environment = "local"
	EnvironmentProduction Environment = "production"
)

type OpenAISettings

type OpenAISettings struct {
	APIKey *m.Secret[string]
}

type PineconeSettings

type PineconeSettings struct {
	IndexHost *m.Secret[string]
	APIKey    *m.Secret[string]
}

type ProductionApplicationSettings

type ProductionApplicationSettings struct {
	Port uint16 `yaml:"port"`
	Host string `yaml:"host"`
}

type ProductionDatabaseSettings

type ProductionDatabaseSettings struct {
	RequireSSL bool `yaml:"requiressl"`
}

type ProductionSettings

type ProductionSettings struct {
	Database    ProductionDatabaseSettings    `yaml:"database"`
	Application ProductionApplicationSettings `yaml:"application"`
}

type ResendSettings

type ResendSettings struct {
	APIKey *m.Secret[string]
}

type Settings

type Settings struct {
	Application      ApplicationSettings
	Database         DatabaseSettings
	SuperUser        SuperUserSettings
	Auth             AuthSettings
	AWS              AWSSettings
	PineconeSettings PineconeSettings
	OpenAISettings   OpenAISettings
	ResendSettings   ResendSettings
}

func GetConfiguration

func GetConfiguration(path string, useDevDotEnv bool) (*Settings, error)

type SuperUserSettings

type SuperUserSettings struct {
	Password *m.Secret[string]
}

Jump to

Keyboard shortcuts

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