datamodel

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTaggedResource

type BaseTaggedResource struct {
	Tags []string `json:"tags"`
}

BaseTaggedResource type is used as an abstraction for all resources that IBM allows tagging

func (*BaseTaggedResource) SetTags

func (res *BaseTaggedResource) SetTags(tags []string)

type EndpointGateway

type EndpointGateway struct {
	vpcv1.EndpointGateway
	BaseTaggedResource
}

EndpointGateway configuration object

func NewEndpointGateway

func NewEndpointGateway(endpointGateway *vpcv1.EndpointGateway) *EndpointGateway

func (*EndpointGateway) GetCRN

func (res *EndpointGateway) GetCRN() *string

func (*EndpointGateway) UnmarshalJSON

func (res *EndpointGateway) UnmarshalJSON(data []byte) error

type FloatingIP

type FloatingIP struct {
	vpcv1.FloatingIP
	BaseTaggedResource
}

FloatingIP configuration object

func NewFloatingIP

func NewFloatingIP(floatingIP *vpcv1.FloatingIP) *FloatingIP

func (*FloatingIP) GetCRN

func (res *FloatingIP) GetCRN() *string

func (*FloatingIP) UnmarshalJSON

func (res *FloatingIP) UnmarshalJSON(data []byte) error

type IKSCluster added in v0.10.0

type IKSCluster struct {
	iksv1.GetClustersResponse
	WorkerNodes []iksv1.GetWorkerResponse
}

IKSWorkerNode configuration object

func NewCluster added in v0.10.0

func NewCluster(cluster *iksv1.GetClustersResponse, getWorkerResponse []iksv1.GetWorkerResponse) *IKSCluster

type Instance

type Instance struct {
	vpcv1.Instance
	NetworkInterfaces []vpcv1.NetworkInterface `json:"network_interfaces"`
	BaseTaggedResource
}

Instance configuration object

func NewInstance

func NewInstance(instance *vpcv1.Instance, networkInterfaces []vpcv1.NetworkInterface) *Instance

func (*Instance) GetCRN

func (res *Instance) GetCRN() *string

type LoadBalancer

type LoadBalancer struct {
	vpcv1.LoadBalancer
	Listeners []LoadBalancerListener `json:"listeners"`
	Pools     []LoadBalancerPool     `json:"pools"`
	BaseTaggedResource
}

LoadBalancer configuration object with explicit listeners and pools (not references)

func NewLoadBalancer

func NewLoadBalancer(
	lb *vpcv1.LoadBalancer,
	listeners []LoadBalancerListener,
	pools []LoadBalancerPool) *LoadBalancer

func (*LoadBalancer) GetCRN

func (res *LoadBalancer) GetCRN() *string

type LoadBalancerListener

type LoadBalancerListener struct {
	vpcv1.LoadBalancerListener
	Policies []LoadBalancerListenerPolicy `json:"policies"`
}

LoadBalancerListener configuration object with explicit policies (not references)

func NewLoadBalancerListener

func NewLoadBalancerListener(
	loadBalancerListener *vpcv1.LoadBalancerListener, policies []LoadBalancerListenerPolicy) LoadBalancerListener

type LoadBalancerListenerPolicy

type LoadBalancerListenerPolicy struct {
	vpcv1.LoadBalancerListenerPolicy
	Rules []LoadBalancerListenerPolicyRuleWrapper `json:"rules"`
}

LoadBalancerListenerPolicy configuration with explicit rules (not references)

func NewLoadBalancerListenerPolicy

func NewLoadBalancerListenerPolicy(
	loadBalancerListenerPolicy *vpcv1.LoadBalancerListenerPolicy,
	rules []vpcv1.LoadBalancerListenerPolicyRule) LoadBalancerListenerPolicy

func (*LoadBalancerListenerPolicy) UnmarshalJSON

func (res *LoadBalancerListenerPolicy) UnmarshalJSON(data []byte) error

type LoadBalancerListenerPolicyRuleWrapper

type LoadBalancerListenerPolicyRuleWrapper struct {
	vpcv1.LoadBalancerListenerPolicyRule
}

LoadBalancerListenerPolicyRuleWrapper is an alias to vpcv1.LoadBalancerListenerPolicyRule that allows us to override the implementation of UnmarshalJSON

func (*LoadBalancerListenerPolicyRuleWrapper) UnmarshalJSON

func (res *LoadBalancerListenerPolicyRuleWrapper) UnmarshalJSON(data []byte) error

type LoadBalancerPool

type LoadBalancerPool struct {
	vpcv1.LoadBalancerPool
	Members []LoadBalancerPoolMemberWrapper `json:"members"`
}

LoadBalancerPool object with explicit members (not references)

func NewLoadBalancerPool

func NewLoadBalancerPool(loadBalancerPool *vpcv1.LoadBalancerPool,
	members []vpcv1.LoadBalancerPoolMember) LoadBalancerPool

type LoadBalancerPoolMemberWrapper

type LoadBalancerPoolMemberWrapper struct {
	vpcv1.LoadBalancerPoolMember
}

LoadBalancerPoolMemberWrapper is an alias to vpcv1.LoadBalancerPoolMember that allows us to override the implementation of UnmarshalJSON

func (*LoadBalancerPoolMemberWrapper) UnmarshalJSON

func (res *LoadBalancerPoolMemberWrapper) UnmarshalJSON(data []byte) error

type NetworkACL

type NetworkACL struct {
	vpcv1.NetworkACL
	BaseTaggedResource
}

NetworkACL configuration object

func NewNetworkACL

func NewNetworkACL(networkACL *vpcv1.NetworkACL) *NetworkACL

func (*NetworkACL) GetCRN

func (res *NetworkACL) GetCRN() *string

func (*NetworkACL) UnmarshalJSON

func (res *NetworkACL) UnmarshalJSON(data []byte) error

type PublicGateway

type PublicGateway struct {
	vpcv1.PublicGateway
	BaseTaggedResource
}

PublicGateway configuration object

func NewPublicGateway

func NewPublicGateway(publicGateway *vpcv1.PublicGateway) *PublicGateway

func (*PublicGateway) GetCRN

func (res *PublicGateway) GetCRN() *string

type ReservedIPWrapper

type ReservedIPWrapper struct {
	vpcv1.ReservedIP
}

ReservedIPWrapper is an alias to vpcv1.ReservedIP that allows us to override the implementation of UnmarshalJSON

func (*ReservedIPWrapper) UnmarshalJSON

func (res *ReservedIPWrapper) UnmarshalJSON(data []byte) error

type ResourcesContainerModel

type ResourcesContainerModel struct {
	common.ResourceModelMetadata
	VpcList               []*VPC               `json:"vpcs"`
	SubnetList            []*Subnet            `json:"subnets"`
	PublicGWList          []*PublicGateway     `json:"public_gateways"`
	FloatingIPList        []*FloatingIP        `json:"floating_ips"`
	NetworkACLList        []*NetworkACL        `json:"network_acls"`
	SecurityGroupList     []*SecurityGroup     `json:"security_groups"`
	EndpointGWList        []*EndpointGateway   `json:"endpoint_gateways"`
	InstanceList          []*Instance          `json:"instances"`
	VirtualNIList         []*VirtualNI         `json:"virtual_nis"`
	RoutingTableList      []*RoutingTable      `json:"routing_tables"`
	LBList                []*LoadBalancer      `json:"load_balancers"`
	TransitConnectionList []*TransitConnection `json:"transit_connections"`
	TransitGatewayList    []*TransitGateway    `json:"transit_gateways"`
	IKSClusters           []*IKSCluster        `json:"iks_clusters"`
}

ResourcesContainerModel defines the model of a container for all resource types we can collect

func NewResourcesContainerModel

func NewResourcesContainerModel() *ResourcesContainerModel

NewResourcesContainerModel creates an empty resources container

func (*ResourcesContainerModel) PrintStats

func (resources *ResourcesContainerModel) PrintStats()

PrintStats outputs the number of items of each type

func (*ResourcesContainerModel) ToJSONString

func (resources *ResourcesContainerModel) ToJSONString() (string, error)

ToJSONString converts a ResourcesContainerModel into a json-formatted-string

type RouteWrapper

type RouteWrapper struct {
	vpcv1.Route
}

RouteWrapper is an alias to vpcv1.Route that allows us to override the implementation of UnmarshalJSON

func (*RouteWrapper) UnmarshalJSON

func (res *RouteWrapper) UnmarshalJSON(data []byte) error

type RoutingTable

type RoutingTable struct {
	vpcv1.RoutingTable
	Routes []RouteWrapper      `json:"routes"`
	VPC    *vpcv1.VPCReference `json:"vpc"`
}

RoutingTable configuration object (not taggable)

func NewRoutingTable

func NewRoutingTable(rt *vpcv1.RoutingTable, routes []vpcv1.Route, vpcRef *vpcv1.VPCReference) *RoutingTable

type SecurityGroup

type SecurityGroup struct {
	vpcv1.SecurityGroup
	BaseTaggedResource
}

SecurityGroup configuration object

func NewSecurityGroup

func NewSecurityGroup(securityGroup *vpcv1.SecurityGroup) *SecurityGroup

func (*SecurityGroup) GetCRN

func (res *SecurityGroup) GetCRN() *string

func (*SecurityGroup) UnmarshalJSON

func (res *SecurityGroup) UnmarshalJSON(data []byte) error

type Subnet

type Subnet struct {
	vpcv1.Subnet
	ReservedIps []ReservedIPWrapper `json:"reserved_ips"`
	BaseTaggedResource
}

Subnet configuration object

func NewSubnet

func NewSubnet(subnet *vpcv1.Subnet, reservedIPs []vpcv1.ReservedIP) *Subnet

func (*Subnet) GetCRN

func (res *Subnet) GetCRN() *string

type TaggedResource

type TaggedResource interface {
	SetTags([]string)
	GetCRN() *string
}

type TransitConnection

type TransitConnection struct {
	tgw.TransitConnection
}

TransitConnection configuration object

func NewTransitConnection

func NewTransitConnection(transitConnection *tgw.TransitConnection) *TransitConnection

type TransitGateway

type TransitGateway struct {
	tgw.TransitGateway
}

func NewTransitGateway

func NewTransitGateway(transitGateway *tgw.TransitGateway) *TransitGateway

type VPC

type VPC struct {
	vpcv1.VPC
	Region          string                `json:"region"`
	AddressPrefixes []vpcv1.AddressPrefix `json:"address_prefixes"`
	BaseTaggedResource
}

VPC configuration object

func NewVPC

func NewVPC(sdkVPC *vpcv1.VPC, region string, addressPrefixes []vpcv1.AddressPrefix) *VPC

func (*VPC) GetCRN

func (res *VPC) GetCRN() *string

func (*VPC) UnmarshalJSON

func (res *VPC) UnmarshalJSON(data []byte) error

type VirtualNI added in v0.15.0

Virtual Network Interface object

func NewVirtualNI added in v0.15.0

func NewVirtualNI(vni *vpcv1.VirtualNetworkInterface) *VirtualNI

func (*VirtualNI) GetCRN added in v0.15.0

func (res *VirtualNI) GetCRN() *string

func (*VirtualNI) UnmarshalJSON added in v0.15.0

func (res *VirtualNI) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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