Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callbacks ¶
Callbacks provides an interface that can be used to run callbacks on different events.
type Config ¶
type Config struct { BindAddr string `env:"SOFT_SERVE_BIND_ADDRESS" envDefault:""` Host string `env:"SOFT_SERVE_HOST" envDefault:"localhost"` Port int `env:"SOFT_SERVE_PORT" envDefault:"23231"` KeyPath string `env:"SOFT_SERVE_KEY_PATH"` RepoPath string `env:"SOFT_SERVE_REPO_PATH" envDefault:".repos"` InitialAdminKeys []string `env:"SOFT_SERVE_INITIAL_ADMIN_KEY" envSeparator:"\n"` Callbacks Callbacks ErrorLog *log.Logger }
Config is the configuration for Soft Serve.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config with the values populated with the defaults or specified environment variables.
func (*Config) WithCallbacks ¶
WithCallbacks applies the given Callbacks to the configuration.
Click to show internal directories.
Click to hide internal directories.