goss

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 5 Imported by: 0

README

API implementation for ScalableSpace products in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Instances *Instances
	Plans     *Plans
}

func NewClient

func NewClient(baseUrl, apiKey string) *Client

func NewClientFromToken

func NewClientFromToken(apiKey string) *Client

type Instance

type Instance struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Kind      string    `json:"kind"`
	Password  string    `json:"password,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	State     string    `json:"state,omitempty"`
	Enabled   bool      `json:"enabled,omitempty"`
	Whitelist []string  `json:"whitelist,omitempty"`
	PlanID    string    `json:"plan_id,omitempty"`

	ConnectionInfo *struct {
		MasterHost  string `json:"master_host"`
		ReplicaHost string `json:"replica_host"`
	} `json:"connection_info,omitempty"` // read-only
}

type Instances

type Instances struct {
	// contains filtered or unexported fields
}

func (*Instances) Create

func (api *Instances) Create(params *Instance) (*Instance, error)

func (*Instances) Delete

func (api *Instances) Delete(id string) error

func (*Instances) Get

func (api *Instances) Get(id string) (*Instance, error)

func (*Instances) List

func (api *Instances) List() ([]*Instance, error)

type Plan

type Plan struct {
	ID     string `json:"id" url:"-"`
	Kind   string `json:"kind"  url:"kind"`
	Name   string `json:"name"  url:"-"`
	Price  string `json:"price"  url:"-"`
	Cloud  string `json:"cloud"  url:"cloud"`
	Region string `json:"region"  url:"region"`
}

type Plans

type Plans struct {
	// contains filtered or unexported fields
}

func (*Plans) Find

func (api *Plans) Find(plan *Plan) (*Plan, error)

func (*Plans) Get

func (api *Plans) Get(id string) (*Plan, error)

func (*Plans) List

func (api *Plans) List() ([]*Plan, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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