data_messages

package
v0.0.0-...-dd13c3c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAclValidator

func GetAclValidator(blockerType string) aclValidator

Return mitigation scope validator by input blocker type (goBgpScopeValidator or goAristaScopeValidator)

func GetAliasValidator

func GetAliasValidator(blockerType string) aliasValidator

Return mitigation scope validator by input blocker type (goBgpScopeValidator or goAristaScopeValidator)

func ToMap

func ToMap(src interface{}, content Content) (map[string]interface{}, error)

func ValidateVendorMapping

func ValidateVendorMapping(req *VendorMappingRequest) (errMsg string)

Validate vendor-mapping (Post/Put request)

func ValidateWithVendorId

func ValidateWithVendorId(vendorId int, req *VendorMappingRequest) (errMsg string)

Validate with vendor-id (Put request)

Types

type ACLsRequest

type ACLsRequest struct {
	ACLs types.ACLs `json:"ietf-dots-data-channel:acls"`
}

type ACLsResponse

type ACLsResponse struct {
	ACLs types.ACLs `json:"ietf-dots-data-channel:acls"`
}

type AliasesRequest

type AliasesRequest struct {
	Aliases types.Aliases `json:"ietf-dots-data-channel:aliases"`
}

type AliasesResponse

type AliasesResponse struct {
	Aliases types.Aliases `json:"ietf-dots-data-channel:aliases"`
}

type CapabilitiesResponse

type CapabilitiesResponse struct {
	Capabilities data_types.Capabilities `json:"ietf-dots-data-channel:capabilities" yang:"nonconfig"`
}

type ClientRequest

type ClientRequest struct {
	DotsClient []types.DotsClient `json:"ietf-dots-data-channel:dots-client"`
}

func (*ClientRequest) Validate

func (r *ClientRequest) Validate() (bool, string)

func (*ClientRequest) ValidateWithCuid

func (r *ClientRequest) ValidateWithCuid(cuid string) (bool, string)

type ClientResponse

type ClientResponse struct {
	DotsClient types.DotsClient `json:"ietf-dots-data-channel:dots-client"`
}

type Content

type Content string
const (
	Content_Config    Content = "config"
	Content_NonConfig Content = "nonconfig"
	Content_All       Content = "all"
)

func ContentFromRequest

func ContentFromRequest(r *http.Request) (Content, error)

type PostRequest

type PostRequest struct {
	Aliases       *types.Aliases       `json:"ietf-dots-data-channel:aliases"`
	ACLs          *types.ACLs          `json:"ietf-dots-data-channel:acls"`
	VendorMapping *types.VendorMapping `json:"ietf-dots-mapping:vendor-mapping"`
}

func (*PostRequest) ValidateExtract

func (r *PostRequest) ValidateExtract(method string, customer *models.Customer) (interface{}, error)

type VendorMappingRequest

type VendorMappingRequest struct {
	VendorMapping types.VendorMapping `json:"ietf-dots-mapping:vendor-mapping"`
}

type VendorMappingResponse

type VendorMappingResponse struct {
	VendorMapping types.VendorMapping `json:"ietf-dots-mapping:vendor-mapping"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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