Documentation
¶
Index ¶
- type Catalog
- func (c *Catalog) FetchPlanById(ctx context.Context, planID manifold.ID) (*catalogModels.Plan, error)
- func (c *Catalog) FetchPlanByLabel(ctx context.Context, productID manifold.ID, planLabel string) (*catalogModels.Plan, error)
- func (c *Catalog) GetPlan(ID manifold.ID) (*catalogModels.Plan, error)
- func (c *Catalog) GetProduct(ID manifold.ID) (*catalogModels.Product, error)
- func (c *Catalog) GetRegion(ID manifold.ID) (*catalogModels.Region, error)
- func (c *Catalog) Plans() []*catalogModels.Plan
- func (c *Catalog) Products() []*catalogModels.Product
- func (c *Catalog) Regions() []*catalogModels.Region
- func (c *Catalog) Sync(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog represents a local in memory cache of catalog data
func New ¶
New creates a new instance of a Catalog struct and populates it with data from the API using the provided Catalog API client and context
func (*Catalog) FetchPlanById ¶ added in v0.9.2
func (*Catalog) FetchPlanByLabel ¶ added in v0.9.2
func (*Catalog) GetPlan ¶
func (c *Catalog) GetPlan(ID manifold.ID) (*catalogModels.Plan, error)
GetPlan returns the Plan data model based on the provided id
func (*Catalog) GetProduct ¶
func (c *Catalog) GetProduct(ID manifold.ID) (*catalogModels.Product, error)
GetProduct returns the Product data model based on the provided id
func (*Catalog) GetRegion ¶
func (c *Catalog) GetRegion(ID manifold.ID) (*catalogModels.Region, error)
GetRegion returns the Region data model based on the provided string id
func (*Catalog) Plans ¶
func (c *Catalog) Plans() []*catalogModels.Plan
Returns a list of Plans from the Catalog
func (*Catalog) Products ¶
func (c *Catalog) Products() []*catalogModels.Product
Returns a list of Products from the Catalog
func (*Catalog) Regions ¶
func (c *Catalog) Regions() []*catalogModels.Region
Returns a list of Regions from the Catalog
Click to show internal directories.
Click to hide internal directories.