console

package
v0.0.0-...-f198145 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FoundationCommands = []inter.Command{
	AppInfo{},
	AppServe{},
	Baker{},
	LogClear{},
	RouteList{},
}

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
}

AppInfo shows the info of the application.

func (AppInfo) Description

func (s AppInfo) Description() string

Description of the command

func (AppInfo) Handle

func (s AppInfo) Handle(c inter.Cli) inter.ExitCode

Handle contains the logic of the command

func (AppInfo) Name

func (s AppInfo) Name() string

Name of the command

type AppServe

type AppServe struct {
	Host string `short:"h" flag:"host" description:"The host address to serve the application on [default: \"127.0.0.1\"]"`
	Port int    `short:"p" flag:"port" description:"The port to serve the application on"`
}

AppServe starts the http server to handle requests.

func (AppServe) Description

func (s AppServe) Description() string

Description of the command

func (AppServe) Handle

func (s AppServe) Handle(c inter.Cli) inter.ExitCode

Handle contains the logic of the command

func (AppServe) Name

func (s AppServe) Name() string

Name of the command

type Baker

type Baker struct{}

func (Baker) Description

func (b Baker) Description() string

func (Baker) Handle

func (b Baker) Handle(c inter.Cli) inter.ExitCode

func (Baker) Name

func (b Baker) Name() string

type Kernel

type Kernel struct {
	App           inter.App
	Writer        io.Writer
	WriterErr     io.Writer
	Commands      []inter.Command
	FlagProviders []func() []flag.Getter // Deprecated: FlagProviders is deprecated and will be removed in version 1.0. Use Getters instead.
	Getters       []flag.Getter          // This list include custom flag.Getters, you can create custom types to cast flags from the command to a value.
}

func (Kernel) GetCommands

func (k Kernel) GetCommands() []inter.Command

func (Kernel) Handle

func (k Kernel) Handle() inter.ExitCode

type LogClear

type LogClear struct{}

func (LogClear) Description

func (l LogClear) Description() string

func (LogClear) Handle

func (l LogClear) Handle(c inter.Cli) inter.ExitCode

func (LogClear) Name

func (l LogClear) Name() string

type RouteList

type RouteList struct {
}

RouteList to give you an example of what a command might look like.

func (RouteList) Description

func (e RouteList) Description() string

func (RouteList) Handle

func (e RouteList) Handle(c inter.Cli) inter.ExitCode

Handle contains the logic of the command

func (RouteList) Name

func (e RouteList) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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