isosegment

package
v1.0.106 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFClient added in v1.0.0

type CFClient interface {
	ListIsolationSegments() ([]cfclient.IsolationSegment, error)
	ListIsolationSegmentsByQuery(query url.Values) ([]cfclient.IsolationSegment, error)
	CreateIsolationSegment(name string) (*cfclient.IsolationSegment, error)
	DeleteIsolationSegmentByGUID(guid string) error
	GetIsolationSegmentByGUID(guid string) (*cfclient.IsolationSegment, error)
	AddIsolationSegmentToOrg(isolationSegmentGUID, orgGUID string) error
	RemoveIsolationSegmentFromOrg(isolationSegmentGUID, orgGUID string) error
	AddIsolationSegmentToSpace(isolationSegmentGUID, spaceGUID string) error
	RemoveIsolationSegmentFromSpace(isolationSegmentGUID, spaceGUID string) error
	DefaultIsolationSegmentForOrg(orgGUID, isolationSegmentGUID string) error
	ResetDefaultIsolationSegmentForOrg(orgGUID string) error
	IsolationSegmentForSpace(spaceGUID, isolationSegmentGUID string) error
	ResetIsolationSegmentForSpace(spaceGUID string) error
}

type Manager added in v1.0.0

type Manager interface {
	Apply() error
	Create() error
	Remove() error
	Entitle() error
	Unentitle() error
	UpdateOrgs() error
	UpdateSpaces() error
	ListIsolationSegments() ([]cfclient.IsolationSegment, error)
}

func NewManager added in v1.0.0

func NewManager(client CFClient, cfg config.Reader, orgReader organizationreader.Reader, spaceManager space.Manager, peek bool) (Manager, error)

NewManager -

type Updater

type Updater struct {
	Cfg          config.Reader
	Client       CFClient
	OrgReader    organizationreader.Reader
	SpaceManager space.Manager
	Peek         bool
	CleanUp      bool
}

Updater performs the required updates to acheive the desired state wrt isolation segments. Updaters should always be created with NewUpdater. It is save to modify Updater's exported fields after creation.

func (*Updater) Apply added in v1.0.0

func (u *Updater) Apply() error

func (*Updater) Create added in v1.0.0

func (u *Updater) Create() error

Create creates any isolation segments that do not yet exist,

func (*Updater) Entitle

func (u *Updater) Entitle() error

Entitle ensures that each org is entitled to the isolation segments it needs to use.

func (*Updater) ListIsolationSegments added in v1.0.0

func (m *Updater) ListIsolationSegments() ([]cfclient.IsolationSegment, error)

func (*Updater) Remove added in v1.0.0

func (u *Updater) Remove() error

Create creates any isolation segments that do not yet exist,

func (*Updater) Unentitle added in v1.0.0

func (u *Updater) Unentitle() error

func (*Updater) UpdateOrgs

func (u *Updater) UpdateOrgs() error

UpdateOrgs sets the default isolation segment for each org, as specified in the cf-mgmt config.

func (*Updater) UpdateSpaces

func (u *Updater) UpdateSpaces() error

UpdateSpaces sets the isolation segment for each space, as specified in the cf-mgmt config.

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