Documentation ¶
Index ¶
- Constants
- Variables
- func InitConfig(configFile string) error
- func MockConfig(mockConfig *Configuration)
- type AccountGenerationHttpService
- type AccountNumberGenerationConfig
- type Configuration
- type DataSourceConfig
- type Notification
- type RateLimitConfig
- type RedisConfig
- type ServerConfig
- type SlackWebhook
- type TypeSenseConfig
Constants ¶
View Source
const (
DEFAULT_PORT = "5001"
)
Variables ¶
View Source
var ConfigStore atomic.Value
Functions ¶
func InitConfig ¶
func MockConfig ¶
func MockConfig(mockConfig *Configuration)
MockConfig sets a mock configuration for testing purposes.
Types ¶
type AccountGenerationHttpService ¶ added in v0.7.2
type AccountNumberGenerationConfig ¶
type AccountNumberGenerationConfig struct { EnableAutoGeneration bool `json:"enable_auto_generation"` HttpService AccountGenerationHttpService `json:"http_service"` }
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"` S3Endpoint string `json:"s3_endpoint"` 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"` RateLimit RateLimitConfig `json:"rate_limit"` }
func Fetch ¶
func Fetch() (*Configuration, error)
type DataSourceConfig ¶
type DataSourceConfig struct {
Dns string `json:"dns" envconfig:"BLNK_DATA_SOURCE_DNS"`
}
type Notification ¶
type Notification struct { Slack SlackWebhook `json:"slack"` Webhook struct { Url string `json:"url"` Headers map[string]string `json:"headers"` } `json:"webhook"` }
type RateLimitConfig ¶ added in v0.7.2
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 SlackWebhook ¶ added in v0.7.2
type SlackWebhook struct {
WebhookUrl string `json:"webhook_url"`
}
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.