Documentation
¶
Index ¶
- Constants
- Variables
- type Controller
- func (c *Controller) Create(ctx context.Context, session auth.Session, in CreateInput) (*types.InfraProviderConfig, error)
- func (c *Controller) CreateResources(ctx context.Context, session auth.Session, in []ResourceInput, ...) ([]types.InfraProviderResource, error)
- func (c *Controller) CreateTemplate(ctx context.Context, session *auth.Session, in *TemplateInput, ...) (*types.InfraProviderTemplate, error)
- func (c *Controller) Find(ctx context.Context, session *auth.Session, spaceRef string, identifier string) (*types.InfraProviderConfig, error)
- func (c *Controller) MapToInfraProviderConfig(in CreateInput, parentSpace *types.Space, now int64) *types.InfraProviderConfig
- type CreateInput
- type ResourceInput
- type TemplateInput
Constants ¶
View Source
const NoResourceIdentifier = ""
Variables ¶
View Source
var WireSet = wire.NewSet( ProvideController, )
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 infra provider.
func (*Controller) CreateResources ¶
func (c *Controller) CreateResources( ctx context.Context, session auth.Session, in []ResourceInput, configIdentifier string, spaceRef string, ) ([]types.InfraProviderResource, error)
func (*Controller) CreateTemplate ¶
func (c *Controller) CreateTemplate( ctx context.Context, session *auth.Session, in *TemplateInput, configIdentifier string, spaceRef string, ) (*types.InfraProviderTemplate, error)
func (*Controller) Find ¶
func (c *Controller) Find( ctx context.Context, session *auth.Session, spaceRef string, identifier string, ) (*types.InfraProviderConfig, error)
func (*Controller) MapToInfraProviderConfig ¶
func (c *Controller) MapToInfraProviderConfig( in CreateInput, parentSpace *types.Space, now int64, ) *types.InfraProviderConfig
type CreateInput ¶
type CreateInput struct {
Identifier string `json:"identifier" yaml:"identifier"`
SpaceRef string `json:"space_ref" yaml:"space_ref"` // Ref of the parent space
Name string `json:"name" yaml:"name"`
Type enum.InfraProviderType `json:"type" yaml:"type"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
Resources []ResourceInput `json:"resources" yaml:"resources"`
}
type ResourceInput ¶
type ResourceInput struct {
Identifier string `json:"identifier" yaml:"identifier"`
Name string `json:"name" yaml:"name"`
InfraProviderType enum.InfraProviderType `json:"infra_provider_type" yaml:"infra_provider_type"`
CPU *string `json:"cpu" yaml:"cpu"`
Memory *string `json:"memory" yaml:"memory"`
Disk *string `json:"disk" yaml:"disk"`
Network *string `json:"network" yaml:"network"`
Region []string `json:"region" yaml:"region"`
Metadata map[string]string `json:"metadata" yaml:"metadata"`
GatewayHost *string `json:"gateway_host" yaml:"gateway_host"`
GatewayPort *string `json:"gateway_port" yaml:"gateway_port"`
TemplateIdentifier *string `json:"template_identifier" yaml:"template_identifier"`
}
type TemplateInput ¶
Click to show internal directories.
Click to hide internal directories.