awsu

package
v1.7.1-addpagewrapp.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 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 AwsUptime

type AwsUptime struct {
	ID      int     `json:"id"`
	Ts      string  `json:"ts"`
	Unit    string  `json:"unit"`
	Average float64 `json:"average"`
	Date    string  `json:"date"`
}

func Fake

func Fake() (a *AwsUptime)

func (*AwsUptime) Insertable

func (a *AwsUptime) Insertable() InsertParams

type AwsUptimeTracker

type AwsUptimeTracker 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 InsertParams

type InsertParams struct {
	Ts      string  `json:"ts"`
	Unit    string  `json:"unit"`
	Date    string  `json:"date"`
	Average float64 `json:"average"`
}

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) Insert

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

func (*Queries) Oldest

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

func (*Queries) Track

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

func (*Queries) UptimePerDay added in v1.6.0

func (q *Queries) UptimePerDay(ctx context.Context, arg UptimePerDayParams) ([]UptimePerDayRow, error)

func (*Queries) UptimePerDayFilterByUnit added in v1.6.0

func (q *Queries) UptimePerDayFilterByUnit(ctx context.Context, arg UptimePerDayFilterByUnitParams) ([]UptimePerDayFilterByUnitRow, error)

func (*Queries) UptimePerDayUnit added in v1.6.0

func (q *Queries) UptimePerDayUnit(ctx context.Context, arg UptimePerDayUnitParams) ([]UptimePerDayUnitRow, error)

func (*Queries) UptimePerMonth added in v1.6.0

func (q *Queries) UptimePerMonth(ctx context.Context, arg UptimePerMonthParams) ([]UptimePerMonthRow, error)

func (*Queries) UptimePerMonthFilterByUnit added in v1.6.0

func (q *Queries) UptimePerMonthFilterByUnit(ctx context.Context, arg UptimePerMonthFilterByUnitParams) ([]UptimePerMonthFilterByUnitRow, error)

func (*Queries) UptimePerMonthUnit added in v1.6.0

func (q *Queries) UptimePerMonthUnit(ctx context.Context, arg UptimePerMonthUnitParams) ([]UptimePerMonthUnitRow, 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 UptimePerDayFilterByUnitParams added in v1.6.0

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

type UptimePerDayFilterByUnitRow added in v1.6.0

type UptimePerDayFilterByUnitRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
	Unit     string      `json:"unit"`
}

type UptimePerDayParams added in v1.6.0

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

type UptimePerDayRow added in v1.6.0

type UptimePerDayRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
}

type UptimePerDayUnitParams added in v1.6.0

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

type UptimePerDayUnitRow added in v1.6.0

type UptimePerDayUnitRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
	Unit     string      `json:"unit"`
}

type UptimePerMonthFilterByUnitParams added in v1.6.0

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

type UptimePerMonthFilterByUnitRow added in v1.6.0

type UptimePerMonthFilterByUnitRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
	Unit     string      `json:"unit"`
}

type UptimePerMonthParams added in v1.6.0

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

type UptimePerMonthRow added in v1.6.0

type UptimePerMonthRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
}

type UptimePerMonthUnitParams added in v1.6.0

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

type UptimePerMonthUnitRow added in v1.6.0

type UptimePerMonthUnitRow struct {
	Average  interface{} `json:"average"`
	Interval interface{} `json:"interval"`
	Unit     string      `json:"unit"`
}

Jump to

Keyboard shortcuts

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