api

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: BSD-3-Clause Imports: 27 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Activity     *activity.Activity
	Analytics    *analytics.Analytics
	Billing      *billing.Billing
	Catalog      *catalog.Catalog
	Identity     *identity.Identity
	Marketplace  *marketplace.Marketplace
	Provisioning *provisioning.Provisioning
	Connector    *connector.Connector
	// contains filtered or unexported fields
}

API is a composition of all clients generated from the spec. Use the `New` function to load the necessary clients for the operation.

func New

func New(list ...Client) (*API, error)

New loads all clients passed on the list. If any of the clients fails to load an error is returned.

func (*API) AcceptInvite added in v0.11.0

func (api *API) AcceptInvite(token string) error

AcceptInvite accepts an invitation to join a team. A nil error means the invitation was accepted correctly.

func (*API) Context

func (api *API) Context() context.Context

Context returns API underlining context.

func (*API) Events added in v0.14.0

func (api *API) Events(scopeID manifold.ID) ([]*events.Event, error)

func (*API) FetchPlan

func (api *API) FetchPlan(label string, productID string) (*models.Plan, error)

FetchPlan returns a plan from a product.

func (*API) FetchPlans

func (api *API) FetchPlans(productID string) ([]*models.Plan, error)

FetchPlans returns a list of all plans for a product.

func (*API) FetchProduct

func (api *API) FetchProduct(label string, providerID string) (*models.Product, error)

FetchProduct returns a product based on a label.

func (*API) FetchProducts

func (api *API) FetchProducts(providerID string) ([]*models.Product, error)

FetchProducts returns a list of all products for a provider.

func (*API) FetchProvider

func (api *API) FetchProvider(label string) (*models.Provider, error)

FetchProvider returns a provider based on a label.

func (*API) FetchProviders

func (api *API) FetchProviders() ([]*models.Provider, error)

FetchProviders returns a list of all available providers.

func (*API) FetchRegions

func (api *API) FetchRegions() ([]*models.Region, error)

FetchRegions returns a list of all available regions.

func (*API) Roles added in v0.12.0

func (api *API) Roles(teamID *manifold.ID) ([]models.RoleLabel, error)

type Client

type Client int

Client represents one of the clients generated from the spec.

const (
	// Activity represents the analytics client
	Activity Client = iota

	// Analytics represents the analytics client
	Analytics

	// Billing represents the billing client
	Billing

	// Catalog represents the catalog client
	Catalog

	// Connector represents the connector client
	Connector

	// Identity represents the identity client
	Identity

	// Marketplace represents the marketplace client
	Marketplace

	// Provisioning represents the provisioning client
	Provisioning
)

func (Client) String

func (c Client) String() string

String returns a string representation of the client type.

Jump to

Keyboard shortcuts

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