client

package
v0.0.0-...-4e12832 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultNewClient = NewClient
View Source
var DefaultNewRESTClient = NewRESTClient

Functions

func AddToScheme

func AddToScheme() error

func Create

Create creates the resource only if it does not exist yet (ie, if a resource of the same kind in the same namespace/name doesn't exist yet)

func Ensure

Ensure creates or updates the given object and returns if the object was either created or updated (which means that no error occurred and the administrator confirmed execution of the action)

func EnsureKsctlConfigFile

func EnsureKsctlConfigFile() (string, error)

func GetMasterUserRecord

func GetMasterUserRecord(cl runtimeclient.Client, namespace, name string) (*toolchainv1alpha1.MasterUserRecord, error)

func GetRouteURL

func GetRouteURL(term ioutils.Terminal, cl runtimeclient.Client, namespacedName types.NamespacedName) (string, error)

GetRouteURL return the scheme+host of the route with the given namespaced name. Since routes may take a bit of time to be available, this func uses a wait loop to make sure that the route was created, or fails after a timeout.

func GetSpace

func GetSpace(cl runtimeclient.Client, namespace, name string) (*toolchainv1alpha1.Space, error)

func GetUserSignup

func GetUserSignup(cl runtimeclient.Client, namespace, name string) (*toolchainv1alpha1.UserSignup, error)

func NewClient

func NewClient(token, apiEndpoint string) (runtimeclient.Client, error)

func NewClientWithTransport

func NewClientWithTransport(token, apiEndpoint string, transport http.RoundTripper) (runtimeclient.Client, error)

func NewRESTClient

func NewRESTClient(token, apiEndpoint string) (*rest.RESTClient, error)

func PatchMasterUserRecord

func PatchMasterUserRecord(ctx *clicontext.CommandContext, name string, changeMasterUserRecord func(*toolchainv1alpha1.MasterUserRecord) (bool, error), afterMessage string) error

func PatchSpace

func PatchSpace(ctx *clicontext.CommandContext, name string, changeSpace func(*toolchainv1alpha1.Space) (bool, error), afterMessage string) error

func PatchUserSignup

func PatchUserSignup(ctx *clicontext.CommandContext, name string, changeUserSignup func(*toolchainv1alpha1.UserSignup) (bool, error), afterMessage string) error

Types

type CommandCreator

type CommandCreator func(name string, arg ...string) *exec.Cmd

type SpaceBindingMatchingLabel

type SpaceBindingMatchingLabel func(runtimeclient.MatchingLabels)

func ForMasterUserRecord

func ForMasterUserRecord(murName string) SpaceBindingMatchingLabel

func ForSpace

func ForSpace(spaceName string) SpaceBindingMatchingLabel

Jump to

Keyboard shortcuts

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