config

package
v0.0.0-...-03246a0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	KSLocation     string
	DefaultChainID int64
	Chain          map[string]struct{ Ticker, Endpoint string }
	Meson          *mcConfig.Config
}

func Load

func Load(b []byte) (*Config, error)

Load parses and validates the provided buffer b as a config file body and returns the Config.

func LoadFile

func LoadFile(f string) (*Config, error)

LoadFile loads, parses, and validates the provided file and returns the Config.

func (*Config) FixupAndValidate

func (c *Config) FixupAndValidate() error

FixupAndValidate applies defaults to config entries and validates the supplied configuration. Most people should call one of the Load variants instead.

func (*Config) SaveFile

func (c *Config) SaveFile(fileName string) error

SaveFile saves the config to the provided file

Jump to

Keyboard shortcuts

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