Documentation ¶
Index ¶
- func ValidateConfig(config Config)
- type AboutConfig
- type Config
- type DuplicateFinderConfig
- type FeedbackConfig
- type FileStorageConfig
- type FitType
- type ImageStorageConfig
- type ImageStorageDirConfig
- type ImageStorageNamingStrategyConfig
- type ImageStorageSamplerFormatConfig
- type KeycloakConfig
- type LanguageConfig
- type MigrationsConfig
- type RecaptchaConfig
- type RestConfig
- type RestCorsConfig
- type S3Config
- type S3CredentialsConfig
- type SMTPConfig
- type TelegramConfig
- type YoomoneyConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AboutConfig ¶
type AboutConfig struct { Developer string `mapstructure:"developer" yaml:"developer"` FrTranslator string `mapstructure:"fr-translator" yaml:"fr-translator"` ZhTranslator string `mapstructure:"zh-translator" yaml:"zh-translator"` BeTranslator string `mapstructure:"be-translator" yaml:"be-translator"` PtBrTranslator string `mapstructure:"pt-br-translator" yaml:"pt-br-translator"` }
type Config ¶
type Config struct { GinMode string `mapstructure:"gin-mode" yaml:"gin-mode"` GRPC struct { Listen string `mapstructure:"listen" yaml:"listen"` } `mapstructure:"grpc" yaml:"grpc"` PublicRest RestConfig `mapstructure:"public-rest" yaml:"public-rest"` DuplicateFinder DuplicateFinderConfig `mapstructure:"duplicate_finder" yaml:"duplicate_finder"` AutowpDSN string `mapstructure:"autowp-dsn" yaml:"autowp-dsn"` AutowpMigrations MigrationsConfig `mapstructure:"autowp-migrations" yaml:"autowp-migrations"` FileStorage FileStorageConfig `mapstructure:"file_storage" yaml:"file_storage"` RabbitMQ string `mapstructure:"rabbitmq" yaml:"rabbitmq"` MonitoringQueue string `mapstructure:"monitoring_queue" yaml:"monitoring_queue"` PrivateRest RestConfig `mapstructure:"private-rest" yaml:"private-rest"` Telegram TelegramConfig `mapstructure:"telegram" yaml:"telegram"` PostgresDSN string `mapstructure:"postgres-dsn" yaml:"postgres-dsn"` PostgresMigrations MigrationsConfig `mapstructure:"postgres-migrations" yaml:"postgres-migrations"` Recaptcha RecaptchaConfig `mapstructure:"recaptcha" yaml:"recaptcha"` MockEmailSender bool `mapstructure:"mock-email-sender" yaml:"mock-email-sender"` SMTP SMTPConfig `mapstructure:"smtp" yaml:"smtp"` Feedback FeedbackConfig `mapstructure:"feedback" yaml:"feedback"` Keycloak KeycloakConfig `mapstructure:"keycloak" yaml:"keycloak"` UsersSalt string `mapstructure:"users-salt" yaml:"users-salt"` EmailSalt string `mapstructure:"email-salt" yaml:"email-salt"` Languages map[string]LanguageConfig `mapstructure:"languages" yaml:"languages"` Captcha bool `mapstructure:"captcha" yaml:"captcha"` ImageStorage ImageStorageConfig `mapstructure:"image-storage" yaml:"image-storage"` Redis string `mapstructure:"redis" yaml:"redis"` DonationsVodPrice int32 `mapstructure:"donations-vod-price" yaml:"donations-vod-price"` About AboutConfig `mapstructure:"about" yaml:"about"` ContentLanguages []string `mapstructure:"content-languages" yaml:"content-languages"` MessageInterval int64 `mapstructure:"message-interval" yaml:"message-interval"` MostsMinCarsCount int `mapstructure:"mosts-min-cars-count" yaml:"mosts-min-cars-count"` YoomoneyConfig YoomoneyConfig `mapstructure:"yoomoney" yaml:"yoomoney"` }
Config Application config definition.
type DuplicateFinderConfig ¶
type DuplicateFinderConfig struct { RabbitMQ string `mapstructure:"rabbitmq" yaml:"rabbitmq"` Queue string `mapstructure:"queue" yaml:"queue"` }
DuplicateFinderConfig DuplicateFinderConfig.
type FeedbackConfig ¶
type FeedbackConfig struct { From string `mapstructure:"from" yaml:"from"` To []string `mapstructure:"to" yaml:"to"` Subject string `mapstructure:"subject" yaml:"subject"` }
FeedbackConfig FeedbackConfig.
type FileStorageConfig ¶
type FileStorageConfig struct { S3 S3Config `mapstructure:"s3" yaml:"s3"` Bucket string `mapstructure:"bucket" yaml:"bucket"` }
FileStorageConfig FileStorageConfig.
type ImageStorageConfig ¶
type ImageStorageConfig struct { Dirs map[string]ImageStorageDirConfig `mapstructure:"dirs"` Formats map[string]ImageStorageSamplerFormatConfig `mapstructure:"formats"` S3 struct { Region string `mapstructure:"region"` Endpoint string `mapstructure:"endpoint"` Credentials struct { Key string `mapstructure:"key"` Secret string `mapstructure:"secret"` } `mapstructure:"credentials"` UsePathStyleEndpoint bool `mapstructure:"use_path_style_endpoint"` } `mapstructure:"s3"` SrcOverride struct { Host string `mapstructure:"host"` Scheme string `mapstructure:"scheme"` } `mapstructure:"src-override"` }
type ImageStorageDirConfig ¶
type ImageStorageDirConfig struct { NamingStrategy ImageStorageNamingStrategyConfig `mapstructure:"naming-strategy"` Bucket string `mapstructure:"bucket"` }
type ImageStorageSamplerFormatConfig ¶
type ImageStorageSamplerFormatConfig struct { FitType FitType `mapstructure:"fit-type"` Width int `mapstructure:"width"` Height int `mapstructure:"height"` Background string `mapstructure:"background"` Strip bool `mapstructure:"strip"` ReduceOnly bool `mapstructure:"reduce-only"` ProportionalCrop bool `mapstructure:"proportional-crop"` Format string `mapstructure:"format"` IgnoreCrop bool `mapstructure:"ignore-crop"` Widest float64 `mapstructure:"widest"` Highest float64 `mapstructure:"highest"` }
type KeycloakConfig ¶
type KeycloakConfig struct { URL string `mapstructure:"url" yaml:"url"` ClientID string `mapstructure:"client-id" yaml:"client-id"` ClientSecret string `mapstructure:"client-secret" yaml:"client-secret"` Realm string `mapstructure:"realm" yaml:"realm"` }
KeycloakConfig KeycloakConfig.
type LanguageConfig ¶
type LanguageConfig struct { Hostname string `mapstructure:"hostname" yaml:"hostname"` Timezone string `mapstructure:"timezone" yaml:"timezone"` Name string `mapstructure:"name" yaml:"name"` Flag string `mapstructure:"flag" yaml:"flag"` Aliases []string `mapstructure:"aliases" yaml:"aliases"` }
LanguageConfig LanguageConfig.
type MigrationsConfig ¶
type MigrationsConfig struct { DSN string `mapstructure:"dsn" yaml:"dsn"` Dir string `mapstructure:"dir" yaml:"dir"` }
MigrationsConfig MigrationsConfig.
type RecaptchaConfig ¶
type RecaptchaConfig struct { PublicKey string `mapstructure:"public-key" yaml:"public-key"` PrivateKey string `mapstructure:"private-key" yaml:"private-key"` }
RecaptchaConfig RecaptchaConfig.
type RestConfig ¶
type RestConfig struct { Listen string `mapstructure:"listen"` Cors RestCorsConfig `mapstructure:"cors"` }
RestConfig RestConfig.
type RestCorsConfig ¶
type RestCorsConfig struct {
Origin []string `mapstructure:"origin"`
}
RestCorsConfig RestCorsConfig.
type S3Config ¶
type S3Config struct { Credentials S3CredentialsConfig `mapstructure:"credentials" yaml:"credentials"` Region string `mapstructure:"region" yaml:"region"` Endpoints []string `mapstructure:"endpoints" yaml:"endpoints"` S3ForcePathStyle bool `mapstructure:"s3_force_path_style" yaml:"s3_force_path_style"` }
S3Config S3Config.
type S3CredentialsConfig ¶
type S3CredentialsConfig struct { Key string `mapstructure:"key" yaml:"key"` Secret string `mapstructure:"secret" yaml:"secret"` }
S3CredentialsConfig S3CredentialsConfig.
type SMTPConfig ¶
type SMTPConfig struct { Hostname string `mapstructure:"hostname" yaml:"hostname"` Port int `mapstructure:"port" yaml:"port"` Username string `mapstructure:"username" yaml:"username"` Password string `mapstructure:"password" yaml:"password"` }
SMTPConfig SMTPConfig.
type TelegramConfig ¶
type TelegramConfig struct {
AccessToken string `mapstructure:"access-token" yaml:"access-token"`
}
type YoomoneyConfig ¶ added in v1.68.0
Click to show internal directories.
Click to hide internal directories.