instance

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//HandlerPath - path to normal instance handlers
	HandlerPath = "/v2/service_instances/{instance_id}"
	//AsyncHandlerPath - path to async poller
	AsyncHandlerPath = "/v2/service_instances/{instance_id}/last_operation"
	//DashboardUrl - the url to the service instance tracker dashboard
	DashboardUrl = "https://www.pezapp.io"
)

Variables

View Source
var (
	PlanGUIDMap = map[string]string{
		"6a977311-a08d-11e5-8062-7831c1d4f660": "m1.small",
	}
)

Functions

func Delete

func Delete(collection cfmgo.Collection) func(http.ResponseWriter, *http.Request)

Delete - handler function for delete calls

func Get

func Get(collection cfmgo.Collection) func(http.ResponseWriter, *http.Request)

Get - handler function for get calls

func Patch

func Patch(collection cfmgo.Collection) func(http.ResponseWriter, *http.Request)

Patch - handler function for patch calls

func Put

func Put(collection cfmgo.Collection, dispenserCreds handlers.DispenserCreds) func(http.ResponseWriter, *http.Request)

Put - handler function for put calls

Types

type InstanceCreator added in v0.0.3

type InstanceCreator struct {
	Collection cfmgo.Collection
	Dispenser  handlers.DispenserCreds
	ClientDoer clientDoer
	Model      InstanceModel
}

InstanceCreator - a type which can handle creating service instance requests

func (*InstanceCreator) PutHandler added in v0.0.3

func (s *InstanceCreator) PutHandler(w http.ResponseWriter, req *http.Request)

PutHandler - this is the actual handler method that will be used for the incoming request

type InstanceModel added in v0.0.3

type InstanceModel struct {
	OrganizationGUID string                 `json:"organization_guid"`
	PlanID           string                 `json:"plan_id"`
	ServiceID        string                 `json:"service_id"`
	SpaceGUID        string                 `json:"space_guid"`
	Parameters       map[string]interface{} `json:"parameters"`
	TaskGUID         string
}

InstanceModel - persistence model struct

func (InstanceModel) Save added in v0.0.3

func (s InstanceModel) Save(col cfmgo.Collection)

Save - saves the model to the given collection

Jump to

Keyboard shortcuts

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