domain

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPlotGraphParametersIsNil = errors.New("domain: PlotGraphParameters is nil")

Functions

func MultipleOf5Ticker

func MultipleOf5Ticker(yMax float64) plot.ConstantTicks

Types

type Domain

type Domain struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Domain

func (*Domain) PlotGraph

func (d *Domain) PlotGraph(
	target io.Writer,
	ps *PlotGraphParameters,
) error

nolint: cyclop,funlen

type GCPCost

type GCPCost struct {
	Day      string  `bigquery:"day"`
	Project  string  `bigquery:"project"`
	Cost     float64 `bigquery:"cost"`
	Currency string  `bigquery:"currency"`
}

type GCPSKUCost

type GCPSKUCost struct {
	Day      string  `bigquery:"day"`
	Project  string  `bigquery:"project"`
	Service  string  `bigquery:"service"`
	SKU      string  `bigquery:"sku"`
	Cost     float64 `bigquery:"cost"`
	Currency string  `bigquery:"currency"`
}

type GCPServiceCost

type GCPServiceCost struct {
	Day      string  `bigquery:"day"`
	Project  string  `bigquery:"project"`
	Service  string  `bigquery:"service"`
	Cost     float64 `bigquery:"cost"`
	Currency string  `bigquery:"currency"`
}

type Option

type Option func(r *Domain) *Domain

func WithTicker

func WithTicker(ticker plot.Ticker) Option

type PlotGraphParameters

type PlotGraphParameters struct {
	GraphTitle        string
	XLabelText        string
	YLabelText        string
	Width             float64
	Hight             float64
	XAxisPointsCount  int
	From              time.Time
	To                time.Time
	TimeZone          *time.Location
	OrderedLegendsAsc []string
	LegendValuesMap   map[string]plotter.Values
	ImageFormat       string
}

Jump to

Keyboard shortcuts

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