configuration

package
v0.0.0-...-30d0c4a Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 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 ApplicationSettings

type ApplicationSettings struct {
	Port                   uint16 `yaml:"port" envconfig:"PORT"`
	SigningKey             string `yaml:"signing_key" envconfig:"JWT_SECRET_KEY"`
	TokenExpirationSeconds uint16 `yaml:"token_expiration_seconds"`
	KafkaEndpoint          string `yaml:"kafka_endpoint" envconfig:"KAFKA_ENDPOINT"`
	ElasticsearchEndpoint  string `yaml:"elasticsearch_endpoint" envconfig:"ELASTICSEARCH_ENDPOINT"`
}

type AzureSettings

type AzureSettings struct {
	StorageAccountName   string `yaml:"storage_account_name" envconfig:"AZ_STORAGE_ACCOUNT_NAME"`
	StorageAccountKey    string `yaml:"storage_account_key" envconfig:"AZ_STORAGE_ACCOUNT_KEY"`
	BlobStorageEndpoint  string `yaml:"blob_storage_endpoint" envconfig:"AZ_BLOB_STORAGE_ENDPOINT"`
	TenantID             string `yaml:"tenant_id" envconfig:"AZ_TENANT_ID"`
	ClientID             string `yaml:"client_id" envconfig:"AZ_CLIENT_ID"`
	ClientSecret         string `yaml:"client_secrtet" envconfig:"AZ_CLIENT_SECRET"`
	BlobConnectionString string `yaml:"blob_connection_string"`
}

type DatabaseSettings

type DatabaseSettings struct {
	Username   string `yaml:"username" envconfig:"DB_USERNAME"`
	Password   string `yaml:"password" envconfig:"DB_PASSWORD"`
	Host       string `yaml:"host" envconfig:"DB_HOST"`
	Port       uint16 `yaml:"port" envconfig:"DB_PORT"`
	DbName     string `yaml:"db_name" envconfig:"DB_NAME"`
	RequireSsl bool   `yaml:"require_ssl"`
}

type Settings

type Settings struct {
	Database    DatabaseSettings    `yaml:"database"`
	Application ApplicationSettings `yaml:"application"`
	Azure       AzureSettings       `yaml:"azure"`
}

func ReadConfiguration

func ReadConfiguration(path string) Settings

Jump to

Keyboard shortcuts

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