extensions

package
v1.0.0-rc.58 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMissingParams

func FindMissingParams(command types.CommandSpec, params map[string]any) []types.Param

func HasMissingParams

func HasMissingParams(command types.CommandSpec, params map[string]any) bool

func IsRootCommand

func IsRootCommand(command types.CommandSpec) bool

Types

type Extension

type Extension struct {
	types.Manifest
	Entrypoint string
}

func (Extension) Cmd

func (e Extension) Cmd(commandName string, input types.CommandInput) (*exec.Cmd, error)

func (Extension) Command

func (e Extension) Command(name string) (types.CommandSpec, bool)

func (Extension) RootCommands

func (e Extension) RootCommands() []types.CommandSpec

func (Extension) Run

func (ext Extension) Run(command string, input types.CommandInput) ([]byte, error)

type ExtensionMap

type ExtensionMap map[string]Extension

type ExtensionType

type ExtensionType string
const (
	ExtensionTypeLocal ExtensionType = "local"
	ExtensionTypeGit   ExtensionType = "git"
	ExtensionTypeHttp  ExtensionType = "http"
)

type Metadata

type Metadata struct {
	Type       ExtensionType `json:"type"`
	Origin     string        `json:"origin"`
	Entrypoint string        `json:"entrypoint"`
}

Jump to

Keyboard shortcuts

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