shellguard

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allowed

func Allowed(g Guard, name string, args ...string) bool

func Check

func Check(g Guard, name string, args ...string) error

Types

type Guard

type Guard struct {
	Rules map[string]Rule
}

func Allow

func Allow(g Guard, binary string, subcommands []string) Guard

func AllowAny

func AllowAny(g Guard, binary string) Guard

func New

func New() Guard

func WithArgValidator

func WithArgValidator(g Guard, binary string, validator func([]string) error) Guard

type Rule

type Rule struct {
	Subcommands   map[string]bool
	AnySubcommand bool
	ArgValidator  func([]string) error
}

Jump to

Keyboard shortcuts

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