Documentation
¶
Index ¶
- Constants
- Variables
- type BriefProduct
- type DeploymentFee
- type Location
- type LocationList
- type LocationService
- type Module
- type ModuleList
- type ModuleService
- type Order
- type OrderService
- type OrderStatus
- type Ordering
- type Product
- type ProductAvailability
- type ProductItem
- type ProductList
- type ProductService
- func (p ProductService) Get(ctx context.Context, id int) (product Product, err error)
- func (p ProductService) List(ctx context.Context, cursor goclient.Cursor) (list ProductList, err error)
- func (p ProductService) ListByType(ctx context.Context, productType string, cursor goclient.Cursor) (list ProductList, err error)
- func (p ProductService) ListTypes(ctx context.Context, cursor goclient.Cursor) (list ProductTypeList, err error)
- type ProductType
- type ProductTypeList
- type ProductUsageCycle
- type Time
Constants ¶
View Source
const ( OrderStatusCreated = iota + 1 OrderStatusProcessing OrderStatusSucceeded OrderStatusFailed )
Variables ¶
View Source
var ErrOrderFailed = errors.New("order failed")
Functions ¶
This section is empty.
Types ¶
type BriefProduct ¶ added in v0.1.0
type DeploymentFee ¶
type LocationList ¶
type LocationList struct { goclient.Pagination Items []Location }
type LocationService ¶
type LocationService struct {
// contains filtered or unexported fields
}
func NewLocationService ¶
func NewLocationService(client goclient.Client) LocationService
func (LocationService) List ¶
func (l LocationService) List(ctx context.Context, cursor goclient.Cursor) (list LocationList, err error)
type ModuleList ¶
type ModuleList struct { goclient.Pagination Items []Module }
type ModuleService ¶
type ModuleService struct {
// contains filtered or unexported fields
}
func NewModuleService ¶
func NewModuleService(client goclient.Client) ModuleService
func (ModuleService) List ¶
func (l ModuleService) List(ctx context.Context, cursor goclient.Cursor) (list ModuleList, err error)
type Order ¶
type Order struct { ID int `json:"id"` Status OrderStatus `json:"status"` Product Product `json:"product_instance"` CreatedAt Time `json:"created_at"` }
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService(client goclient.Client) OrderService
func (OrderService) WaitForCompletion
deprecated
func (o OrderService) WaitForCompletion(ctx context.Context, ordering Ordering) error
Deprecated: use WaitUntilProcessed instead
func (OrderService) WaitUntilProcessed ¶ added in v0.2.6
type OrderStatus ¶
type Ordering ¶
type Ordering struct {
Ref string `json:"ref"`
}
func (Ordering) ExtractIdentifier ¶
type Product ¶
type Product struct { ID int `json:"id"` Name string `json:"product_name"` Type ProductType `json:"type"` Visibility string `json:"visibility"` UsageCycle ProductUsageCycle `json:"usage_cycle"` Items []ProductItem `json:"items"` Price float64 `json:"price"` Availability []ProductAvailability `json:"availability"` Category string `json:"category"` DeploymentFees []DeploymentFee `json:"deployment_fees"` }
type ProductAvailability ¶
type ProductItem ¶
type ProductList ¶
type ProductList struct { Items []Product Pagination goclient.Pagination }
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService(client goclient.Client) ProductService
func (ProductService) List ¶
func (p ProductService) List(ctx context.Context, cursor goclient.Cursor) (list ProductList, err error)
func (ProductService) ListByType ¶
func (p ProductService) ListByType(ctx context.Context, productType string, cursor goclient.Cursor) (list ProductList, err error)
func (ProductService) ListTypes ¶ added in v0.1.0
func (p ProductService) ListTypes(ctx context.Context, cursor goclient.Cursor) (list ProductTypeList, err error)
type ProductType ¶
type ProductTypeList ¶ added in v0.1.0
type ProductTypeList struct { Items []ProductType Pagination goclient.Pagination }
type ProductUsageCycle ¶
Click to show internal directories.
Click to hide internal directories.