config

package
v2.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(path string) error

Generate writes an empty config template to a given path

Types

type Blockchain

type Blockchain struct {
	// the endpoint of an ethereum node, prefferably go-ethereum
	Endpoint string `yaml:"endpoint"`
	// the json keyfile for our ethereum account
	KeyFile string `yaml:"key_file"`
	// the password to unlock the json keyfile
	KeyPass string `yaml:"key_pass"`
}

Blockchain provides configuration information for any blockchian connections

type Config

type Config struct {
	// the ethereum address you use for compound
	Address string `yaml:"address"`
	// map of names to contract address
	// ex. cSAI key could be used to return the cSAI contract address
	Contracts  map[string]string `yaml:"contracts"`
	Blockchain `yaml:"blockchain"`
}

Config is used to configure the go-compound api client

func Load

func Load(path string) (*Config, error)

Load is used to load the configuration object from a file

Jump to

Keyboard shortcuts

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