query

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 3 Imported by: 7

Documentation

Overview

Package query defines agnostic structures used to communicate between the tool layer (e.g. Terraform) and the storage layer (e.g. MySQL). This way they can be visualized as "queries" made by the tool layer to the storage layer, in order to fetch pricing data matching certain parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Name            string
	HourlyQuantity  decimal.Decimal
	MonthlyQuantity decimal.Decimal
	Unit            string
	Details         []string
	ProductFilter   *product.Filter
	PriceFilter     *price.Filter
}

Component represents a price component of a cloud Resource. It is used to fetch the price for a single component of a resource. For example, a compute instance might be have different pricing for the number of CPU's, amount of RAM, etc. - each of these would be a Component.

type Resource

type Resource struct {
	// Address uniquely identifies this cloud Resource.
	Address string

	// Provider is the cloud provider that this Resource belongs to.
	Provider string

	// Type describes the type of the Resource.
	Type string

	// Components is a list of price components that make up this Resource. If it is empty, the resource
	// is considered to be skipped.
	Components []Component
}

Resource represents a single cloud resource. It has a unique Address and a collection of multiple Component queries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL