MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / NewValidator

Function NewValidator

internal/plugins/command-runner/validator.go:23–27  ·  view source on GitHub ↗

NewValidator creates a new command validator

(config Config)

Source from the content-addressed store, hash-verified

21
22// NewValidator creates a new command validator
23func NewValidator(config Config) *Validator {
24 return &Validator{
25 config: config,
26 }
27}
28
29// ValidateCommand checks if a command is allowed for the given target type
30func (v *Validator) ValidateCommand(targetType TargetType, command string) error {

Callers 5

NewExecutorFunction · 0.85
AddToWhitelistMethod · 0.85

Calls

no outgoing calls