config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binary

type Binary struct {
	Name    string `json:"name"`
	Repo    string `json:"repo"`
	Build   string `json:"build"`
	Version string `json:"version"`
}

Binary is everything you need to build the binary for the network from the repo configured

type Config

type Config struct {
	RPCAddr            string `json:"rpc-addr" yaml:"-" mapstructure:"-"`
	ChainID            string `json:"chain-id" yaml:"-" mapstructure:"-"`
	BuildRepo          string `json:"build-repo" yaml:"-" mapstructure:"-"`
	BuildCommand       string `json:"build-command" yaml:"-" mapstructure:"-"`
	BinaryName         string `json:"binary-name" yaml:"-" mapstructure:"-"`
	BuildVersion       string `json:"build-version" yaml:"-" mapstructure:"-"`
	GithubAccessToken  string `json:"github-access-token" yaml:"github-access-token" mapstructure:"github-access-token"`
	RegistryRoot       string `json:"registry-root" yaml:"registry-root" mapstructure:"registry-root"`
	RegistryForkName   string `json:"registry-fork-name" yaml:"registry-fork-name" mapstructure:"registry-fork-name"`
	RegistryRootBranch string `json:"registry-root-branch" yaml:"registry-root-branch" mapstructure:"registry-root-branch"`
	GitName            string `json:"git-name" yaml:"git-name" mapstructure:"git-name"`
	GitEmail           string `json:"git-email" yaml:"git-email" mapstructure:"git-email"`
	CommitMessage      string `json:"commit-message" yaml:"-" mapstructure:"-"`
	// runtime variables
	Workspace string `json:"-" yaml:"-" mapstructure:"-"`
}

Config represents the configuration for the given application

func (*Config) BasicAuth

func (c *Config) BasicAuth() *http.BasicAuth

BasicAuth - build basic auth credentials from theconfiguration

func (*Config) Binary

func (c *Config) Binary() []byte

Binary returns the binary file representation from the config

func (*Config) IsValid

func (c *Config) IsValid() bool

IsValid - check if the configuration is valid

func (*Config) MustYAML

func (c *Config) MustYAML() []byte

MustYAML converts to yaml bytes panicing on error

func (*Config) YAML

func (c *Config) YAML() ([]byte, error)

YAML converts the config into yaml bytes

Jump to

Keyboard shortcuts

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