models

module
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0

README

models

A collection of Golang packages with models for connectivity and network resources

Packages

  • interval - A canonical representation of a set of intervals defined over integers
  • ipblock - A canonical representation of a set of IP ranges. Currently limited to IPv4
  • hypercube - A canonical representation of a set of n-dimensional hypercubes. All dimensions are defined over integers.
  • netp - Various structs for representing and handling common network protocols (TCP, UDP, ICMP)
  • connection - A canonical representation of a set of connections. E.g., for representing all protocols/ports/codes permitted by a given firewall, given a specific source and destination.
  • spec - A collection of structs for defining required connectivity. Automatically generated from a JSON schema (see below).

Code generation

spec_schema.json is the JSON schema for the input to VPC-synthesis. The data model in pkg/spec is auto-generated from this file using the below procedure.

Install atombender/go-jsonschema (important: not xeipuuv/gojsonschema)

go get github.com/atombender/go-jsonschema/...
go install github.com/atombender/go-jsonschema@latest

Then run

make generate

The result is written into pkg/spec/data_model.go.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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