Documentation
¶
Index ¶
- func GenerateCreate(spec v1alpha1.SpaceParameters) *resource.SpaceCreate
- func GenerateListOption(spec v1alpha1.SpaceParameters) *client.SpaceListOptions
- func GenerateObservation(o *resource.Space, ssh bool) v1alpha1.SpaceObservation
- func GenerateUpdate(spec v1alpha1.SpaceParameters) *resource.SpaceUpdate
- func GetByIDOrSpec(ctx context.Context, spaceClient Space, guid string, ...) (*resource.Space, error)
- func GetGUID(ctx context.Context, orgClient org.Client, spaceClient Space, ...) (*string, error)
- func IsSSHEnabled(ctx context.Context, f Feature, spaceGUID string) (bool, error)
- func IsUpToDate(spec v1alpha1.SpaceParameters, observed *resource.Space, ssh bool) bool
- func LateInitialize(cr *v1alpha1.Space, from *resource.Space, ssh bool) bool
- func NewClient(cf *client.Client) (Space, Feature, org.Client)
- func ResolveByName(ctx context.Context, clientFn clients.ClientFn, mg resource.Managed) error
- type Feature
- type Space
- type SpaceScoped
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 ¶
IsSSHEnabled checks whether SSH is enabled for the given space.
func IsUpToDate ¶
IsUpToDate checks whether current state is up-to-date compared to the given set of parameters.
func LateInitialize ¶
LateInitialize fills the unassigned fields with values from a Space resource.
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
}