Documentation ¶
Overview ¶
Package order manages the bookkeeping and utilies required for users to create an 'order' meaning they have requested delegations for a certian resource.
Copyright (c) 2016 CloudFlare, Inc.
Index ¶
- Constants
- func GenerateNum() (num string)
- type Order
- type OrderIndex
- type Orderer
- func (o *Orderer) FindOrder(user string, labels []string) (string, bool)
- func (o *Orderer) NotifyDelegation(delegator, delegatee, orderNum, duration string, labels []string)
- func (o *Orderer) NotifyNewOrder(duration, orderNum string, names, labels []string, uses int, ...)
- func (o *Orderer) NotifyOrderFulfilled(name, orderNum string)
Constants ¶
View Source
const ( NewOrder = "%s has created an order for the label %s. requesting %d delegations for %s" NewOrderLink = "@%s - https://%s?%s" OrderFulfilled = "%s has had order %s fulfilled." NewDelegation = "%s has delegated the label %s to %s (per order %s) for %s" )
Variables ¶
This section is empty.
Functions ¶
func GenerateNum ¶
func GenerateNum() (num string)
Types ¶
type Order ¶
type OrderIndex ¶
type Orderer ¶
type Orderer struct { Orders map[string]Order Hipchat hipchat.HipchatClient AlternateName string }
Orders represents a mapping of Order IDs to Orders. This structure is useful for looking up information about individual Orders and whether or not an order has been fulfilled. Orders that have been fulfilled will be removed from the structure.
func NewOrderer ¶
func NewOrderer(hipchatClient hipchat.HipchatClient) (o Orderer)
NewOrder will create a new map of Orders
func (*Orderer) NotifyDelegation ¶
func (*Orderer) NotifyNewOrder ¶
func (*Orderer) NotifyOrderFulfilled ¶
Click to show internal directories.
Click to hide internal directories.