infraprovider

package
v1.0.3-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

WireSet provides a wire set for this package.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(
	authorizer authz.Authorizer,
	spaceStore store.SpaceStore,
	infraproviderSvc *infraprovider.Service,
) *Controller

func ProvideController

func ProvideController(
	authorizer authz.Authorizer,
	spaceStore store.SpaceStore,
	infraproviderSvc *infraprovider.Service,
) *Controller

func (*Controller) Create

func (c *Controller) Create(
	ctx context.Context,
	session *auth.Session,
	in *CreateInput,
) (*types.InfraProviderConfig, error)

Create creates a new infraprovider config.

func (*Controller) Find

func (c *Controller) Find(
	ctx context.Context,
	session *auth.Session,
	spaceRef string,
	identifier string,
) (*types.InfraProviderConfig, error)

type CreateInput

type CreateInput struct {
	Identifier string                              `json:"identifier"`
	SpaceRef   string                              `json:"space_ref"` // Ref of the parent space
	Name       string                              `json:"name"`
	Type       infraproviderenum.InfraProviderType `json:"type"`
	Metadata   map[string]string                   `json:"metadata"`
	Resources  []ResourceInput                     `json:"resources"`
}

type ResourceInput

type ResourceInput struct {
	Identifier         string                              `json:"identifier"`
	Name               string                              `json:"name"`
	InfraProviderType  infraproviderenum.InfraProviderType `json:"infra_provider_type"`
	CPU                *string                             `json:"cpu"`
	Memory             *string                             `json:"memory"`
	Disk               *string                             `json:"disk"`
	Network            *string                             `json:"network"`
	Region             []string                            `json:"region"`
	Metadata           map[string]string                   `json:"metadata"`
	GatewayHost        *string                             `json:"gateway_host"`
	GatewayPort        *string                             `json:"gateway_port"`
	TemplateIdentifier *string                             `json:"template_identifier"`
}

Jump to

Keyboard shortcuts

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