Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct { Users []AuthUser Pigeons []AuthPigeon ServiceToken string `yaml:"service_token"` }
AuthConfig contains all settings related to authentication and authorization.
type AuthPigeon ¶
AuthPigeon contains credentials used to authenticate a single pigeon.
type GRPCConfig ¶
type GRPCConfig struct {
Addr string
}
GRPCConfig contains configuration for the gRPC server.
type Immutable ¶
type Immutable struct { Storage StorageConfig GRPC GRPCConfig Web WebConfig }
Immutable contains immutable settings which are set only once at launch time.
func ReadImmutable ¶
ReadImmutable reads the immutable config from the specified flags and environment variables.
type Mutable ¶
type Mutable struct {
// contains filtered or unexported fields
}
Mutable wraps MutableConfig with support for hot-reloading and modifications.
func ReadMutable ¶
ReadMutable reads the mutable configuration file, creating one if it isn't present.
func (*Mutable) AuthPigeons ¶
AuthPigeons returns the auth.pigeons setting represented as a map from token to pigeon name.
func (*Mutable) AuthServiceToken ¶
AuthServiceToken returns the auth.service_token setting.
func (*Mutable) AuthUsers ¶
AuthUsers returns the auth.users setting represented as a map from username to password hash.
func (*Mutable) Reload ¶
Reload reloads the whole config from the file from which it was originally loaded.
func (*Mutable) SetMutableConfig ¶
func (m *Mutable) SetMutableConfig(c MutableConfig) error
SetMutableConfig changes the used mutable config, if the one passed is valid.
type MutableConfig ¶
type MutableConfig struct {
Auth AuthConfig
}
MutableConfig contains all settings which can be changed during execution.
type StorageConfig ¶
type StorageConfig struct {
Path string
}
StorageConfig contains the storage configuration.
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
A validation error is returned during a reload of the config if the new configuration is invalid.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string