actions

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHalt = errors.New("interrupt")
)
View Source
var ServerLog *logrus

Functions

func HTTPConfigDecodeHook

func HTTPConfigDecodeHook(from, to reflect.Value) (interface{}, error)

func Run

func Run(ctx context.Context, ctxParam contextFields, apiParam apiFields, script, name string, opts ...Option) error

func SetContextFields

func SetContextFields(opts ...FieldOption) contextFields

func SetHTTPConfig

func SetHTTPConfig(config *HTTPConfig)

func WithAPIFields

func WithAPIFields(opts ...FieldOption) apiFields

Types

type AddressChecker

type AddressChecker interface {
	Matches(string) bool
}

func NewIPChecker

func NewIPChecker(i string) (AddressChecker, error)

type Config

type Config struct {
	HTTP HTTPConfig
}

type DomainChecker

type DomainChecker struct {
	Domain string
}

func (*DomainChecker) Matches

func (c *DomainChecker) Matches(domain string) bool

type FieldConfig

type FieldConfig struct {
	Runtime *goja.Runtime
	// contains filtered or unexported fields
}

type FieldOption

type FieldOption func(*FieldConfig)

func SetFields

func SetFields(name string, values ...interface{}) FieldOption

type HTTP

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

type HTTPConfig

type HTTPConfig struct {
	DenyList []AddressChecker
}

type IPChecker

type IPChecker struct {
	Net *net.IPNet
	IP  net.IP
}

func (*IPChecker) Matches

func (c *IPChecker) Matches(address string) bool

type Option

type Option func(*runConfig)

func ActionToOptions

func ActionToOptions(a *query.Action) []Option

func WithAllowedToFail

func WithAllowedToFail() Option

func WithHTTP

func WithHTTP(ctx context.Context) Option

func WithLogger

func WithLogger(logger console.Printer) Option

type UserGrant

type UserGrant struct {
	ProjectID      string
	ProjectGrantID string
	Roles          []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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