Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Store Store Supervisor Supervisor Genesis Genesis RequestID string Environment string Logger logrus.FieldLogger }
Context provides the API with all necessary data and interfaces for responding to requests.
It is cloned before each request, allowing per-request changes such as logger annotations.
type Genesis ¶
type Genesis interface { }
Genesis describes the interface required to communicate with the AWS account.
type Store ¶
type Store interface { CreateAccount(account *model.Account) error GetAccount(accountID string) (*model.Account, error) GetAccounts(filter *model.AccountFilter) ([]*model.Account, error) UpdateAccount(account *model.Account) error LockAccount(accountID, lockerID string) (bool, error) UnlockAccount(accountID, lockerID string, force bool) (bool, error) LockAccountAPI(accountID string) error UnlockAccountAPI(accountID string) error DeleteAccount(accountID string) error CreateWebhook(webhook *model.Webhook) error GetWebhook(webhookID string) (*model.Webhook, error) GetWebhooks(filter *model.WebhookFilter) ([]*model.Webhook, error) DeleteWebhook(webhookID string) error GetParentSubnet(id string) (model.ParentSubnet, error) GetParentSubnets(filter *model.ParentSubnetFilter) ([]model.ParentSubnet, error) AddParentSubnet(parentSubnet *model.ParentSubnet, subnets *[]model.Subnet) error LockParentSubnet(subnet, lockerID string) (bool, error) UnlockParentSubnet(subnet, lockerID string, force bool) (bool, error) ClaimSubnet(cidr string, accountID string) (*model.Subnet, error) GetSubnet(id string) (*model.Subnet, error) GetSubnets(filter *model.SubnetFilter) ([]*model.Subnet, error) UpdateSubnet(Subnet *model.Subnet) error }
Store describes the interface required to persist changes made via API requests.
type Supervisor ¶
type Supervisor interface {
Do() error
}
Supervisor describes the interface to notify the background jobs of an actionable change.
Click to show internal directories.
Click to hide internal directories.