adapter

package
v3.0.0-beta.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSADescriptor

func NewSADescriptor(typedDescriptor *SADescriptor) *KVDescriptor

func NewSPDDescriptor

func NewSPDDescriptor(typedDescriptor *SPDDescriptor) *KVDescriptor

func NewSPDInterfaceDescriptor

func NewSPDInterfaceDescriptor(typedDescriptor *SPDInterfaceDescriptor) *KVDescriptor

func NewSPDPolicyDescriptor

func NewSPDPolicyDescriptor(typedDescriptor *SPDPolicyDescriptor) *KVDescriptor

Types

type SADescriptor

type SADescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityAssociation) error
	Create               func(key string, value *vpp_ipsec.SecurityAssociation) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityAssociation, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityAssociation, metadata interface{}) bool
	Retrieve             func(correlate []SAKVWithMetadata) ([]SAKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityAssociation) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityAssociation) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SADescriptorAdapter

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

func (*SADescriptorAdapter) Create

func (da *SADescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SADescriptorAdapter) Delete

func (da *SADescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SADescriptorAdapter) Dependencies

func (da *SADescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SADescriptorAdapter) DerivedValues

func (da *SADescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SADescriptorAdapter) Retrieve

func (da *SADescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SADescriptorAdapter) Update

func (da *SADescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SADescriptorAdapter) UpdateWithRecreate

func (da *SADescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SADescriptorAdapter) Validate

func (da *SADescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SADescriptorAdapter) ValueComparator

func (da *SADescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SAKVWithMetadata

type SAKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityAssociation
	Metadata interface{}
	Origin   ValueOrigin
}

type SPDDescriptor

type SPDDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicyDatabase) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicyDatabase) (metadata *idxvpp.OnlyIndex, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicyDatabase, metadata *idxvpp.OnlyIndex) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase, oldMetadata *idxvpp.OnlyIndex) (newMetadata *idxvpp.OnlyIndex, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase, metadata *idxvpp.OnlyIndex) bool
	Retrieve             func(correlate []SPDKVWithMetadata) ([]SPDKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicyDatabase) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicyDatabase) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDDescriptorAdapter

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

func (*SPDDescriptorAdapter) Create

func (da *SPDDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDDescriptorAdapter) Delete

func (da *SPDDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDDescriptorAdapter) Dependencies

func (da *SPDDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDDescriptorAdapter) DerivedValues

func (da *SPDDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDDescriptorAdapter) Retrieve

func (da *SPDDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDDescriptorAdapter) Update

func (da *SPDDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDDescriptorAdapter) UpdateWithRecreate

func (da *SPDDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDDescriptorAdapter) Validate

func (da *SPDDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDDescriptorAdapter) ValueComparator

func (da *SPDDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPDInterfaceDescriptor

type SPDInterfaceDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_Interface, metadata interface{}) bool
	Retrieve             func(correlate []SPDInterfaceKVWithMetadata) ([]SPDInterfaceKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicyDatabase_Interface) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDInterfaceDescriptorAdapter

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

func (*SPDInterfaceDescriptorAdapter) Create

func (da *SPDInterfaceDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDInterfaceDescriptorAdapter) Delete

func (da *SPDInterfaceDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDInterfaceDescriptorAdapter) Dependencies

func (da *SPDInterfaceDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDInterfaceDescriptorAdapter) DerivedValues

func (da *SPDInterfaceDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDInterfaceDescriptorAdapter) Retrieve

func (da *SPDInterfaceDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDInterfaceDescriptorAdapter) Update

func (da *SPDInterfaceDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDInterfaceDescriptorAdapter) UpdateWithRecreate

func (da *SPDInterfaceDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDInterfaceDescriptorAdapter) Validate

func (da *SPDInterfaceDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDInterfaceDescriptorAdapter) ValueComparator

func (da *SPDInterfaceDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPDInterfaceKVWithMetadata

type SPDInterfaceKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicyDatabase_Interface
	Metadata interface{}
	Origin   ValueOrigin
}

type SPDKVWithMetadata

type SPDKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicyDatabase
	Metadata *idxvpp.OnlyIndex
	Origin   ValueOrigin
}

type SPDPolicyDescriptor

type SPDPolicyDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry) error
	Create               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry, metadata interface{}) bool
	Retrieve             func(correlate []SPDPolicyKVWithMetadata) ([]SPDPolicyKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry) []KeyValuePair
	Dependencies         func(key string, value *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type SPDPolicyDescriptorAdapter

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

func (*SPDPolicyDescriptorAdapter) Create

func (da *SPDPolicyDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*SPDPolicyDescriptorAdapter) Delete

func (da *SPDPolicyDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*SPDPolicyDescriptorAdapter) Dependencies

func (da *SPDPolicyDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*SPDPolicyDescriptorAdapter) DerivedValues

func (da *SPDPolicyDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*SPDPolicyDescriptorAdapter) Retrieve

func (da *SPDPolicyDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*SPDPolicyDescriptorAdapter) Update

func (da *SPDPolicyDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*SPDPolicyDescriptorAdapter) UpdateWithRecreate

func (da *SPDPolicyDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*SPDPolicyDescriptorAdapter) Validate

func (da *SPDPolicyDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*SPDPolicyDescriptorAdapter) ValueComparator

func (da *SPDPolicyDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type SPDPolicyKVWithMetadata

type SPDPolicyKVWithMetadata struct {
	Key      string
	Value    *vpp_ipsec.SecurityPolicyDatabase_PolicyEntry
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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