cmdbiz

package
v0.0.0-...-9c55465 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Kas kite command alias map data

View Source
var ProxyCC = &ProxyCmdConf{}

ProxyCC instance

Functions

func RunAny

func RunAny(name string, args []string, ctx *kscript.RunCtx) error

RunAny handle. will try alias, script, plugin, system-cmd ...

func RunKiteCmdByAlias

func RunKiteCmdByAlias(name string, inArgs []string) error

RunKiteCmdByAlias handle

Types

type CommonOpts

type CommonOpts struct {
	Proxy   bool
	DryRun  bool `flag:"name=dry-run;desc=run workflow, but dont real execute command;shorts=dry"`
	Confirm bool
	Workdir string
	GitHost string
}

CommonOpts some common vars struct

func (*CommonOpts) BindCommonFlags

func (co *CommonOpts) BindCommonFlags(c *gcli.Command)

BindCommonFlags for some git commands

func (*CommonOpts) BindProxyConfirm

func (co *CommonOpts) BindProxyConfirm(c *gcli.Command)

BindProxyConfirm flags for some cli commands

func (*CommonOpts) BindWorkdirDryRun

func (co *CommonOpts) BindWorkdirDryRun(c *gcli.Command)

BindWorkdirDryRun flags for some cli commands

type ProxyCmdConf

type ProxyCmdConf struct {
	// CommandIds eg: [git, git:clone, git:tag:*]
	CommandIds []string `json:"command_ids"`
	// GroupLimits eg: {github: {acp, update}}
	GroupLimits map[string][]string `json:"group_limits"`
}

ProxyCmdConf struct

func (*ProxyCmdConf) AutoSetByCmd

func (pcc *ProxyCmdConf) AutoSetByCmd(c *gcli.Command)

AutoSetByCmd handle

func (*ProxyCmdConf) AutoSetByName

func (pcc *ProxyCmdConf) AutoSetByName(group, sub string, args []string)

AutoSetByName handle

func (*ProxyCmdConf) IsMatchCmd

func (pcc *ProxyCmdConf) IsMatchCmd(c *gcli.Command) bool

IsMatchCmd by config

func (*ProxyCmdConf) IsMatchName

func (pcc *ProxyCmdConf) IsMatchName(group, sub string, args []string) bool

IsMatchName by config

Jump to

Keyboard shortcuts

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