config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfig

func GenerateConfig(log *zap.Logger, store Store, overwrite, genRsaKey bool) error

Types

type Config

type Config struct {
	Level       encoding.LogLevel
	TokenExpiry encoding.Duration
	Port        int
	Host        string
	Nodes       NodesConfig
	RsaKey      string
	Console     ConsoleConfig
}

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.

type ConsoleConfig

type ConsoleConfig struct {
	URL       string
	LocalPort int
}

type NodesConfig

type NodesConfig struct {
	Hosts   []string
	Retries uint64
}

type Store

type Store interface {
	SaveConfig(*Config, bool) error
	SaveRSAKeys(*wallet.RSAKeys, bool) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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