config

package
v0.0.0-...-97b9ebb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package config contains config parser code that is shared between front- and back-end parts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DegitxConfig

type DegitxConfig struct {
	Version   string             `yaml:"version"`
	Keys      *Keys              `yaml:"keys"`
	LogConfig *logging.LogConfig `yaml:"logging"`
}

DegitxConfig is a config for both front- and back-end apps.

func (*DegitxConfig) FromFile

func (config *DegitxConfig) FromFile(fileName string) error

FromFile parses yaml file.

func (*DegitxConfig) FromFiles

func (config *DegitxConfig) FromFiles(paths ...string) error

FromFiles ensures that at least one file by given paths exist and parses its yaml content.

func (*DegitxConfig) Node

func (config *DegitxConfig) Node() (*locators.Node, error)

Node identity properties

type Keys

type Keys struct {
	Alg           string `yaml:"alg"`
	PathToPrivate string `yaml:"private"`
	PathToPublic  string `yaml:"public"`
}

Keys is a key's algorithm and paths to private and public keys.

Jump to

Keyboard shortcuts

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