utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFlag = &cli.StringFlag{
		Name:    "config",
		Aliases: []string{"c"},
		Value:   "config.json",
		Usage:   "Load configuration from `file`",
	}
	DryRunFlag = &cli.BoolFlag{
		Name:  "dry-run",
		Value: false,
		Usage: "dry run.",
	}
	AfterFlag = &cli.StringFlag{
		Name:  "after",
		Usage: "the history after this time, eg. 2006-01-02T15:04:05.000-07:00",
	}
	BeforeFlag = &cli.StringFlag{
		Name:  "before",
		Usage: "the history before this time, eg. 2006-01-02T15:04:05.000-07:00",
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Network  string    `json:"network"`
	Manager  string    `json:"manager"`
	Server   Server    `json:"server"`
	Mongo    MongoConf `json:"mongo"`
	Interval string    `json:"interval"`
	Listen   string    `json:"listen"`
	Notify   string    `json:"notify"`
	Withdraw Withdraw
}

func ParseConfig

func ParseConfig(filename string) (c Config, err error)

type CryptoLions

type CryptoLions struct {
	Server string `json:"server"`
}

type Dfuse

type Dfuse struct {
	ApiKey  string `json:"api_key"`
	Manager string `json:"manager"`
}

type MongoConf

type MongoConf struct {
	URI         string `json:"uri"`
	Database    string `json:"database"`
	MaxPoolSize uint64 `json:"maxPoolSize"`
	MinPoolSize uint64 `json:"minPoolSize"`
	AppName     string `json:"appName"`
}

type Server

type Server struct {
	ServerType  string      `json:"serverType"` // dfuse cryptolions
	Dfuse       Dfuse       `json:"dfuse"`
	CryptoLions CryptoLions `json:"cryptolions"`
}

type Withdraw added in v0.2.2

type Withdraw struct {
	BaseURL    string
	Account    string
	PrivateKey string
}

Jump to

Keyboard shortcuts

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