config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package config contains the definition of the application config structure and logic required to load and update it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	AutoDiscovery     bool     `yaml:"auto_discovery"`
	RegisteredClients []string `yaml:"registered_clients"`
}

Clients contains settings for client configuration.

type Config

type Config struct {
	Secrets Secrets `yaml:"secrets"`
	Clients Clients `yaml:"clients"`
}

Config represents the configuration of the application.

func GetConfig

func GetConfig() *Config

GetConfig is a Singleton that returns the application configuration.

func LoadOrCreateConfig

func LoadOrCreateConfig() (*Config, error)

LoadOrCreateConfig fetches the application configuration. If it does not already exist - it will create a new config file with default values.

func (*Config) WriteConfig

func (c *Config) WriteConfig() error

WriteConfig serializes the config struct and writes it to disk.

type Secrets

type Secrets struct {
	ProviderType string `yaml:"provider_type"`
}

Secrets contains the settings for secrets management.

Jump to

Keyboard shortcuts

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