helpers

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonCommands = []cli.Command{
	{
		Name:   "version",
		Usage:  "Print the software version",
		Action: func(c *cli.Context) error { fmt.Println(eps.Version); return nil },
	},
}
View Source
var CommonFlags = []cli.Flag{
	cli.StringFlag{
		Name:  "level",
		Value: "info",
		Usage: "The desired log level",
	},
	cli.StringFlag{
		Name:  "format",
		Value: "",
		Usage: "The desired log format (possible values: iris)",
	},
	cli.StringFlag{
		Name:  "profile",
		Value: "",
		Usage: "enable profiler and store results to given filename",
	},
}
View Source
var RecordsForm = forms.Form{
	Fields: []forms.Field{
		{
			Name: "records",
			Validators: []forms.Validator{
				forms.IsList{
					Validators: []forms.Validator{
						forms.IsStringMap{
							Form: &epsForms.ChangeRecordForm,
						},
					},
				},
			},
		},
	},
}

Functions

func Decorate added in v0.1.40

func Decorate(commands []cli.Command, decorator Decorator, service string) []cli.Command

func InitCLI added in v0.1.40

func InitCLI(f func(c *cli.Context) error, service string) func(c *cli.Context) error

func RecordsCommands

func RecordsCommands(settings *eps.Settings) ([]cli.Command, error)

func Server

func Server(settings *eps.Settings) ([]cli.Command, error)

func Settings

func Settings(definitions *eps.Definitions) (*eps.Settings, error)

Types

type Decorator added in v0.1.40

type Decorator func(f func(c *cli.Context) error, service string) func(c *cli.Context) error

type Records

type Records struct {
	Records []*eps.ChangeRecord `json:"records"`
}

Jump to

Keyboard shortcuts

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