cmd

package
v0.0.0-...-63f4637 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdderMultipleCommands

type AdderMultipleCommands interface {
	AddCommand(...*cobra.Command)
}

AdderMultipleCommands adds cmd commands to the other command.

type CommandRouter

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

CommandRouter is the main commands router.

func NewCommandRouter

func NewCommandRouter(log ErrorLogger, api Runner) CommandRouter

NewCommandRouter creates a new CommandRouter.

func (*CommandRouter) RegisterApp

func (r *CommandRouter) RegisterApp(a CommandsAdder)

RegisterApp register the applications.

func (*CommandRouter) Run

func (r *CommandRouter) Run()

Run the router.

type CommandsAdder

type CommandsAdder interface {
	AddCommands(cmd interface{ AdderMultipleCommands })
}

CommandsAdder add the app commands

type ErrorLogger

type ErrorLogger interface {
	Error(args ...interface{})
}

ErrorLogger logs errors.

type Runner

type Runner interface {
	Init()
	Run()
}

Runner runs the API server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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