kel

package module
v0.0.0-...-6b33344 Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 1

README

Kel Go Library
==============

.. image:: http://slack.kelproject.com/badge.svg
   :target: http://slack.kelproject.com/

.. image:: https://img.shields.io/travis/kelproject/api.svg
   :target: https://travis-ci.org/kelproject/api

.. image:: https://img.shields.io/badge/license-apache-blue.svg


Kel API client library for Go. It is a part of the Kel Project.


.. image:: https://storage.googleapis.com/kel-assets/kel_full-02_200.jpg
   :target: http://kelproject.com/

Kel is an open source Platform as a Service (PaaS) from Eldarion, Inc. that
makes it easy to manage web application deployment and hosting through the
entire lifecycle from development through testing to production. It adds
components and tools on top of Kubernetes that help developers manage their
application infrastructure. Kel builds on Eldarion's 7+ years experience running
one of the leading Python and Django PaaSes.

For more information about Kel, see `kelproject.com`_, follow us on Twitter
`@projectkel`_, and join our `Slack team`_.

.. _kelproject.com: http://kelproject.com/
.. _@projectkel: https://twitter.com/projectkel
.. _Slack team: http://slack.kelproject.com/


License
-------

The code in this project is licensed under the Apache License, version 2.0
(included in this repository under LICENSE).


Contributing
------------

By making a contribution to this project, you are agreeing to the `Developer
Certificate of Origin v1.1`_ (also included in this repository under DCO.txt).

.. _Developer Certificate of Origin v1.1: http://developercertificate.org


Code of Conduct
----------------

In order to foster a kind, inclusive, and harassment-free community, the Kel
Project follows the `Contributor Covenant Code of Conduct`_.

.. _Contributor Covenant Code of Conduct: http://contributor-covenant.org/version/1/4/


Commercial Support
------------------

Commercial support for Kel is available through Eldarion, please contact
info@eldarion.com.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("object requested was not found")

ErrNotFound is the error resulting if the requested object returned a 404

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client

	ResourceGroups *ResourceGroupService
	Sites          *SiteService
	// contains filtered or unexported fields
}

Client represents the HTTP client used to perform requests against the Kel API.

func New

func New(httpClient *http.Client, baseURL string) (*Client, error)

New returns a Kel HTTP client to perform requests.

type CreateRequest

type CreateRequest interface {
	Do() error
}

CreateRequest represents the behavior of creating a Kel object.

type DeleteRequest

type DeleteRequest interface {
	Do() error
}

DeleteRequest represents the behavior of deleting a Kel object.

type GetRequest

type GetRequest interface {
	Include() GetRequest
	Do() error
}

GetRequest represents the behavior of getting a Kel object.

type Instance

type Instance struct {
	Label string `json:"label,omitempty"`

	Site *Site `json:"-"`
}

Instance represents a Kel instance.

type ListRequest

type ListRequest interface {
	Include() ListRequest
	Do() error
}

ListRequest represents the behavior of listing Kel objects.

type Object

type Object interface {
	GetResourceType() string
	GetID() string
}

Object ...

type ResourceGroup

type ResourceGroup struct {
	Name    string `json:"name,omitempty"`
	Created string `json:"created,omitempty"`
	// contains filtered or unexported fields
}

ResourceGroup represents a Kel resource group.

func (*ResourceGroup) Delete

func (resourceGroup *ResourceGroup) Delete() error

Delete will destroy the resource group.

func (*ResourceGroup) GetID

func (resourceGroup *ResourceGroup) GetID() string

GetID ...

func (*ResourceGroup) GetResourceType

func (resourceGroup *ResourceGroup) GetResourceType() string

GetResourceType ...

func (*ResourceGroup) Reload

func (resourceGroup *ResourceGroup) Reload() error

Reload will get an updated resource group and point to it as its own.

func (*ResourceGroup) Save

func (resourceGroup *ResourceGroup) Save() error

Save will persistent local data with the API.

type ResourceGroupService

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

ResourceGroupService represents the link between the ResourceGroup and the Client.

func (*ResourceGroupService) Create

func (srv *ResourceGroupService) Create(resourceGroup *ResourceGroup) CreateRequest

Create sends an HTTP request to create the Kel resource group.

func (*ResourceGroupService) CreateWithToken

func (srv *ResourceGroupService) CreateWithToken(resourceGroup *ResourceGroup, token string) CreateRequest

CreateWithToken sends an HTTP request to create the Kel resource group providing the given token.

func (*ResourceGroupService) Get

func (srv *ResourceGroupService) Get(name string, resourceGroup *ResourceGroup) GetRequest

Get returns the resource group with the given name reachable by the API

func (*ResourceGroupService) List

func (srv *ResourceGroupService) List(resourceGroups *[]*ResourceGroup) ListRequest

List returns all resource groups reachable by the API

type ResourceGroupUser

type ResourceGroupUser struct {
}

ResourceGroupUser represents a Kel resource group user.

type Service

type Service struct {
	Name string `json:"name,omitempty"`

	Instance *Instance `json:"-"`
}

Service represents a Kel service.

type Site

type Site struct {
	Name string `json:"name,omitempty"`

	ResourceGroup *ResourceGroup `json:"-"`
	// contains filtered or unexported fields
}

Site represents a Kel site.

func (*Site) Delete

func (site *Site) Delete() error

Delete will destroy the site.

func (*Site) GetID

func (site *Site) GetID() string

GetID ...

func (*Site) GetResourceType

func (site *Site) GetResourceType() string

GetResourceType ...

func (*Site) Reload

func (site *Site) Reload() error

Reload will get an updated site and point to it as its own.

func (*Site) Save

func (site *Site) Save() error

Save will persistent local data with the API.

type SiteService

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

SiteService represents the link between the Site and the Client.

func (*SiteService) Create

func (srv *SiteService) Create(site *Site) CreateRequest

Create sends an HTTP request to create the Kel site.

func (*SiteService) Get

func (srv *SiteService) Get(name string, site *Site) GetRequest

Get returns the site with the given name reachable by the API

func (*SiteService) List

func (srv *SiteService) List(resourceGroup *ResourceGroup, sites *[]*Site) ListRequest

List returns all sites reachable by the API

type Store

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

Store represents objects retrieved from the Kel API

func (*Store) Add

func (store *Store) Add(obj Object)

Add ...

func (*Store) AddSortedList

func (store *Store) AddSortedList(key string, objs []Object)

AddSortedList ..

func (*Store) Get

func (store *Store) Get(resourceType string, ID string) Object

Get ...

func (*Store) List

func (store *Store) List(resourceType string) []Object

List ...

func (*Store) ListSorted

func (store *Store) ListSorted(resourceType string, key string) []Object

ListSorted ...

type UpdateRequest

type UpdateRequest interface {
	Do() error
}

UpdateRequest represents the behavior of updating a Kel object.

Jump to

Keyboard shortcuts

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