Documentation
¶
Index ¶
- Constants
- Variables
- func BaseWebURL() string
- func InitConfig(filename string) error
- func MergeExtraConfigFile(extraConfigFile string) error
- func MtlsEnabled() bool
- func ReadEmbeddedConfig() error
- func SetUser(user string) error
- type ChallengeSettings
- type Error
- type MetaDataConfig
- type MetaDataPath
- type MtlsSettings
- type WeepConfig
Constants ¶
View Source
const ClientCertificatesNotFoundError = Error("could not find client certificates")
View Source
const EmbeddedConfigDisabledError = Error("embedded config is disabled")
View Source
const HomeDirectoryError = Error("could not resolve user's home directory")
View Source
const MissingTLSConfigError = Error("missing required mTLS configuration")
View Source
const UnsupportedOSError = Error("running on unsupported operating system")
Variables ¶
View Source
var ( EmbeddedConfigs embed.FS EmbeddedConfigFile string // To be set by ldflags at compile time )
Functions ¶
func BaseWebURL ¶
func BaseWebURL() string
BaseWebURL allows the ConsoleMe URL to be overridden for cases where the API and UI are accessed via different URLs
func InitConfig ¶
initConfig reads in configs by precedence, with later configs overriding earlier:
- embedded
- /etc/weep/weep.yaml
- ~/.weep/weep.yaml
- ./weep.yaml
If a config file is specified via CLI arg, it will be read exclusively and not merged with other configuration.
func MergeExtraConfigFile ¶ added in v0.3.17
func MtlsEnabled ¶
func MtlsEnabled() bool
func ReadEmbeddedConfig ¶
func ReadEmbeddedConfig() error
ReadEmbeddedConfig attempts to read the embedded mTLS config and create a tls.Config
Types ¶
type ChallengeSettings ¶
type ChallengeSettings struct {
User string `mapstructure:"user"`
}
type MetaDataConfig ¶
type MetaDataConfig struct {
Routes []MetaDataPath `mapstructure:"routes"`
}
type MetaDataPath ¶
type MtlsSettings ¶
type WeepConfig ¶
type WeepConfig struct { MetaData MetaDataConfig `mapstructure:"metadata"` ConsoleMeUrl string `mapstructure:"consoleme_url"` MtlsSettings MtlsSettings `mapstructure:"mtls_settings"` ChallengeSettings ChallengeSettings `mapstructure:"challenge_settings"` AuthenticationMethod string `mapstructure:"authentication_method"` }
var (
Config WeepConfig
)
Click to show internal directories.
Click to hide internal directories.