utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppendConfigFlag = &cli.StringFlag{
		Name:    "config",
		Aliases: []string{"c"},
		Value:   "config.json",
		Usage:   "Read append config from `FILE`",
	}
	ShareListFlag = &cli.StringFlag{
		Name:    "list",
		Aliases: []string{"l"},
		Value:   "shares.csv",
		Usage:   "Read share list from `FILE`",
	}
	StakeFlag = &cli.StringFlag{
		Name:    "stake",
		Aliases: []string{"s"},
		Value:   "stake.json",
		Usage:   "Read stake detail info from `STAKE`",
	}
	CsvFlag = &cli.StringFlag{
		Name:    "output",
		Aliases: []string{"o"},
		Value:   "shares.csv",
		Usage:   "Output stake profit snapshot to `CSV`",
	}
	FilterCompanyFlag = &cli.StringFlag{
		Name:  "company",
		Usage: "Only print `company`'s stake",
	}
	MailConfigFlag = &cli.StringFlag{
		Name:    "config",
		Aliases: []string{"c"},
		Value:   "config.json",
		Usage:   "Read mail config from `FILE`",
	}
	DateFlag = &cli.StringFlag{
		Name:    "date",
		Aliases: []string{"d"},
		Usage:   "Report `DATE`, like 20190916",
	}
	ConfigFlag = &cli.StringFlag{
		Name:    "config",
		Aliases: []string{"c"},
		Value:   "config.json",
		Usage:   "Read config from `FILE`",
	}
	StartBlockFlag = &cli.Uint64Flag{
		Name:  "start",
		Usage: "Start from `BlockNumber`",
	}
	EndBlockFlag = &cli.Uint64Flag{
		Name:  "end",
		Usage: "End to `BlockNumber`",
	}
)
View Source
var (
	Authors = []*cli.Author{alex}
)

Functions

func Info added in v0.1.0

func Info(app *cli.App)

Types

type AppendConfig added in v0.1.0

type AppendConfig struct {
	Mongo MongoConf `json:"mongo"`
}

func LoadAppendConfig added in v0.1.0

func LoadAppendConfig(file string) *AppendConfig

type Mail added in v0.1.0

type Mail struct {
	User     string `json:"user"`
	Password string `json:"password"`
	Host     string `json:"host"`
	BCC      string `json:"bcc"`
	Subject  string `json:"subject"`
}

type MailConfig added in v0.1.0

type MailConfig struct {
	Mongo    MongoConf `json:"mongo,omitempty"`
	Mail     Mail      `json:"mail,omitempty"`
	Template Template  `json:"template,omitempty"`
}

func Load added in v0.1.0

func Load(file string) *MailConfig

type MongoConf added in v0.1.0

type MongoConf struct {
	Host        string `json:"host"`
	Port        string `json:"port"`
	Database    string `json:"database"`
	MaxPoolSize uint64 `json:"maxPoolSize"`
	MinPoolSize uint64 `json:"minPoolSize"`
	AppName     string `json:"appName"`
}

func (MongoConf) URI added in v0.1.0

func (mc MongoConf) URI() string

type Template added in v0.1.0

type Template struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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