space

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreate

func GenerateCreate(spec v1alpha1.SpaceParameters) *resource.SpaceCreate

GenerateCreate generates the SpaceCreate from an *SpaceParameters

func GenerateListOption

func GenerateListOption(spec v1alpha1.SpaceParameters) *client.SpaceListOptions

GenerateListOption generates the list options for the client.

func GenerateObservation

func GenerateObservation(o *resource.Space, ssh bool) v1alpha1.SpaceObservation

GenerateObservation takes an Space resource and returns *SpaceObservation.

func GenerateUpdate

func GenerateUpdate(spec v1alpha1.SpaceParameters) *resource.SpaceUpdate

GenerateUpdate generates the SpaceCreate from an *SpaceParameters

func GetByIDOrSpec

func GetByIDOrSpec(ctx context.Context, spaceClient Space, guid string, spec v1alpha1.SpaceParameters) (*resource.Space, error)

GetByIDOrSpec retrieves a Space by its GUID or by its specification.

func GetGUID

func GetGUID(ctx context.Context, orgClient org.Client, spaceClient Space, orgName, spaceName string) (*string, error)

GetGUID returns the GUID of a space by name. It returns an empty string, if the space does not exist, or there is an error.

func IsSSHEnabled

func IsSSHEnabled(ctx context.Context, f Feature, spaceGUID string) (bool, error)

IsSSHEnabled checks whether SSH is enabled for the given space.

func IsUpToDate

func IsUpToDate(spec v1alpha1.SpaceParameters, observed *resource.Space, ssh bool) bool

IsUpToDate checks whether current state is up-to-date compared to the given set of parameters.

func LateInitialize

func LateInitialize(cr *v1alpha1.Space, from *resource.Space, ssh bool) bool

LateInitialize fills the unassigned fields with values from a Space resource.

func NewClient

func NewClient(cf *client.Client) (Space, Feature, org.Client)

NewClient creates a new cf client and return interfaces for Space and SpaceFeatures

func ResolveByName

func ResolveByName(ctx context.Context, clientFn clients.ClientFn, mg resource.Managed) error

ResolveByName resolves the space reference by name.

Types

type Feature

type Feature interface {
	EnableSSH(ctx context.Context, spaceGUID string, enable bool) error
	IsSSHEnabled(ctx context.Context, spaceGUID string) (bool, error)
}

Feature is the interface that defines the methods that a Feature client should implement.

type Space

type Space interface {
	Get(ctx context.Context, guid string) (*resource.Space, error)
	Single(ctx context.Context, opts *client.SpaceListOptions) (*resource.Space, error)
	Create(ctx context.Context, r *resource.SpaceCreate) (*resource.Space, error)
	Update(ctx context.Context, guid string, r *resource.SpaceUpdate) (*resource.Space, error)
	Delete(ctx context.Context, guid string) (string, error)
}

Space is the interface that defines the methods that a Space client should implement.

type SpaceScoped

type SpaceScoped interface {
	GetSpaceRef() *v1alpha1.SpaceReference
}

Jump to

Keyboard shortcuts

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