common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BRANCH = "main"
View Source
var COMMIT = "dirty"
View Source
var NAME = "dockit"
View Source
var SUMMARY = "0.4.0-main"
View Source
var VERSION = "0.4.0"

Functions

func GetCommands

func GetCommands() []*cli.Command

GetCommands --

func GetSubcommands

func GetSubcommands(group string) []*cli.Command

func RegisterCommand

func RegisterCommand(command *cli.Command)

RegisterCommand --

func RegisterSubcommand

func RegisterSubcommand(group string, command *cli.Command)

Types

type AppVersionInfo

type AppVersionInfo struct {
	Name    string
	Version string
	Branch  string
	Summary string
	Commit  string
}

AppVersionInfo --

var AppVersion AppVersionInfo

AppVersion --

type Commander

type Commander interface {
	Execute(c *cli.Context)
}

Commander --

type ContextKey

type ContextKey string
const ContextKeyDb ContextKey = "db"

ContextKeyDb is used to set context value for db

const ContextKeyNode ContextKey = "node"

ContextKeyNode is used to set context value for node/snowflake

const ContextKeyWebsocket ContextKey = "websocket"

ContextKeyWebsocket is used to set context value for passing websocket

const ContextReqIDKey ContextKey = "reqid"

Common Constants, mostly for annotations

Jump to

Keyboard shortcuts

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