Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrOrderNotFound = orderErr("order does not exist")
)
Variables ¶
This section is empty.
Functions ¶
func NewOrderManager ¶
func NewOrderManager(ctx context.Context, orderEndpoint, authenticationEndpoint, apikey string) (*orderManagerImpl, context.CancelFunc)
Types ¶
type AccountInformation ¶
type AccountInformation struct { Links struct { Self struct { Href string `json:"href"` } `json:"self"` Licenses struct { Href string `json:"href"` } `json:"licenses"` } `json:"_links"` ID string `json:"id"` Status string `json:"status"` CreatedAt time.Time `json:"createdAt"` Roles []string `json:"roles"` Contract struct { Links struct { Self struct { Href string `json:"href"` } `json:"self"` Orders struct { Href string `json:"href"` } `json:"orders"` Payments struct { Href string `json:"href"` } `json:"payments"` Subscriptions struct { Href string `json:"href"` } `json:"subscriptions"` Deliveries struct { Href string `json:"href"` } `json:"deliveries"` Reports struct { Href string `json:"href"` } `json:"reports"` } `json:"_links"` ID string `json:"id"` Status string `json:"status"` CreatedAt time.Time `json:"createdAt"` Offers []string `json:"offers"` AmountUnit string `json:"amountUnit"` Kind string `json:"kind"` Name string `json:"name"` Balance int `json:"balance"` WorkspaceID string `json:"workspaceId"` } `json:"contract"` }
type OrderManager ¶
type OrderManager interface { Create(orderRequest OrderRequest) error GetStatus(orderRequest OrderRequest) (map[string]OrderStatus, error) GetPrice(orderRequest OrderRequest) (OrderPrice, error) GetAccountInformation() (AccountInformation, error) }
type OrderPrice ¶
type OrderRequest ¶
type OrderStatus ¶
Click to show internal directories.
Click to hide internal directories.