api

package
v0.0.0-...-e95300f Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServeMux

func NewServeMux(db primitives.Database, pkey string, oauth oauth2.Config) (*http.ServeMux, error)

NewServeMux returns a new http ServeMux that handles api calls.

Types

type CredentialResponse

type CredentialResponse struct {
	Message     string
	Credentials map[string]string
}

CredentialResponse is the expected response from us when Manifold is trying to createa new credentials set

type CredentialsRequest

type CredentialsRequest struct {
	CredentialID string `json:"id"`
	ResourceID   string `json:"resource_id"`
}

CredentialsRequest is the expected request when Manifold is trying to create a new credentials set

type FeatureMap

type FeatureMap manifold.FeatureMap

FeatureMap is a wrap around manifold.FeatureMap with some helpers for the workshop

func (FeatureMap) GetBool

func (fm FeatureMap) GetBool(key string) bool

GetBool tries to get a boolean feature with the key passed. If the feature isn't a boolean, it panics.

func (FeatureMap) GetInt

func (fm FeatureMap) GetInt(key string) int

GetInt tries to get an int feature with the key passed. If the feature isn't an int, it panics.

func (FeatureMap) GetString

func (fm FeatureMap) GetString(key string) string

GetString tries to get a string feature with the key passed. If the feature isn't a string, it panics.

type ProvisionRequest

type ProvisionRequest struct {
	ResourceID string `json:"id"`
	Product    string
	Plan       string
	Region     string
	Features   FeatureMap
}

ProvisionRequest is the expected request from Manifold when it's trying to provision a new resource.

Jump to

Keyboard shortcuts

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