configuration

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package configuration is a small package for handling configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Account    string `mapstructure:"account" desc:"The account address to use" required:"true"`
	Network    string `mapstructure:"network" desc:"The network to use" default:"Polkadot" allowed:"Polkadot,Kusama"`
	BaseURL    string `mapstructure:"url" desc:"The scanner api url to use" default:"https://api.dotscanner.com"`
	From       string `mapstructure:"from" desc:"Optional starting date"`
	To         string `mapstructure:"to" desc:"Optional ending date"`
	CSV        string `mapstructure:"csv" desc:"To save the results to a csv file"`
	Start, End time.Time
}

Configuration hold the service configuration.

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new configuration.

func (*Configuration) Prefix

func (c *Configuration) Prefix() string

Prefix returns the configuration prefix.

Jump to

Keyboard shortcuts

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