provider

package
v0.0.0-...-8beeda4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: ISC Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelsMap = map[string]func(*Resource) Model{
	Types.AWS: NewAwsModel,
}

ModelsMap Maps provider name to model

View Source
var Status = &statusRegistry{
	"Complete",
	"InProgress",
	"Failed",
	"NotFound",
}

Status status

View Source
var Types = &providerRegistry{
	AWS: "AWS",
}

Types provider types

Functions

func Destroy

func Destroy(provisionMap map[int][]*Resource)

Destroy blows up the infrastructure in the cloud

func Provision

func Provision(provisionMap map[int][]*Resource)

Provision initiates resource provisioning of provider map

Types

type Model

type Model interface {
	Provision()
	Destroy()
	CheckStatus() string
}

Model provider model interface

func NewAwsModel

func NewAwsModel(r *Resource) Model

NewAwsModel AWS Model constructor

type Provider

type Provider struct {
	Name string `json:"name"`
	*ResourceCommands
}

Provider Hosted application provider

type Resource

type Resource struct {
	Name     string    `json:"name"`
	Path     string    `json:"path"`
	Body     string    `json:"body,omitempty"`
	Priority int       `json:"priority,omitempty"`
	Provider *Provider `json:"provider"`
	*ResourceCommands
}

Resource Provider resource (i.e. cloudformation)

type ResourceCommands

type ResourceCommands struct {
	PreProvision  []string `json:"preProvision"`
	PostProvision []string `json:"postProvision"`
}

ResourceCommands Custom resource commands

Jump to

Keyboard shortcuts

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