cfnetworkingaction

package
v6.34.1+incompatible Latest Latest
Warning

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

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

Documentation

Overview

Package cfnetworkingaction contains the business logic for the cf networking commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	NetworkingClient NetworkingClient
	V3Actor          V3Actor
}

Actor handles all business logic for cf networking operations.

func NewActor

func NewActor(networkingClient NetworkingClient, v3Actor V3Actor) *Actor

NewActor returns a new actor.

func (Actor) AddNetworkPolicy

func (actor Actor) AddNetworkPolicy(spaceGUID, srcAppName, destAppName, protocol string, startPort, endPort int) (Warnings, error)

func (Actor) NetworkPoliciesBySpace

func (actor Actor) NetworkPoliciesBySpace(spaceGUID string) ([]Policy, Warnings, error)

func (Actor) NetworkPoliciesBySpaceAndAppName

func (actor Actor) NetworkPoliciesBySpaceAndAppName(spaceGUID string, srcAppName string) ([]Policy, Warnings, error)

func (Actor) RemoveNetworkPolicy

func (actor Actor) RemoveNetworkPolicy(spaceGUID, srcAppName, destAppName, protocol string, startPort, endPort int) (Warnings, error)

type NetworkingClient

type NetworkingClient interface {
	CreatePolicies(policies []cfnetv1.Policy) error
	ListPolicies(appNames ...string) ([]cfnetv1.Policy, error)
	RemovePolicies(policies []cfnetv1.Policy) error
}

type Policy

type Policy struct {
	SourceName      string
	DestinationName string
	Protocol        string
	StartPort       int
	EndPort         int
}

type V3Actor

type V3Actor interface {
	GetApplicationByNameAndSpace(appName string, spaceGUID string) (v3action.Application, v3action.Warnings, error)
	GetApplicationsBySpace(spaceGUID string) ([]v3action.Application, v3action.Warnings, error)
}

type Warnings

type Warnings []string

Warnings is a list of warnings returned back

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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