console

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 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 added in v0.10.2

type AppInfo struct {
}

AppInfo shows the info of the application.

func (AppInfo) Description added in v0.10.2

func (s AppInfo) Description() string

Description of the command

func (AppInfo) Handle added in v0.10.2

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

Handle contains the logic of the command

func (AppInfo) Name added in v0.10.2

func (s AppInfo) Name() string

Name of the command

type AppServe added in v0.8.2

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 added in v0.8.2

func (s AppServe) Description() string

Description of the command

func (AppServe) Handle added in v0.8.2

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

Handle contains the logic of the command

func (AppServe) Name added in v0.8.2

func (s AppServe) Name() string

Name of the command

type Baker added in v0.5.4

type Baker struct{}

func (Baker) Description added in v0.5.4

func (b Baker) Description() string

func (Baker) Handle added in v0.5.4

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

func (Baker) Name added in v0.5.4

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 added in v0.5.4

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 added in v0.11.0

type RouteList struct {
}

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

func (RouteList) Description added in v0.11.0

func (e RouteList) Description() string

func (RouteList) Handle added in v0.11.0

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

Handle contains the logic of the command

func (RouteList) Name added in v0.11.0

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