internal

package
v0.0.0-...-d16420a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token string `json:"access_token"`
}

type CreateBindingRequest

type CreateBindingRequest struct {
	ServiceInstanceID string `json:"serviceInstanceId"`
	PlanID            string `json:"planId"`
}

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	EnvironmentType string                `json:"environmentType"`
	ServiceName     string                `json:"serviceName"`
	PlanName        string                `json:"planName"`
	User            string                `json:"user"`
	Parameters      EnvironmentParameters `json:"parameters"`
}

type CreatedBindingResponse

type CreatedBindingResponse struct {
	ID          string
	Credentials Credentials `json:"credentials"`
}

type CreatedEnvironmentResponse

type CreatedEnvironmentResponse struct {
	ID string `json:"id"`
}

type Credentials

type Credentials struct {
	Kubeconfig string `json:"kubeconfig"`
}

type EnvironmentParameters

type EnvironmentParameters struct {
	Name   string `json:"name"`
	Region string `json:"region"`
}

type EnvironmentResponse

type EnvironmentResponse struct {
	ID              string          `json:"id"`
	State           State           `json:"state"`
	EnvironmentType EnvironmentType `json:"environmentType"`
}

type EnvironmentType

type EnvironmentType string
const (
	KYMA EnvironmentType = "kyma"
)

type EnvironmentsResponse

type EnvironmentsResponse struct {
	Environments []EnvironmentResponse `json:"environmentInstances"`
}

type Error

type Error struct {
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Error Error `json:"error"`
}

type GetBindingResponse

type GetBindingResponse struct {
	Credentials Credentials `json:"credentials"`
}

type KymaConfig

type KymaConfig struct {
	PlanName     string
	PlanID       string
	User         string
	InstanceName string
	Region       string
}

type ProvisioningClient

type ProvisioningClient struct {
	// contains filtered or unexported fields
}

func NewProvisioningClient

func NewProvisioningClient(cfg ProvisioningConfig, logger *slog.Logger, ctx context.Context, timeoutSeconds time.Duration) *ProvisioningClient

func (*ProvisioningClient) AwaitEnvironmentCreated

func (p *ProvisioningClient) AwaitEnvironmentCreated(environmentID string) error

func (*ProvisioningClient) AwaitEnvironmentDeleted

func (p *ProvisioningClient) AwaitEnvironmentDeleted(environmentID string) error

func (*ProvisioningClient) CreateBinding

func (p *ProvisioningClient) CreateBinding(environmentID string) (CreatedBindingResponse, error)

func (*ProvisioningClient) CreateEnvironment

func (p *ProvisioningClient) CreateEnvironment() (CreatedEnvironmentResponse, error)

func (*ProvisioningClient) DeleteBinding

func (p *ProvisioningClient) DeleteBinding(environmentID, bindingID string) error

func (*ProvisioningClient) DeleteEnvironment

func (p *ProvisioningClient) DeleteEnvironment(environmentID string) (EnvironmentResponse, error)

func (*ProvisioningClient) GetAccessToken

func (p *ProvisioningClient) GetAccessToken() error

func (*ProvisioningClient) GetBinding

func (p *ProvisioningClient) GetBinding(environmentID, bindingID string) (GetBindingResponse, error)

func (*ProvisioningClient) GetEnvironment

func (p *ProvisioningClient) GetEnvironment(environmentID string) (EnvironmentResponse, error)

func (*ProvisioningClient) GetEnvironments

func (p *ProvisioningClient) GetEnvironments() (EnvironmentsResponse, error)

type ProvisioningConfig

type ProvisioningConfig struct {
	URL          string
	ClientID     string
	ClientSecret string
	UAA_URL      string
	Kyma         KymaConfig
}

type State

type State string
const (
	CREATING        State = "CREATING"
	UPDATING        State = "UPDATING"
	DELETING        State = "DELETING"
	OK              State = "OK"
	CREATION_FAILED State = "CREATION_FAILED"
	DELETION_FAILED State = "DELETION_FAILED"
	UPDATE_FAILED   State = "UPDATE_FAILED"
)

Jump to

Keyboard shortcuts

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