types

package
v0.0.0-...-57b77a8 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionLabel = "condition"
	OrCondition    = "OR"
	AndCondition   = "AND"
	Separator      = ":"
)
View Source
const (
	AccountType       = "Account"
	RegionType        = "Region"
	VPCType           = "VPC"
	InstanceType      = "Instance"
	SubnetType        = "Subnet"
	ACLType           = "ACL"
	SecurityGroupType = "SecurityGroup"
	RouteTableType    = "RouteTable"
	NATGatewayType    = "NATGateway"
	RouterType        = "Router"
	IGWType           = "IGW"
	VPCEndpointType   = "VPCEndpoint"
	ClusterType       = "Cluster"
	PodsType          = "Pod"
	K8sServiceType    = "K8sService"
	K8sNodeType       = "K8sNode"
	NamespaceType     = "Namespace"
)

Variables

This section is empty.

Functions

func CloudID

func CloudID(provider, id string) string

func KubernetesID

func KubernetesID(cluster, namespace, name string) string

func SyncTimeKey

func SyncTimeKey(provider string, typ string) string

func SyncTimeKeyDecode

func SyncTimeKeyDecode(s string) (provider, type_ string, err error)

Types

type ACL

type ACL struct {
	Name         string
	ID           string
	Provider     string
	VpcID        string
	Region       string
	Labels       map[string]string
	AccountID    string
	Rules        []ACLRule
	LastSyncTime string
}

func (*ACL) DbId

func (v *ACL) DbId() string

func (*ACL) GetProvider

func (v *ACL) GetProvider() string

func (*ACL) SetSyncTime

func (v *ACL) SetSyncTime(time string)

type ACLRule

type ACLRule struct {
	Number            int
	Protocol          string
	PortRange         string
	SourceRanges      []string
	DestinationRanges []string
	Action            string
	Direction         string
}

type Account

type Account struct {
	Name         string
	ID           string
	Provider     string
	LastSyncTime string
}

type Cluster

type Cluster struct {
	Name         string
	FullName     string
	Arn          string
	VpcID        string
	Region       string
	Project      string
	Labels       map[string]string
	Provider     string
	AccountID    string
	Id           string
	LastSyncTime string
}

func (*Cluster) DbId

func (v *Cluster) DbId() string

func (*Cluster) GetProvider

func (v *Cluster) GetProvider() string

func (*Cluster) SetSyncTime

func (v *Cluster) SetSyncTime(time string)

type DestinationDetails

type DestinationDetails struct {
	Provider string
	VPC      string
	Region   string
}

type IGW

type IGW struct {
	ID            string                 `json:"id,omitempty"`
	Name          string                 `json:"name,omitempty"`
	Provider      string                 `json:"provider,omitempty"`
	AccountId     string                 `json:"account_id,omitempty"`
	AttachedVpcId string                 `json:"attached_vpc_id,omitempty"` //
	Region        string                 `json:"region,omitempty"`          // VPC Region
	State         string                 `json:"state,omitempty"`
	Labels        map[string]string      `json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	CreatedAt     *timestamppb.Timestamp `json:"created_at,omitempty"`
	UpdatedAt     *timestamppb.Timestamp `json:"updated_at,omitempty"`
	LastSyncTime  string                 `json:"last_sync_time,omitempty"`
}

func (*IGW) DbId

func (v *IGW) DbId() string

func (*IGW) GetProvider

func (v *IGW) GetProvider() string

func (*IGW) SetSyncTime

func (v *IGW) SetSyncTime(time string)

type Instance

type Instance struct {
	ID           string
	Name         string
	PublicIP     string
	PrivateIP    string
	SubnetID     string
	VPCID        string
	Labels       map[string]string
	State        string
	Region       string
	Zone         string
	Provider     string
	AccountID    string
	Type         string
	LastSyncTime string
}

func (Instance) DbId

func (v Instance) DbId() string

func (*Instance) GetProvider

func (v *Instance) GetProvider() string

func (*Instance) SetSyncTime

func (v *Instance) SetSyncTime(time string)

type K8SService

type K8SService struct {
	Cluster           string
	Namespace         string
	Name              string
	Type              string
	ProtocolsAndPorts ProtocolsAndPorts
	Ingresses         []K8sServiceIngress
	Labels            map[string]string
	LastSyncTime      string
}

func (*K8SService) DbId

func (v *K8SService) DbId() string

func (*K8SService) GetProvider

func (v *K8SService) GetProvider() string

func (*K8SService) SetSyncTime

func (v *K8SService) SetSyncTime(time string)

type K8sNode

type K8sNode struct {
	Cluster      string
	Name         string
	Namespace    string
	Addresses    []v1.NodeAddress
	Labels       map[string]string
	LastSyncTime string
}

func (*K8sNode) DbId

func (v *K8sNode) DbId() string

func (*K8sNode) GetProvider

func (v *K8sNode) GetProvider() string

func (*K8sNode) SetSyncTime

func (v *K8sNode) SetSyncTime(time string)

type K8sServiceIngress

type K8sServiceIngress struct {
	Hostname string
	IP       string
	Ports    []string
}

type NATGateway

type NATGateway struct {
	ID                   string
	Name                 string            `json:"name,omitempty"`
	Provider             string            `json:"provider,omitempty"`
	AccountId            string            `json:"account_id,omitempty"`
	VpcId                string            `json:"vpc_id,omitempty"`
	Region               string            `json:"region,omitempty"`
	State                string            `json:"state,omitempty"`
	PublicIp             string            `json:"public_ip,omitempty"`
	PrivateIp            string            `json:"private_ip,omitempty"`
	SubnetId             string            `json:"subnet_id,omitempty"`
	Labels               map[string]string `json:"labels,omitempty"`
	CreatedAt            time.Time         `json:"created_at,omitempty"`
	UpdatedAt            time.Time         `json:"updated_at,omitempty"`
	LastSyncTime         string            `json:"last_sync_time,omitempty"`
	AdditionalProperties map[string]string `json:"additional_properties,omitempty"`
}

func (*NATGateway) DbId

func (v *NATGateway) DbId() string

func (*NATGateway) GetProvider

func (v *NATGateway) GetProvider() string

func (*NATGateway) SetSyncTime

func (v *NATGateway) SetSyncTime(time string)

type Namespace

type Namespace struct {
	Cluster      string
	Name         string
	Labels       map[string]string
	LastSyncTime string
}

func (*Namespace) DbId

func (v *Namespace) DbId() string

func (*Namespace) GetProvider

func (v *Namespace) GetProvider() string

func (*Namespace) SetSyncTime

func (v *Namespace) SetSyncTime(time string)

type Pod

type Pod struct {
	Cluster      string
	Namespace    string
	Name         string
	Ip           string
	Labels       map[string]string
	State        string
	LastSyncTime string
}

func (*Pod) DbId

func (v *Pod) DbId() string

func (*Pod) GetProvider

func (v *Pod) GetProvider() string

func (*Pod) SetSyncTime

func (v *Pod) SetSyncTime(time string)

type Ports

type Ports []string

type ProtocolsAndPorts

type ProtocolsAndPorts map[string]Ports

type Region

type Region struct {
	ID           string
	Name         string
	Provider     string
	AccountID    string
	LastSyncTime string
}

func (*Region) DbId

func (r *Region) DbId() string

func (*Region) GetProvider

func (r *Region) GetProvider() string

func (*Region) SetSyncTime

func (r *Region) SetSyncTime(time string)

type Route

type Route struct {
	Name        string
	Destination string
	Status      string
	Target      string
	NextHopType string
	NextHopIP   string
}

type RouteTable

type RouteTable struct {
	Name         string
	ID           string
	Provider     string
	VpcID        string
	Region       string
	Labels       map[string]string
	AccountID    string
	Routes       []Route
	LastSyncTime string
}

func (*RouteTable) DbId

func (v *RouteTable) DbId() string

func (*RouteTable) GetProvider

func (v *RouteTable) GetProvider() string

func (*RouteTable) SetSyncTime

func (v *RouteTable) SetSyncTime(time string)

type Router

type Router struct {
	ID                   string            `json:"id"`
	AccountId            string            `json:"account_id,omitempty"`
	Name                 string            `json:"name"`
	Provider             string            `json:"provider"`
	Region               string            `json:"region"`
	VPCId                string            `json:"vpc_id"`
	State                string            `json:"state"`
	AdvertisedRange      string            `json:"advertised_range"`
	AdvertisedGroup      string            `json:"advertised_group"`
	SubnetId             string            `json:"subnet_id"`
	ASN                  uint32            `json:"asn"`
	CIDRBlock            string            `json:"cidr_block"`
	StaticRoutes         []string          `json:"static_routes"` // Could be a list of CIDR blocks
	VPNType              string            `json:"vpn_type"`
	SecurityGroupIDs     []string          `json:"security_group_ids"` // Security groups or ACLs IDs
	Labels               map[string]string `json:"labels"`
	CreatedAt            time.Time         `json:"created_at"`
	UpdatedAt            time.Time         `json:"updated_at"`
	AdditionalProperties map[string]string `json:"additional_properties"`
	LastSyncTime         string            `json:"last_sync_time"`
}

CloudGateway represents a generic cloud gateway with various attributes.

func (*Router) DbId

func (v *Router) DbId() string

func (*Router) GetProvider

func (v *Router) GetProvider() string

func (*Router) SetSyncTime

func (v *Router) SetSyncTime(time string)

type SecurityGroup

type SecurityGroup struct {
	Name         string
	ID           string
	Provider     string
	VpcID        string
	Region       string
	Labels       map[string]string
	AccountID    string
	Rules        []SecurityGroupRule
	LastSyncTime string
}

func (*SecurityGroup) DbId

func (v *SecurityGroup) DbId() string

func (*SecurityGroup) GetProvider

func (v *SecurityGroup) GetProvider() string

func (*SecurityGroup) SetSyncTime

func (v *SecurityGroup) SetSyncTime(time string)

type SecurityGroupRule

type SecurityGroupRule struct {
	Protocol  string
	PortRange string
	Source    []string
	Direction string
}

type SingleVPCConnectionOutput

type SingleVPCConnectionOutput struct {
	Region string
}

type SingleVPCConnectionParams

type SingleVPCConnectionParams struct {
	ConnID      string
	VpcID       string
	Region      string
	Destination DestinationDetails
}

type SingleVPCDisconnectionParams

type SingleVPCDisconnectionParams struct {
	ConnID string
	VpcID  string
	Region string
}

type Subnet

type Subnet struct {
	Name         string
	SubnetId     string
	CidrBlock    string
	VpcId        string
	Zone         string
	Labels       map[string]string
	Region       string
	Provider     string
	AccountID    string
	LastSyncTime string
}

func (*Subnet) DbId

func (v *Subnet) DbId() string

func (*Subnet) GetProvider

func (v *Subnet) GetProvider() string

func (*Subnet) SetSyncTime

func (v *Subnet) SetSyncTime(time string)

type SyncTime

type SyncTime struct {
	Provider     string
	ResourceType string
	Time         string
}

func (*SyncTime) DbId

func (v *SyncTime) DbId() string

func (*SyncTime) GetProvider

func (v *SyncTime) GetProvider() string

func (*SyncTime) SetSyncTime

func (v *SyncTime) SetSyncTime(time string)

type VPC

type VPC struct {
	ID           string
	Name         string
	Region       string
	Labels       map[string]string
	IPv4CIDR     string
	IPv6CIDR     string
	Provider     string
	AccountID    string
	LastSyncTime string
}

func (*VPC) DbId

func (v *VPC) DbId() string

func (*VPC) GetProvider

func (v *VPC) GetProvider() string

func (*VPC) SetSyncTime

func (v *VPC) SetSyncTime(time string)

type VPCConnectionOutput

type VPCConnectionOutput struct {
	Region1 string
	Region2 string
}

type VPCConnectionParams

type VPCConnectionParams struct {
	ConnID  string
	Vpc1ID  string
	Vpc2ID  string
	Region1 string
	Region2 string
}

type VPCDisconnectionOutput

type VPCDisconnectionOutput struct {
}

type VPCDisconnectionParams

type VPCDisconnectionParams struct {
	ConnID  string
	Vpc1ID  string
	Vpc2ID  string
	Region1 string
	Region2 string
}

type VPCEndpoint

type VPCEndpoint struct {
	ID            string            `json:"id,omitempty"`
	Name          string            `json:"name,omitempty"`
	Provider      string            `json:"provider,omitempty"`
	AccountId     string            `json:"account_id,omitempty"`
	VPCId         string            `json:"vpc_id,omitempty"` //
	Region        string            `json:"region,omitempty"` // VPC Region
	State         string            `json:"state,omitempty"`
	RouteTableIds string            `json:"route_table_ids,omitempty"`
	SubnetIds     string            `json:"subnet_ids,omitempty"`
	ServiceName   string            `json:"service_name,omitempty"`
	Labels        map[string]string `json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	CreatedAt     *time.Time        `json:"created_at,omitempty"`
	UpdatedAt     *time.Time        `json:"updated_at,omitempty"`
	LastSyncTime  string            `json:"last_sync_time,omitempty"`
}

func (*VPCEndpoint) DbId

func (v *VPCEndpoint) DbId() string

func (*VPCEndpoint) GetProvider

func (v *VPCEndpoint) GetProvider() string

func (*VPCEndpoint) SetSyncTime

func (v *VPCEndpoint) SetSyncTime(time string)

Jump to

Keyboard shortcuts

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