awsc

package
v0.0.16-uptimeapi.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsCost

type AwsCost struct {
	ID           int    `json:"id"`
	Ts           string `json:"ts"`
	Organisation string `json:"organisation"`
	AccountID    string `json:"account_id"`
	AccountName  string `json:"account_name"`
	Unit         string `json:"unit"`
	Label        string `json:"label"`
	Environment  string `json:"environment"`
	Service      string `json:"service"`
	Region       string `json:"region"`
	Date         string `json:"date"`
	Cost         string `json:"cost"`
}

func Fake

func Fake() (a *AwsCost)

func (*AwsCost) Insertable

func (a *AwsCost) Insertable() InsertParams

type AwsCostsTracker

type AwsCostsTracker struct {
	ID      int    `json:"id"`
	RunDate string `json:"run_date"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DailyCostsDetailedForUnitParams added in v1.1.0

type DailyCostsDetailedForUnitParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
	Unit  string `json:"unit"`
}

type DailyCostsDetailedForUnitRow added in v1.1.0

type DailyCostsDetailedForUnitRow struct {
	AccountID   string      `json:"account_id"`
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Service     string      `json:"service"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type DailyCostsDetailedParams

type DailyCostsDetailedParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type DailyCostsDetailedRow

type DailyCostsDetailedRow struct {
	AccountID   string      `json:"account_id"`
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Service     string      `json:"service"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type DailyCostsPerUnitEnvironmentParams

type DailyCostsPerUnitEnvironmentParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type DailyCostsPerUnitEnvironmentRow

type DailyCostsPerUnitEnvironmentRow struct {
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type DailyCostsPerUnitParams

type DailyCostsPerUnitParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type DailyCostsPerUnitRow

type DailyCostsPerUnitRow struct {
	Unit     string      `json:"unit"`
	Total    interface{} `json:"total"`
	Interval interface{} `json:"interval"`
}

type InsertParams

type InsertParams struct {
	Ts           string `json:"ts"`
	Organisation string `json:"organisation"`
	AccountID    string `json:"account_id"`
	AccountName  string `json:"account_name"`
	Unit         string `json:"unit"`
	Label        string `json:"label"`
	Environment  string `json:"environment"`
	Service      string `json:"service"`
	Region       string `json:"region"`
	Date         string `json:"date"`
	Cost         string `json:"cost"`
}

type MonthlyCostsDetailedForUnitParams added in v1.1.0

type MonthlyCostsDetailedForUnitParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
	Unit  string `json:"unit"`
}

type MonthlyCostsDetailedForUnitRow added in v1.1.0

type MonthlyCostsDetailedForUnitRow struct {
	AccountID   string      `json:"account_id"`
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Service     string      `json:"service"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type MonthlyCostsDetailedParams

type MonthlyCostsDetailedParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type MonthlyCostsDetailedRow

type MonthlyCostsDetailedRow struct {
	AccountID   string      `json:"account_id"`
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Service     string      `json:"service"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type MonthlyCostsPerUnitEnvironmentParams

type MonthlyCostsPerUnitEnvironmentParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type MonthlyCostsPerUnitEnvironmentRow

type MonthlyCostsPerUnitEnvironmentRow struct {
	Unit        string      `json:"unit"`
	Environment interface{} `json:"environment"`
	Total       interface{} `json:"total"`
	Interval    interface{} `json:"interval"`
}

type MonthlyCostsPerUnitParams

type MonthlyCostsPerUnitParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type MonthlyCostsPerUnitRow

type MonthlyCostsPerUnitRow struct {
	Unit     string      `json:"unit"`
	Total    interface{} `json:"total"`
	Interval interface{} `json:"interval"`
}

type MonthlyTotalsTaxSplitParams

type MonthlyTotalsTaxSplitParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type MonthlyTotalsTaxSplitRow

type MonthlyTotalsTaxSplitRow struct {
	Service  string      `json:"service"`
	Total    interface{} `json:"total"`
	Interval interface{} `json:"interval"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) Count

func (q *Queries) Count(ctx context.Context) (int64, error)

func (*Queries) DailyCostsDetailed

func (q *Queries) DailyCostsDetailed(ctx context.Context, arg DailyCostsDetailedParams) ([]DailyCostsDetailedRow, error)

func (*Queries) DailyCostsDetailedForUnit added in v1.1.0

func (q *Queries) DailyCostsDetailedForUnit(ctx context.Context, arg DailyCostsDetailedForUnitParams) ([]DailyCostsDetailedForUnitRow, error)

func (*Queries) DailyCostsPerUnit

func (q *Queries) DailyCostsPerUnit(ctx context.Context, arg DailyCostsPerUnitParams) ([]DailyCostsPerUnitRow, error)

func (*Queries) Insert

func (q *Queries) Insert(ctx context.Context, arg InsertParams) (int, error)

func (*Queries) MonthlyCostsDetailed

func (q *Queries) MonthlyCostsDetailed(ctx context.Context, arg MonthlyCostsDetailedParams) ([]MonthlyCostsDetailedRow, error)

func (*Queries) MonthlyCostsDetailedForUnit added in v1.1.0

func (q *Queries) MonthlyCostsDetailedForUnit(ctx context.Context, arg MonthlyCostsDetailedForUnitParams) ([]MonthlyCostsDetailedForUnitRow, error)

func (*Queries) MonthlyCostsPerUnit

func (q *Queries) MonthlyCostsPerUnit(ctx context.Context, arg MonthlyCostsPerUnitParams) ([]MonthlyCostsPerUnitRow, error)

func (*Queries) MonthlyTotalsTaxSplit

func (q *Queries) MonthlyTotalsTaxSplit(ctx context.Context, arg MonthlyTotalsTaxSplitParams) ([]MonthlyTotalsTaxSplitRow, error)

func (*Queries) Oldest

func (q *Queries) Oldest(ctx context.Context) (string, error)

func (*Queries) Total

func (q *Queries) Total(ctx context.Context, arg TotalParams) (interface{}, error)

func (*Queries) Track

func (q *Queries) Track(ctx context.Context, runDate string) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

func (*Queries) Youngest

func (q *Queries) Youngest(ctx context.Context) (string, error)

type TotalParams

type TotalParams struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

Jump to

Keyboard shortcuts

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