cmd

package
v0.0.0-...-e345738 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootApp = NewApp()

Functions

func GetSubCommands

func GetSubCommands(opt fx.Option) []*cobra.Command

GetSubCommands gives a list of sub commands

func SetAppVersion

func SetAppVersion(version, commit, buildTime string)

func WrapSubCommand

func WrapSubCommand(name string, cmd utils.Command, opt fx.Option) *cobra.Command

Types

type ApiServerCommand

type ApiServerCommand struct{}

ApiServerCommand test command

func NewApiServerCommand

func NewApiServerCommand() *ApiServerCommand

func (*ApiServerCommand) Run

func (*ApiServerCommand) Setup

func (s *ApiServerCommand) Setup(cmd *cobra.Command)

func (*ApiServerCommand) Short

func (s *ApiServerCommand) Short() string

type App

type App struct {
	*cobra.Command
}

App root of application

func NewApp

func NewApp() App

type EchoServerCommand

type EchoServerCommand struct{}

EchoServerCommand test echo server command

func NewEchoServerCommand

func NewEchoServerCommand() *EchoServerCommand

func (*EchoServerCommand) Run

func (*EchoServerCommand) Setup

func (s *EchoServerCommand) Setup(cmd *cobra.Command)

func (*EchoServerCommand) Short

func (s *EchoServerCommand) Short() string

type FileServerCommand

type FileServerCommand struct{}

ServeCommand test command

func NewFileServerCommand

func NewFileServerCommand() *FileServerCommand

func (*FileServerCommand) Run

func (*FileServerCommand) Setup

func (s *FileServerCommand) Setup(cmd *cobra.Command)

func (*FileServerCommand) Short

func (s *FileServerCommand) Short() string

Jump to

Keyboard shortcuts

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