gophercloud: github.com/rackspace/gophercloud/rackspace/lb/v1/acl Index | Files

package acl

import "github.com/rackspace/gophercloud/rackspace/lb/v1/acl"

Package acl provides information and interaction with the access lists feature of the Rackspace Cloud Load Balancer service.

The access list management feature allows fine-grained network access controls to be applied to the load balancer's virtual IP address. A single IP address, multiple IP addresses, or entire network subnets can be added. Items that are configured with the ALLOW type always takes precedence over items with the DENY type. To reject traffic from all items except for those with the ALLOW type, add a networkItem with an address of "0.0.0.0/0" and a DENY type.

Index

Package Files

doc.go requests.go results.go urls.go

func List Uses

func List(client *gophercloud.ServiceClient, lbID int) pagination.Pager

List is the operation responsible for returning a paginated collection of network items that define a load balancer's access list.

type AccessList Uses

type AccessList []NetworkItem

AccessList represents the rules of network access to a particular load balancer.

func ExtractAccessList Uses

func ExtractAccessList(page pagination.Page) (AccessList, error)

ExtractAccessList accepts a Page struct, specifically an AccessListPage struct, and extracts the elements into a slice of NetworkItem structs. In other words, a generic collection is mapped into a relevant slice.

type AccessListPage Uses

type AccessListPage struct {
    pagination.SinglePageBase
}

AccessListPage is the page returned by a pager for traversing over a collection of network items in an access list.

func (AccessListPage) IsEmpty Uses

func (p AccessListPage) IsEmpty() (bool, error)

IsEmpty checks whether an AccessListPage struct is empty.

type CreateOpt Uses

type CreateOpt struct {
    // Required - the IP address or CIDR for item to add to access list.
    Address string

    // Required - the type of the node. Either ALLOW or DENY.
    Type Type
}

CreateOpt represents the options to create a single node.

type CreateOpts Uses

type CreateOpts []CreateOpt

CreateOpts is a slice of CreateOpt structs, that allow the user to create multiple nodes in a single operation (one node per CreateOpt).

func (CreateOpts) ToAccessListCreateMap Uses

func (opts CreateOpts) ToAccessListCreateMap() (map[string]interface{}, error)

ToAccessListCreateMap converts a slice of options into a map that can be used for the JSON.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToAccessListCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder is the interface responsible for generating the JSON for a Create operation.

type CreateResult Uses

type CreateResult struct {
    gophercloud.ErrResult
}

CreateResult represents the result of a create operation.

func Create Uses

func Create(client *gophercloud.ServiceClient, loadBalancerID int, opts CreateOptsBuilder) CreateResult

Create is the operation responsible for adding network items to the access rules for a particular load balancer. If network items already exist, the new item will be appended. A single IP address or subnet range is considered unique and cannot be duplicated.

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult represents the result of a delete operation.

func BulkDelete Uses

func BulkDelete(c *gophercloud.ServiceClient, loadBalancerID int, itemIDs []int) DeleteResult

BulkDelete will delete multiple network items from a load balancer's access list in a single operation.

func Delete Uses

func Delete(c *gophercloud.ServiceClient, lbID, itemID int) DeleteResult

Delete will remove a single network item from a load balancer's access list.

func DeleteAll Uses

func DeleteAll(c *gophercloud.ServiceClient, lbID int) DeleteResult

DeleteAll will delete the entire contents of a load balancer's access list, effectively resetting it and allowing all traffic.

type NetworkItem Uses

type NetworkItem struct {
    // The IP address or subnet (CIDR) that defines the network item.
    Address string

    // The numeric unique ID for this item.
    ID  int

    // Either ALLOW or DENY.
    Type Type
}

NetworkItem describes how an IP address or entire subnet may interact with a load balancer.

type Type Uses

type Type string

Type defines how an item may connect to the load balancer.

const (
    ALLOW Type = "ALLOW"
    DENY  Type = "DENY"
)

Convenience consts.

Package acl imports 6 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners.