caplets

package
v2.13.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package caplets contains functions to enumerate, load and execute caplets.

Index

Constants

View Source
const (
	EnvVarName     = "CAPSPATH"
	Suffix         = ".cap"
	InstallArchive = "https://github.com/bettercap/caplets/archive/master.zip"
	InstallBase    = "/usr/local/share/bettercap/"
)

Variables

View Source
var (
	InstallPathArchive = filepath.Join(InstallBase, "caplets-master")
	InstallPath        = filepath.Join(InstallBase, "caplets")

	LoadPaths = []string{
		"./",
		"./caplets/",
		InstallPath,
	}
)

Functions

This section is empty.

Types

type Caplet

type Caplet struct {
	Name string
	Path string
	Size int64
	Code []string
}

func List

func List() []Caplet

func Load

func Load(name string) (error, *Caplet)

func (*Caplet) Eval

func (cap *Caplet) Eval(argv []string, lineCb func(line string) error) error

Jump to

Keyboard shortcuts

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