Documentation
¶
Index ¶
- type AnyProtocol
- type AnyProtocolProtocol
- type Icmp
- type IcmpProtocol
- type Protocol
- type ProtocolList
- type Resource
- type ResourceType
- type Segment
- type SegmentType
- type Spec
- type SpecExternals
- type SpecInstances
- type SpecNifs
- type SpecRequiredConnectionsElem
- type SpecSegments
- type SpecSubnets
- type TcpUdp
- type TcpUdpProtocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyProtocol ¶
type AnyProtocol struct { // Necessarily ANY Protocol AnyProtocolProtocol `json:"protocol"` }
func (*AnyProtocol) UnmarshalJSON ¶
func (j *AnyProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type AnyProtocolProtocol ¶
type AnyProtocolProtocol string
const AnyProtocolProtocolANY AnyProtocolProtocol = "ANY"
func (*AnyProtocolProtocol) UnmarshalJSON ¶
func (j *AnyProtocolProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Icmp ¶
type Icmp struct { // ICMP code allowed. If omitted, any code is allowed Code *int `json:"code,omitempty"` // Necessarily ICMP Protocol IcmpProtocol `json:"protocol"` // ICMP type allowed. If omitted, any type is allowed Type *int `json:"type,omitempty"` }
func (*Icmp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type IcmpProtocol ¶
type IcmpProtocol string
const IcmpProtocolICMP IcmpProtocol = "ICMP"
func (*IcmpProtocol) UnmarshalJSON ¶
func (j *IcmpProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ProtocolList ¶
type ProtocolList []interface{}
type Resource ¶
type Resource struct { // Name of resource Name string `json:"name"` // Type of resource Type ResourceType `json:"type"` }
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type ResourceType ¶
type ResourceType string
const ResourceTypeCidr ResourceType = "cidr"
const ResourceTypeExternal ResourceType = "external"
const ResourceTypeInstance ResourceType = "instance"
const ResourceTypeNif ResourceType = "nif"
const ResourceTypeSegment ResourceType = "segment"
const ResourceTypeSubnet ResourceType = "subnet"
const ResourceTypeVpe ResourceType = "vpe"
func (*ResourceType) UnmarshalJSON ¶
func (j *ResourceType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Segment ¶ added in v0.4.0
type Segment struct { // All items are of the type specified in the type property, identified by name Items []string `json:"items"` // The type of the elements inside the segment Type SegmentType `json:"type"` }
A segment is a named collection of resources of the same type (subnet, cidr, instance, or nif)
func (*Segment) UnmarshalJSON ¶ added in v0.4.0
UnmarshalJSON implements json.Unmarshaler.
type SegmentType ¶ added in v0.4.0
type SegmentType string
const SegmentTypeCidr SegmentType = "cidr"
const SegmentTypeInstance SegmentType = "instance"
const SegmentTypeNif SegmentType = "nif"
const SegmentTypeSubnet SegmentType = "subnet"
const SegmentTypeVpe SegmentType = "vpe"
func (*SegmentType) UnmarshalJSON ¶ added in v0.4.0
func (j *SegmentType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Spec ¶
type Spec struct { // Externals are a way for users to name CIDRs external to the VPC. These are // later used in src/dst definitions Externals SpecExternals `json:"externals,omitempty"` // Lightweight way to define instance as a list of interfaces. Instances SpecInstances `json:"instances,omitempty"` // Lightweight way to define network interfaces. Nifs SpecNifs `json:"nifs,omitempty"` // A list of required connections RequiredConnections []SpecRequiredConnectionsElem `json:"required-connections"` // Segments are a way for users to create aggregations. These can later be used in // src/dst fields Segments SpecSegments `json:"segments,omitempty"` // Lightweight way to define subnets. Subnets SpecSubnets `json:"subnets,omitempty"` }
func (*Spec) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type SpecExternals ¶
Externals are a way for users to name CIDRs external to the VPC. These are later used in src/dst definitions
type SpecInstances ¶
Lightweight way to define instance as a list of interfaces.
type SpecRequiredConnectionsElem ¶
type SpecRequiredConnectionsElem struct { // List of allowed protocols AllowedProtocols ProtocolList `json:"allowed-protocols,omitempty"` // If true, allow both connections from src to dst and connections from dst to src Bidirectional bool `json:"bidirectional,omitempty"` // In unidirectional connection, this is the ingress resource Dst Resource `json:"dst"` // In unidirectional connection, this is the egress resource Src Resource `json:"src"` }
func (*SpecRequiredConnectionsElem) UnmarshalJSON ¶
func (j *SpecRequiredConnectionsElem) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SpecSegments ¶
Segments are a way for users to create aggregations. These can later be used in src/dst fields
type TcpUdp ¶
type TcpUdp struct { // Maximal destination port; default is 65535 MaxDestinationPort int `json:"max_destination_port,omitempty"` // Maximal source port; default is 65535. Unsupported in vpc synthesis MaxSourcePort int `json:"max_source_port,omitempty"` // Minimal destination port; default is 1 MinDestinationPort int `json:"min_destination_port,omitempty"` // Minimal source port; default is 1. Unsupported in vpc synthesis MinSourcePort int `json:"min_source_port,omitempty"` // Is it TCP or UDP Protocol TcpUdpProtocol `json:"protocol"` }
func (*TcpUdp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type TcpUdpProtocol ¶
type TcpUdpProtocol string
const TcpUdpProtocolTCP TcpUdpProtocol = "TCP"
const TcpUdpProtocolUDP TcpUdpProtocol = "UDP"
func (*TcpUdpProtocol) UnmarshalJSON ¶
func (j *TcpUdpProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.