Documentation
¶
Index ¶
- func Load[T any](configPaths []string, envPrefix string) (*T, error)
- type AML
- type AMLBot
- type AdminConfig
- type AppConfig
- type BitOK
- type BitcoinBlockchain
- type Blockchain
- type Config
- type DogecoinBlockchain
- type EProxy
- type ExrateConfig
- type ExternalStoreLimits
- type GrpcConfig
- type HTTPConfig
- type HTTPCorsConfig
- type KeyValue
- type KeyValueEngine
- type LitecoinBlockchain
- type NotifyConfig
- type NotifyTelegram
- type PostgresDB
- type RedisDB
- type SeedConfig
- type Transactions
- type Transfers
- type Turnstile
- type Updater
- type Wallets
- type WebHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminConfig ¶
type AppConfig ¶
type AppConfig struct {
Profile models.AppProfile `yaml:"profile" default:"prod" validate:"oneof=dev prod demo"`
}
type BitcoinBlockchain ¶
type BitcoinBlockchain struct {
AddressType string `` /* 135-byte string literal not displayed */
}
type Blockchain ¶
type Blockchain struct {
Bitcoin BitcoinBlockchain
Litecoin LitecoinBlockchain
Dogecoin DogecoinBlockchain
}
type Config ¶
type Config struct {
RolesModelPath string `yaml:"roles_model_path" required:"true" default:"configs/rbac_model.conf"`
RolesPoliciesPath string `yaml:"roles_policies_path" required:"true" default:"configs/rbac_policies.csv"`
App AppConfig `yaml:"app"`
HTTP HTTPConfig `yaml:"http"`
Seed SeedConfig `yaml:"seed"`
Postgres PostgresDB `yaml:"postgres"`
Redis RedisDB `yaml:"redis"`
Exrate ExrateConfig `yaml:"exrate"`
Admin AdminConfig `yaml:"admin"`
Notify NotifyConfig `yaml:"notify"`
WebHook WebHook `yaml:"web_hook"`
EProxy EProxy `yaml:"e_proxy"`
Transfers Transfers `yaml:"transfers"`
Ops ops.Config `yaml:"ops"`
KeyValue KeyValue `yaml:"key_value"`
Transactions Transactions `yaml:"transactions"`
Wallets Wallets `yaml:"wallets"`
ExternalStoreLimits ExternalStoreLimits `yaml:"external_store_limits"`
Log logger.Config `yaml:"log"`
Blockchain Blockchain `yaml:"blockchain"`
Updater Updater `yaml:"updater"`
Turnstile Turnstile `yaml:"turnstile"`
AML AML `yaml:"aml"`
}
type DogecoinBlockchain ¶
type DogecoinBlockchain struct {
AddressType string `json:"address_type" yaml:"address_type" usage:"change default generate address" default:"P2PKH" example:"P2PKH"`
}
type EProxy ¶
type EProxy struct {
GRPC GrpcConfig `yaml:"grpc"`
}
type ExrateConfig ¶
type ExternalStoreLimits ¶
type GrpcConfig ¶
type HTTPConfig ¶
type HTTPConfig struct {
Host string `yaml:"host" default:"localhost"`
Port string `yaml:"port" default:"80"`
FetchInterval time.Duration `yaml:"fetch_interval" env:"FETCH_INTERVAL" default:"30s"`
ConnectTimeout time.Duration `yaml:"connect_timeout" env:"CONNECT_TIMEOUT" default:"5s"`
ReadTimeout time.Duration `yaml:"read_timeout" env:"READ_TIMEOUT" default:"10s"`
WriteTimeout time.Duration `yaml:"write_timeout" env:"WRITE_TIMEOUT" default:"10s"`
MaxHeaderMegabytes int `yaml:"max_header_megabytes" env:"MAX_HEADER_MEGABYTES" default:"1"`
Cors HTTPCorsConfig `yaml:"cors"`
}
type HTTPCorsConfig ¶
type KeyValue ¶
type KeyValue struct {
Engine KeyValueEngine `yaml:"engine" required:"true" validate:"oneof=redis in_memory" example:"redis / in_memory" default:"redis"`
}
type KeyValueEngine ¶
type KeyValueEngine string
const ( KeyValueEngineInMemory KeyValueEngine = "in_memory" KeyValueEngineRedis KeyValueEngine = "redis" )
type LitecoinBlockchain ¶
type LitecoinBlockchain struct {
AddressType string `` /* 135-byte string literal not displayed */
}
type NotifyConfig ¶
type NotifyConfig struct {
Telegram NotifyTelegram `yaml:"telegram"`
}
type NotifyTelegram ¶
type PostgresDB ¶
type PostgresDB struct {
Addr string `validate:"required" usage:"storage address in format ip:port"`
DBName string `yaml:"db_name" env:"DB_NAME" validate:"required" usage:"storage user"`
User string `validate:"required" secret:"true" usage:"storage user password"`
Password string `validate:"required" secret:"true" usage:"storage db name"`
ConnMaxLifetime int `yaml:"conn_max_lifetime" default:"180"`
MaxOpenConns int32 `yaml:"max_open_conns" default:"100"`
MaxIdleConns int32 `yaml:"max_idle_conns" default:"100"`
MinOpenConns int32 `yaml:"min_open_conns" default:"6"`
}
func (PostgresDB) DSN ¶
func (conf PostgresDB) DSN() string
func (PostgresDB) Engine ¶
func (conf PostgresDB) Engine() string
type RedisDB ¶
type SeedConfig ¶
type SeedConfig struct {
Base string `yaml:"base" default:"seeds"`
}
type Transactions ¶
type Updater ¶
type Updater struct {
BaseURL string `` /* 142-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.