commands

package
v0.0.0-...-4970bd5 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: GPL-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DEFAULT = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name     string
	Flags    *flags.Manager
	Executor Executor
}

func (*Command) Start

func (c *Command) Start(p *ExecutorParameter) error

type Creator

type Creator func(cmd *Command)

Creator is action to help plugin to create new command

type Executor

type Executor func(p *ExecutorParameter) error

type ExecutorParameter

type ExecutorParameter struct {
	Name   string
	Meta   *models.Metadata
	Config maps.Mapper
	Cache  *caches.Service
	Logger *loggers.Logger
	Args   []string
}

type Manager

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

func New

func New() *Manager

func (*Manager) Add

func (m *Manager) Add(cmd *Command)

func (*Manager) Get

func (m *Manager) Get(args []string, config maps.Mapper) (*Command, []string)

func (*Manager) String

func (m *Manager) String() string

Jump to

Keyboard shortcuts

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