Help us shape the future of Go! Take the 2026 Go Developer Survey

access

package
v2.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecurityGroupIDSelf special placeholder for self secgroup ID
	SecurityGroupIDSelf = "self"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	ID           string
	Name         string
	AdminStateUp bool
	Subnets      []string

	Status string
}

Network is a simplified network resource

type NetworkingAccess

type NetworkingAccess interface {
	// Routers
	CreateRouter(ctx context.Context, desired *Router) (*Router, error)
	GetRouterByID(ctx context.Context, id string) (*Router, error)
	GetRouterByName(ctx context.Context, name string) ([]*Router, error)
	UpdateRouter(ctx context.Context, desired, current *Router) (modified bool, router *Router, err error)
	LookupFloatingPoolSubnetIDs(ctx context.Context, networkID, floatingPoolSubnetNameRegex string) ([]string, error)
	AddRouterInterfaceAndWait(ctx context.Context, routerID, subnetID string) error
	GetRouterInterfacePortID(ctx context.Context, routerID, subnetID string) (portID *string, err error)
	RemoveRouterInterfaceAndWait(ctx context.Context, routerID, subnetID, portID string) error

	// Networks
	CreateNetwork(ctx context.Context, desired *Network) (*Network, error)
	GetNetworkByID(ctx context.Context, id string) (*Network, error)
	GetNetworkByName(ctx context.Context, name string) ([]*Network, error)
	UpdateNetwork(ctx context.Context, desired, current *Network) (modified bool, err error)

	// Subnets
	CreateSubnet(ctx context.Context, desired *subnets.Subnet) (*subnets.Subnet, error)
	GetSubnetByID(ctx context.Context, id string) (*subnets.Subnet, error)
	GetSubnetByName(ctx context.Context, networkID, name string) ([]*subnets.Subnet, error)
	UpdateSubnet(ctx context.Context, desired, current *subnets.Subnet) (modified bool, err error)

	// SecurityGroups
	CreateSecurityGroup(ctx context.Context, desired *groups.SecGroup) (*groups.SecGroup, error)
	GetSecurityGroupByID(ctx context.Context, id string) (*groups.SecGroup, error)
	GetSecurityGroupByName(ctx context.Context, name string) ([]*groups.SecGroup, error)
	UpdateSecurityGroupRules(ctx context.Context, group *groups.SecGroup, desiredRules []rules.SecGroupRule, allowDelete func(rule *rules.SecGroupRule) bool) (modified bool, err error)
}

NetworkingAccess provides methods for managing routers and networks

func NewNetworkingAccess

func NewNetworkingAccess(ctx context.Context, networking client.Networking, log logr.Logger) (NetworkingAccess, error)

NewNetworkingAccess creates a new access object

type Router

type Router struct {
	ID                string
	Name              string
	ExternalNetworkID string
	EnableSNAT        *bool
	ExternalSubnetIDs []string

	Status           string                    // only output
	ExternalFixedIPs []routers.ExternalFixedIP // only output
}

Router is a simplified router resource

Jump to

Keyboard shortcuts

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