cmd

package
v0.0.0-...-4fdfd55 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package cmd is the root package of the various command-line utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(bp BuildParameters)

func ParseCommandName

func ParseCommandName(args []string) (string, []string)

ParseCommandName extracts the command name and args from the args list.

Types

type BuildParameters

type BuildParameters struct {
	Version string
	Branch  string
	Commit  string
}

type Config

type Config struct {
	Environment   string
	LogLevel      string
	BugsnagAPIKey string
	UseGraph      bool

	GraphQL     gql.Config
	Store       store.Config
	Datastore   datastore.Config
	Worker      worker.Config
	Server      server.Config
	Push        push.Config
	Metrics     metrics.Config
	Search      search.Config
	Debug       debug.Config
	CoinManager coinmanager.Config
}

func NewConfig

func NewConfig() *Config

func NewDefaultConfig

func NewDefaultConfig() (*Config, error)

NewDefaultConfig returns the config that runs when no config is specified.

func (*Config) Load

func (c *Config) Load(fpath string) error

Load loads the config from a TOML file.

func (*Config) Parse

func (c *Config) Parse(input string) error

Parse parses the config from TOML.

func (*Config) Validate

func (c *Config) Validate() error

Validate returns an error if the config is invalid.

type Engine

type Engine struct {
	Closed chan struct{}
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(bp BuildParameters, config *Config, log log.Logger) *Engine

func (*Engine) Close

func (e *Engine) Close()

func (*Engine) Run

func (e *Engine) Run() error

Directories

Path Synopsis
help
Package help is the help subcommand of the emailworker command.
Package help is the help subcommand of the emailworker command.
run

Jump to

Keyboard shortcuts

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