client

package
v0.0.0-...-2e93a4e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BASE_API_URL         = "https://api.containership.io"
	BASE_API_VERSION     = "v1"
	CONTENT_TYPE_HEADER  = "Content-Type"
	ORGANIZATION_HEADER  = "X-ContainerShip-Cloud-Organization"
	API_KEY_HEADER       = "X-ContainerShip-Cloud-API-Key"
	DEFAULT_CONTENT_TYPE = "application/json"
	DEFAULT_METHOD       = "POST"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOpts

type ClientOpts struct {
	ApiKey       string
	Organization string
}

type ContainerShipCloudClient

type ContainerShipCloudClient struct {
	Opts *ClientOpts
}

func NewContainerShipCloudClient

func NewContainerShipCloudClient(organization string, apiKey string) *ContainerShipCloudClient

func (*ContainerShipCloudClient) CreateApplication

func (c *ContainerShipCloudClient) CreateApplication(clusterId string, appName string, application map[string]interface{}) (*ResponseOpts, error)

func (*ContainerShipCloudClient) DeleteApplication

func (c *ContainerShipCloudClient) DeleteApplication(clusterId string, appName string) (*ResponseOpts, error)

func (*ContainerShipCloudClient) GetApplication

func (c *ContainerShipCloudClient) GetApplication(clusterId string, appName string) (*ResponseOpts, error)

func (*ContainerShipCloudClient) UpdateApplication

func (c *ContainerShipCloudClient) UpdateApplication(clusterId string, appName string, application map[string]interface{}) (*ResponseOpts, error)

type RequestOpts

type RequestOpts struct {
	ApiKey       string
	ClusterId    string
	Method       string
	Organization string
	Path         string
	QueryString  map[string]string
	Data         map[string]interface{}
}

type ResponseOpts

type ResponseOpts struct {
	Body       simplejson.Json
	StatusCode int
}

func ApiRequest

func ApiRequest(requestOpts *RequestOpts) (*ResponseOpts, error)

Jump to

Keyboard shortcuts

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