types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppVersion = "v0.2.0"

	DefaultMaxSequences = 32

	DefaultAttributeTTL int = 3600 * 24 // 1 day
)

Variables

View Source
var (
	ErrInvalidOption = AsConfigErr(goerr.New("invalid option"))
	ErrNoPolicyData  = AsConfigErr(goerr.New("no policy data"))

	ErrActionInvalidArgument = AsPolicyErr(goerr.New("invalid action argument"))
	ErrActionNotFound        = AsPolicyErr(goerr.New("action not found"))
	ErrActionFailed          = AsPolicyErr(goerr.New("action failed"))

	ErrInvalidScenario = goerr.New("invalid play scenario")

	ErrInvalidHTTPRequest   = AsBadRequestErr(goerr.New("invalid HTTP request"))
	ErrInvalidLambdaRequest = AsBadRequestErr(goerr.New("invalid Lambda request"))

	ErrNoPolicyResult = goerr.New("no policy result")
)

Functions

func AsActionErr

func AsActionErr(err *goerr.Error) *goerr.Error

func AsBadRequestErr

func AsBadRequestErr(err *goerr.Error) *goerr.Error

func AsConfigErr

func AsConfigErr(err *goerr.Error) *goerr.Error

func AsPolicyErr

func AsPolicyErr(err *goerr.Error) *goerr.Error

func AsRuntimeErr

func AsRuntimeErr(err *goerr.Error) *goerr.Error

Types

type ActionID

type ActionID string

func NewActionID

func NewActionID() ActionID

type ActionName

type ActionName string

type ActionSecret

type ActionSecret any

type AlertID

type AlertID string

func NewAlertID

func NewAlertID() AlertID

func (AlertID) String

func (x AlertID) String() string

type AttrID

type AttrID string

func NewAttrID

func NewAttrID() AttrID

func (AttrID) String

func (x AttrID) String() string

type AttrKey

type AttrKey string

func (AttrKey) String

func (x AttrKey) String() string

type AttrTTL

type AttrTTL int64

type AttrType

type AttrType string
const (
	IPAddr     AttrType = "ipaddr"
	DomainName AttrType = "domain"
	FileSha256 AttrType = "file.sha256"
	FileSha512 AttrType = "file.sha512"
	MarkDown   AttrType = "markdown"
)

type AttrValue

type AttrValue any

type EnvVarName

type EnvVarName string

type EnvVarValue

type EnvVarValue string

type EnvVars

type EnvVars map[EnvVarName]EnvVarValue

EnvVars is a set of environment variables

type ErrorType

type ErrorType int
const (
	ErrTypeUnknown ErrorType = iota
	ErrTypeConfig
	ErrTypePolicy
	ErrTypeAction
	ErrTypeRuntime
	ErrTypeBadRequest
)

func GetErrorType

func GetErrorType(err error) ErrorType

type Namespace

type Namespace string

type RawData

type RawData any

type ScenarioID

type ScenarioID string

type ScenarioTitle

type ScenarioTitle string

type Schema

type Schema string

type WorkflowID

type WorkflowID string

func NewWorkflowID

func NewWorkflowID() WorkflowID

func (WorkflowID) String

func (x WorkflowID) String() string

Jump to

Keyboard shortcuts

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