config

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config holds configuration stuff to configure the things

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigFilePath = "./config/config.yaml"
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Webauthn WebauthnSettings
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a pointer to a `Config` struct with default values set

func Load

func Load(cfgFile *string) (*Config, error)

Load is responsible for loading the configuration from a YAML file and environment variables. It takes a pointer to a string `cfgFile` as a parameter, which represents the path to the configuration file. If the `cfgFile` is empty or nil, it sets the default configuration file path.

type RelyingParty

type RelyingParty struct {
	ID          string   `yaml:"id" json:"id,omitempty" koanf:"id" jsonschema:"default=localhost"`
	DisplayName string   `` /* 139-byte string literal not displayed */
	Icon        string   `yaml:"icon" json:"icon,omitempty" koanf:"icon"`
	Origins     []string `yaml:"origins" json:"origins,omitempty" koanf:"origins" jsonschema:"minItems=1,default=http://localhost:17608"`
}

type WebauthnSettings

type WebauthnSettings struct {
	RelyingParty     RelyingParty `yaml:"relying_party" json:"relying_party,omitempty" koanf:"relying_party" split_words:"true"`
	Timeout          int          `yaml:"timeout" json:"timeout,omitempty" koanf:"timeout" jsonschema:"default=60000"`
	UserVerification string       `` /* 181-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL