Back to godoc.org

Package api

v1.13.0
Latest Go to latest

The highest tagged major version is .

Published: Apr 16, 2018 | License: Apache-2.0 | Module: code.cloudfoundry.org/cf-networking-release

Index

type Destination

type Destination struct {
	ID       string `json:"id"`
	Tag      string `json:"tag,omitempty"`
	Protocol string `json:"protocol"`
	Ports    Ports  `json:"ports"`
}

type Policies

type Policies struct {
	TotalPolicies int      `json:"total_policies"`
	Policies      []Policy `json:"policies"`
}

type Policy

type Policy struct {
	Source      Source      `json:"source"`
	Destination Destination `json:"destination"`
}

type PolicyMapper

type PolicyMapper interface {
	AsStorePolicy([]byte) ([]store.Policy, error) // marshal
	AsBytes([]store.Policy) ([]byte, error)       // unmarshal
}

go:generate counterfeiter -o fakes/policy_mapper.go --fake-name PolicyMapper . PolicyMapper

func NewMapper

func NewMapper(unmarshaler marshal.Unmarshaler, marshaler marshal.Marshaler, validator validator) PolicyMapper

type PolicySlice

type PolicySlice []Policy

func (PolicySlice) Len

func (s PolicySlice) Len() int

func (PolicySlice) Less

func (s PolicySlice) Less(i, j int) bool

func (PolicySlice) Swap

func (s PolicySlice) Swap(i, j int)

type Ports

type Ports struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

type Source

type Source struct {
	ID  string `json:"id"`
	Tag string `json:"tag,omitempty"`
}

type Space

type Space struct {
	Name    string `json:name`
	OrgGUID string `json:organization_guid`
}

type Tag

type Tag struct {
	ID  string `json:"id"`
	Tag string `json:"tag"`
}

func MapStoreTag

func MapStoreTag(tag store.Tag) Tag

func MapStoreTags

func MapStoreTags(tags []store.Tag) []Tag

type Validator

type Validator struct{}

func (*Validator) ValidatePolicies

func (v *Validator) ValidatePolicies(policies []Policy) error

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier