helpers

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 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(hyper.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: &hyperForms.ChangeRecordForm,
						},
					},
				},
			},
		},
	},
}

Functions

func Decorate

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

func InitCLI

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

func RecordsCommands

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

func Server

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

func Settings

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

Types

type Decorator

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

type Records

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

Jump to

Keyboard shortcuts

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