Documentation
¶
Index ¶
- Variables
- type Client
- type CreateRequest
- type DeleteRequest
- type GetRequest
- type Instance
- type ListRequest
- type Object
- type ResourceGroup
- type ResourceGroupService
- func (srv *ResourceGroupService) Create(resourceGroup *ResourceGroup) CreateRequest
- func (srv *ResourceGroupService) CreateWithToken(resourceGroup *ResourceGroup, token string) CreateRequest
- func (srv *ResourceGroupService) Get(name string, resourceGroup *ResourceGroup) GetRequest
- func (srv *ResourceGroupService) List(resourceGroups *[]*ResourceGroup) ListRequest
- type ResourceGroupUser
- type Service
- type Site
- type SiteService
- type Store
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
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.
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 ListRequest ¶
type ListRequest interface {
Include() ListRequest
Do() error
}
ListRequest represents the behavior of listing Kel objects.
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) 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 Site ¶
type Site struct {
Name string `json:"name,omitempty"`
ResourceGroup *ResourceGroup `json:"-"`
// contains filtered or unexported fields
}
Site represents a Kel site.
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) AddSortedList ¶
AddSortedList ..
type UpdateRequest ¶
type UpdateRequest interface {
Do() error
}
UpdateRequest represents the behavior of updating a Kel object.