Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfig(configFile string) error
- func MockConfig(enableAutoGeneration bool, url string, authorizationToken string)
- func SetGrafanaExporterEnvs() error
- type AccountNumberGenerationConfig
- type Configuration
- type DataSourceConfig
- type Notification
- type OtelGrafanaCloud
- type RedisConfig
- type ServerConfig
- type TypeSenseConfig
Constants ¶
View Source
const (
DEFAULT_PORT = "5001"
)
Variables ¶
View Source
var ConfigStore atomic.Value
Functions ¶
func InitConfig ¶
func MockConfig ¶
MockConfig sets a mock configuration for testing purposes.
func SetGrafanaExporterEnvs ¶
func SetGrafanaExporterEnvs() error
Types ¶
type Configuration ¶
type Configuration struct { ProjectName string `json:"project_name" envconfig:"BLNK_PROJECT_NAME"` BackupDir string `json:"backup_dir" envconfig:"BLNK_BACKUP_DIR"` AwsAccessKeyId string `json:"aws_access_key_id"` AwsSecretAccessKey string `json:"aws_secret_access_key"` S3BucketName string `json:"s3_bucket_name"` S3Region string `json:"s3_region"` Server ServerConfig `json:"server"` DataSource DataSourceConfig `json:"data_source"` Redis RedisConfig `json:"redis"` TypeSense TypeSenseConfig `json:"typesense"` TypeSenseKey string `json:"type_sense_key"` AccountNumberGeneration AccountNumberGenerationConfig `json:"account_number_generation"` Notification Notification `json:"notification"` OtelGrafanaCloud OtelGrafanaCloud `json:"otel_grafana_cloud"` }
func Fetch ¶
func Fetch() (*Configuration, error)
type DataSourceConfig ¶
type DataSourceConfig struct {
Dns string `json:"dns" envconfig:"BLNK_DATA_SOURCE_DNS"`
}
type Notification ¶
type OtelGrafanaCloud ¶
type RedisConfig ¶
type RedisConfig struct {
Dns string `json:"dns" envconfig:"BLNK_REDIS_DNS"`
}
type ServerConfig ¶
type ServerConfig struct { SSL bool `json:"ssl" envconfig:"BLNK_SERVER_SSL"` Secure bool `json:"secure" envconfig:"BLNK_SERVER_SECURE"` SecretKey string `json:"secret_key" envconfig:"BLNK_SERVER_SECRET_KEY"` Domain string `json:"domain" envconfig:"BLNK_SERVER_SSL_DOMAIN"` Email string `json:"ssl_email" envconfig:"BLNK_SERVER_SSL_EMAIL"` Port string `json:"port" envconfig:"BLNK_SERVER_PORT"` }
type TypeSenseConfig ¶ added in v0.6.3
type TypeSenseConfig struct {
Dns string `json:"dns" envconfig:"BLNK_TYPESENSE_DNS"`
}
Click to show internal directories.
Click to hide internal directories.