config

package
v0.0.0-...-816c15a Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(configPath string) (*koanf.Koanf, error)

config.Load: load file at `configPath` into koanf.Koanf

Types

type Config

type Config struct {
	// FROM CONFIG FILE
	KeySize int `koanf:"key_size"`

	PublicKeyFile  string `koanf:"public_key"`
	PrivateKeyFile string `koanf:"private_key"`
	AESKeyFile     string `koanf:"aes_key"`

	Directories []string `koanf:"directories"`
	Files       []string `koanf:"files"`

	// FROM OTHER STUFF
	RSAKey    *rsa.PrivateKey
	AESKeyMap map[string][]byte
}

func New

func New(configPath string) (*Config, error)

config.New: load `configPath` into `config.Config`

func Unmarshal

func Unmarshal(k *koanf.Koanf) (*Config, error)

config.Unmarshal: unmarshal `koanf.Koanf` into `config.Config`

Jump to

Keyboard shortcuts

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