configuration

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigPath is the ENV variable that will be looked for if not existent
	ConfigPath = "ROSETTA_DGB_CONFIG_PATH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NetworkIdentifier NetworkIdentifier `yaml:"network_identifier"`
	Currency          Currency          `yaml:"currency"`
	Server            Server            `yaml:"server"`
	Node              Node              `yaml:"node"`
	Version           Version           `yaml:"version"`
}

Config is the overall configuration for this service layer

func New

func New(path string) (cfg *Config, err error)

New parses a new config file and creates everything necessary

type Currency

type Currency struct {
	Symbol   string `yaml:"symbol"`
	Decimals int32  `yaml:"decimals"`
}

Currency is the specification for the given currency

type NetworkIdentifier

type NetworkIdentifier struct {
	Blockchain string `yaml:"blockchain"`
	Network    string `yaml:"network"`
}

NetworkIdentifier specifies a blockchain network it will run on

type Node

type Node struct {
	Endpoint   string `yaml:"endpoint"`
	TLSEnabled bool   `yaml:"tlsEnabled"`
	Username   string `yaml:"username"`
	Password   string `yaml:"password"`
}

Node specifies the connection details towards a given node

type Server

type Server struct {
	Port string `yaml:"port"`
}

Server represents setting for this rosetta data server

type Version

type Version struct {
	RosettaVersion  string `yaml:"rosettaVersion"`
	DigibyteVersion string `yaml:"digibyteVersion"`
}

Version is representing the version of the specification for both rosetta and the given node

Jump to

Keyboard shortcuts

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