gobgptoolbox

package module
v0.0.0-...-c76bcfd Latest Latest
Warning

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

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

README

gobgptoolbox

Helper functions to convert objects from humanly readable format like string into inhuman formats like any.any

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalPrefixSID

func MarshalPrefixSID(psid *prefixsid.PSid) []*any.Any

MarshalPrefixSID marshals Prefix SID object into a slice of protobuf's anytype

func MarshalRD

func MarshalRD(rd bgp.RouteDistinguisherInterface) *any.Any

MarshalRD marshals Route Distinguisher into Proto Any format

func MarshalRDFromString

func MarshalRDFromString(rd string) (*any.Any, error)

MarshalRDFromString marshals Route Distinguisher into Protobuf Any.any format

func MarshalRT

func MarshalRT(rt bgp.ExtendedCommunityInterface) *any.Any

MarshalRT marshals Route Target into Proto Any format

func MarshalRTFromString

func MarshalRTFromString(rt string) (*any.Any, error)

MarshalRTFromString marshals Route Target into Protobuf Any.any format

func MarshalRTs

func MarshalRTs(rts []bgp.ExtendedCommunityInterface) []*any.Any

MarshalRTs marshals slice of Route Targets into Proto Any format

func MarshalSRv6SubSubTLVs

func MarshalSRv6SubSubTLVs(stlvs map[uint8][]srv6.SubSubTLV) map[uint32]*api.SRv6TLV

MarshalSRv6SubSubTLVs marshals SRv6 SubSubTLV map into a native protobuf map of TLVs

func MarshalSRv6SubTLVs

func MarshalSRv6SubTLVs(tlvs map[uint8][]srv6.SubTLV) map[uint32]*api.SRv6TLV

MarshalSRv6SubTLVs marshals SRv6 SubTLV map into a native protobuf map of TLVs

func RDValidator

func RDValidator(rd string) error

RDValidator validates Route Distinguisher stored in string

func RTValidator

func RTValidator(rt string) error

RTValidator validates Route Target stored in string

func UnmarshalPrefixSID

func UnmarshalPrefixSID(svcs []*any.Any) (*prefixsid.PSid, error)

UnmarshalPrefixSID unmarshals a slice of protobuf's anytype in Prefix SID object

func UnmarshalRD

func UnmarshalRD(rd *any.Any) (bgp.RouteDistinguisherInterface, error)

UnmarshalRD unmarshals Route Distinguisher from Proto message

func UnmarshalRT

func UnmarshalRT(rts []*any.Any) ([]bgp.ExtendedCommunityInterface, error)

UnmarshalRT unmarshals Route Target extended community from Proto message

func UnmarshalSRv6SubSubTLVs

func UnmarshalSRv6SubSubTLVs(stlvs map[uint32]*api.SRv6TLV) (map[uint8][]srv6.SubSubTLV, error)

UnmarshalSRv6SubSubTLVs unmarshals a native protobuf map of TLVs into SRv6 SubSubTLV map

func UnmarshalSRv6SubTLVs

func UnmarshalSRv6SubTLVs(stlvs map[uint32]*api.SRv6TLV) (map[uint8][]srv6.SubTLV, error)

UnmarshalSRv6SubTLVs unmarshals a native protobuf map of TLVs into SRv6 SubTLV map

Types

This section is empty.

Jump to

Keyboard shortcuts

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