caveatflag

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package caveatflag provides support for specifying caveats via command line flags and for creating caveats via their VDL type and values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(caveatInfos []Statement) ([]security.Caveat, error)

Types

type Flag

type Flag struct {
	// contains filtered or unexported fields
}

Flag defines a flag.Value for receiving multiple caveat definitions.

func (Flag) Compile

func (c Flag) Compile() ([]security.Caveat, error)

Compile will compile the caveat statements captured by the flags to create caveats.

func (Flag) Get

func (c Flag) Get() interface{}

Implements flag.Value.Get

func (*Flag) Set

func (c *Flag) Set(s string) error

Implements flag.Value.Set Set expects s to be of the form: caveatExpr=VDLExpressionOfParam

func (Flag) String

func (c Flag) String() string

Implements flag.Value.String

type Statement

type Statement struct {
	Expr, Params string
}

Statement represents a single caveat statement.

Jump to

Keyboard shortcuts

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