anchor

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnchorsResourcesFromMap added in v1.1.0

func GetAnchorsResourcesFromMap(patternMap map[string]interface{}) (map[string]interface{}, map[string]interface{})

func IsAddingAnchor

func IsAddingAnchor(key string) bool

func IsConditionAnchor

func IsConditionAnchor(str string) bool

func IsEqualityAnchor

func IsEqualityAnchor(str string) bool

func IsExistanceAnchor

func IsExistanceAnchor(str string) bool

func IsNegationAnchor

func IsNegationAnchor(str string) bool

Types

type ConditionAnchorHandler added in v1.1.0

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

ConditionAnchorHandler provides handler for condition anchor

func (ConditionAnchorHandler) Handle added in v1.1.0

func (ch ConditionAnchorHandler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

Handle processed condition anchor

type DefaultHandler added in v1.1.0

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

DefaultHandler provides handler for non anchor element

func (DefaultHandler) Handle added in v1.1.0

func (dh DefaultHandler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

Handle process non anchor element

type EqualityHandler added in v1.1.0

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

EqualityHandler provides handler for non anchor element

func (EqualityHandler) Handle added in v1.1.0

func (eh EqualityHandler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

Handle processed condition anchor

type ExistanceHandler added in v1.1.0

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

ExistanceHandler provides handlers to process exitence anchor handler

func (ExistanceHandler) Handle added in v1.1.0

func (eh ExistanceHandler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

Handle processes the existence anchor handler

type IsAnchor

type IsAnchor func(str string) bool

Anchor function type

type NegationHandler added in v1.1.0

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

NegationHandler provides handler for check if the tag in anchor is not defined

func (NegationHandler) Handle added in v1.1.0

func (nh NegationHandler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

Handle process negation handler

type ValidationHandler added in v1.1.0

type ValidationHandler interface {
	Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)
}

ValidationHandler for element processes

func CreateElementHandler added in v1.1.0

func CreateElementHandler(element string, pattern interface{}, path string) ValidationHandler

CreateElementHandler factory to process elements

func NewConditionAnchorHandler added in v1.1.0

func NewConditionAnchorHandler(anchor string, pattern interface{}, path string) ValidationHandler

NewConditionAnchorHandler returns an instance of condition acnhor handler

func NewDefaultHandler added in v1.1.0

func NewDefaultHandler(element string, pattern interface{}, path string) ValidationHandler

NewDefaultHandler returns handler for non anchor elements

func NewEqualityHandler added in v1.1.0

func NewEqualityHandler(anchor string, pattern interface{}, path string) ValidationHandler

NewEqualityHandler returens instance of equality handler

func NewExistanceHandler added in v1.1.0

func NewExistanceHandler(anchor string, pattern interface{}, path string) ValidationHandler

NewExistanceHandler returns existence handler

func NewNegationHandler added in v1.1.0

func NewNegationHandler(anchor string, pattern interface{}, path string) ValidationHandler

NewNegationHandler returns instance of negation handler

Jump to

Keyboard shortcuts

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