Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Production bool `envconfig:"SCIMFE_PRODUCTION" default:"false" yaml:"production"` Server ServerConfig `yaml:"server"` DB Database `yaml:"db"` Redis Redis `yaml:"redis"` }
type Database ¶
type Database struct { Address string `envconfig:"SCIMFE_DB_ADDRESS" default:"postgres://localhost:5432/scimfe" yaml:"address"` MigrationsDirectory string `envconfig:"SCIMFE_MIGRATIONS_DIR" default:"deployments/db/migrations" yaml:"migrations_dir"` VersionTable string `envconfig:"SCIMFE_VERSION_TABLE" default:"schema_migrations" yaml:"version_table"` SchemaVersion uint `envconfig:"SCIMFE_SCHEMA_VERSION" yaml:"schema_version"` SkipMigration bool `envconfig:"SCIMFE_NO_MIGRATION" yaml:"skip_migration"` }
type Duration ¶
Duration is deserializable wrapper around time.Duration
func NewDuration ¶
func (*Duration) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler
type Redis ¶
type Redis struct { DB int `envconfig:"SCIMFE_REDIS_DB" yaml:"db"` Address string `envconfig:"SCIMFE_REDIS_ADDRESS" yaml:"address" default:"localhost:6379"` Username string `envconfig:"SCIMFE_REDIS_USER" yaml:"username"` Password string `envconfig:"SCIMFE_REDIS_PASSWORD" yaml:"password"` }
func (Redis) RedisOptions ¶
func (r Redis) RedisOptions() *redis.Options
RedisOptions returns redis connection options
type ServerConfig ¶
type ServerConfig struct { ListenAddress string `envconfig:"SCIMFE_LISTEN_ADDR" default:":8080" yaml:"listen"` ReadTimeout Duration `envconfig:"SCIMFE_READ_TIMEOUT" yaml:"read_timeout"` WriteTimeout Duration `envconfig:"SCIMFE_WRITE_TIMEOUT" yaml:"write_timeout"` TokenBucketTTL Duration `envconfig:"SCIMFE_TOKEN_BUCKET_TTL" yaml:"token_bucket_ttl"` UserRequestsPerSecondLimit float64 `envconfig:"SCIMFE_USER_RPS_LIMIT" yaml:"user_rps_limit"` }
func (ServerConfig) ListenParams ¶
func (cfg ServerConfig) ListenParams() web.ListenParams
Click to show internal directories.
Click to hide internal directories.