Documentation
¶
Index ¶
- Constants
- type Config
- func (c *Config) HandlerPattern(p ...string) string
- func (c *Config) Listen() string
- func (c *Config) LoadArgs(args []string) (func(io.Writer), error)
- func (c *Config) LoadEnv() error
- func (c *Config) LogHandler(w io.Writer) slog.Handler
- func (c *Config) LogVerbosity() slog.Level
- func (c *Config) RandomGenerator() *rand.Rand
- func (c *Config) RandomSeedTime() time.Time
- func (c *Config) RandomSource() rand.Source
- func (c *Config) SelfURL(api string) (*url.URL, error)
- func (c *Config) String() string
Constants ¶
View Source
const ( EnvPrefix = "FAKE_SECRETS_" LogFormatJSON = "JSON" CommandHealthCheck = "healthcheck" CommandVersion = "version" CommandServe = "serve" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
LogLevel string `env:"LOG_LEVEL"`
LogFormat string `env:"LOG_FORMAT"`
StorageDir string `env:"STORAGE_DIR"`
PathPrefix string `env:"PATH_PREFIX"`
ReadTimeout time.Duration `env:"READ_TIMEOUT"`
WriteTimeout time.Duration `env:"WRITE_TIMEOUT"`
ListenAddress string `env:"LISTEN_ADDRESS"`
ListenPort int `env:"LISTEN_PORT"`
RandomSeed int64 `env:"RANDOM_SEED"`
Command string `env:"-"`
// contains filtered or unexported fields
}
func (*Config) HandlerPattern ¶
func (*Config) LogVerbosity ¶
func (*Config) RandomGenerator ¶
func (*Config) RandomSeedTime ¶
func (*Config) RandomSource ¶
Click to show internal directories.
Click to hide internal directories.