Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct { // Amount Amount int64 `json:"amount,omitempty"` // Describes this product element Description string `json:"description,omitempty"` // Name of the product element Name string `json:"name,omitempty"` }
Element struct contains one element specifying some product's specifications in a Element
type Product ¶
type Product struct { // Describes this product Description string `json:"description,omitempty"` // Name of the product Name string `json:"name,omitempty"` // Price in cents Price int `json:"price,omitempty"` // The recurring price for the product in cents RecurringPrice int `json:"recurringPrice,omitempty"` }
Product struct for a Product
type Products ¶
type Products struct { // A list of big storage products BigStorage []Product `json:"bigStorage,omitempty"` // A list of block storage products BlockStorage []Product `json:"blockStorage,omitempty"` // A list of haip products Haip []Product `json:"haip,omitempty"` // A list of private network products PrivateNetworks []Product `json:"privateNetworks,omitempty"` // A list of vps products Vps []Product `json:"vps,omitempty"` // A list of vps addons VpsAddon []Product `json:"vpsAddon,omitempty"` }
Products struct containing all of the products the transip api has to offer. Grouped into subsections.
type Repository ¶
type Repository repository.RestRepository
Repository should be used to select the products you want to use in the other repositories for example which product to order when ordering a new Vps
func (*Repository) GetAll ¶
func (r *Repository) GetAll() (Products, error)
GetAll returns the Products struct containing a list of Products per product group in it
func (*Repository) GetSpecificationsForProduct ¶
func (r *Repository) GetSpecificationsForProduct(product Product) ([]Element, error)
GetSpecificationsForProduct returns the ProductElements for a given Product
Click to show internal directories.
Click to hide internal directories.