firewall

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDRBlock

type CIDRBlock struct {
	ID            int
	ServiceID     int
	ServiceName   string
	CIDR          netip.Prefix
	Ports         []int
	CreationDate  civil.Date
	EffectiveDate civil.Date
	ChangeDate    civil.Date
	MinIP         netip.Addr
	MaxIP         netip.Addr
	LastAction    LastAction
}

CIDRBlock represents a CIDR block that is allowed to access an Akamai service under the Firewall Rules Notification API.

type Client

type Client struct {
	Credentials akamai.Credentials
}

A Client allows access to the Akamai Firewall Rules Notification API.

func (*Client) GetCIDRBlocks

func (c *Client) GetCIDRBlocks() ([]CIDRBlock, error)

GetCIDRBlocks returns all CIDR blocks for all services the client is subscribed to.

func (*Client) GetCIDRBlocksWithContext added in v0.1.2

func (c *Client) GetCIDRBlocksWithContext(ctx context.Context) ([]CIDRBlock, error)

GetCIDRBlocksWithContext returns all CIDR blocks for all services the client is subscribed to.

The context is used to determine whether debugging is enabled and to allow cancellation of the request.

func (*Client) GetService

func (c *Client) GetService(id int) (Service, error)

GetService returns information about a service by ID.

This is a compatibility wrapper around GetServiceWithContext that uses context.Background() as the context.

func (*Client) GetServiceWithContext added in v0.1.2

func (c *Client) GetServiceWithContext(ctx context.Context, id int) (Service, error)

GetServiceWithContext returns information about a service by ID.

The context is used to determine whether debugging is enabled and to allow cancellation of the request.

type LastAction

type LastAction string
const (
	LastActionOther  LastAction = "other"
	LastActionAdd    LastAction = "add"
	LastActionUpdate LastAction = "update"
	LastActionDelete LastAction = "delete"
)

type Service

type Service struct {
	ID          int    `json:"serviceId"`
	Name        string `json:"serviceName"`
	Description string `json:"description"`
}

Service represents an Akamai service that a client is subscribed to.

Jump to

Keyboard shortcuts

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