config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Port string `yaml:"port"`
		Host string `yaml:"host"`
	} `yaml:"server"`
	PKI struct {
		RSABits              int      `yaml:"rsa_bits"`
		CSRMaxMemory         int      `yaml:"csr_max_memory"`
		SerialNumber         int64    `yaml:"serial_number"`
		CertificateTTL       string   `yaml:"certificate_ttl"`
		AllowedNames         []string `yaml:"allowed_names"`
		CertificateAuthority struct {
			CommonName string `yaml:"common_name"`
		} `yaml:"certificate_authority"`
	} `yaml:"pki"`
	OAuth struct {
		Enabled        bool     `yaml:"enabled"`
		TrustedIssuers []string `yaml:"trusted_issuers"`
	} `yaml:"oauth"`
}

TODO - add version property TODO - add to OU, Region, etc to Certificate Authority struct Config provides a template for marshalling .yml configuration files

func NewConfig

func NewConfig(s string) Config

NewConfig takes a .yml filename from the same /config directory, and returns a populated configuration

Jump to

Keyboard shortcuts

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