firewalls

package
v0.0.0-...-cad3fbd Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Create(ctx context.Context, name string, inboundRules []godo.InboundRule, outboundRules []godo.OutboundRule, opts ...CreateOpt) (Firewall, error)
	List(ctx context.Context) (<-chan Firewall, <-chan error)
	Get(ctx context.Context, id string) (Firewall, error)
	Delete(ctx context.Context, id string) error
	Update(ctx context.Context, id string, opts ...UpdateOpt) (Firewall, error)
	AddTags(ctx context.Context, id string, tags ...string) error
	RemoveTags(ctx context.Context, id string, tags ...string) error
	AddDroplets(ctx context.Context, id string, dropletIDs ...int) error
	RemoveDroplets(ctx context.Context, id string, dropletIDs ...int) error
	AddRules(ctx context.Context, id string, inboundRules []godo.InboundRule, outboundRules []godo.OutboundRule) error
	RemoveRules(ctx context.Context, id string, inboundRules []godo.InboundRule, outboundRules []godo.OutboundRule) error
}

func New

func New(g *godo.Client) Client

New creates a Client.

type CreateOpt

type CreateOpt func(*createOpt)

CreateOpt is an optional argument to firewalls.Create

func UseGodoCreate

func UseGodoCreate(req *godo.FirewallRequest) CreateOpt

type Firewall

type Firewall interface {
	Struct() *godo.Firewall
}

type RulesOpt

type RulesOpt func(*rulesOpt)

type UpdateOpt

type UpdateOpt func(*updateOpt)

UpdateOpt is an optional argument to firewalls.Update

func UseGodoFirewall

func UseGodoFirewall(req *godo.FirewallRequest) UpdateOpt

Jump to

Keyboard shortcuts

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