handler

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler represents the commands handler logic.

func New

func New(printer printer.Printer, resultWriterFactory ResultWriterFactory, network core.Network) *Handler

New is the constructor of Handler.

func (*Handler) Create

func (h *Handler) Create(cmd *cobra.Command, args []string) error

Create is the handler to create validator(s).

type ResultWriterFactory

type ResultWriterFactory func(name string) (io.Writer, func(), error)

ResultWriterFactory is the create validator result factory

type ValidatorConfig

type ValidatorConfig struct {
	UUID    string                 `json:"uuid"`
	Crypto  map[string]interface{} `json:"crypto"`
	PubKey  string                 `json:"pubkey"`
	Path    string                 `json:"path"`
	Version uint                   `json:"version"`
}

ValidatorConfig represents the validator config data

Jump to

Keyboard shortcuts

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