metering

package
v0.0.0-...-cee649a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeMonthly    = 1
	TypeQuarterly  = 2
	TypeAnnual     = 4
	TypeAnyPeriod  = 8
	TypeSettlement = 16
)

Variables

View Source
var SchemaInfo = `` /* 474-byte string literal not displayed */
View Source
var TableHistoryName = "history_metering_statement"
View Source
var TableName = "metering_statement"

Functions

func GetSchema

func GetSchema() string

func GetSchemaHistory

func GetSchemaHistory() string

Types

type MeteringItem

type MeteringItem struct {
	Number        int       `json:"number"`
	AllocInfo     string    `json:"alloc_info"`
	StartDatetime time.Time `json:"start_datetime"`
	EndDatetime   time.Time `json:"end_datetime"`
	TheHours      int       `json:"the_hours"`
	AmountInHours int       `json:"amount_in_hours"`
}

type Statement

type Statement struct {
	MeteringID       int    `db:"metering_id" json:"metering_id"`
	ProjectID        int    `db:"project_id" json:"project_id"`
	MeteringType     int    `db:"metering_type" json:"metering_type"`
	MeteringTypeInfo string `db:"metering_type_info" json:"metering_type_info"`

	CpuAmountInDays      int `db:"cpu_amount_in_days" json:"cpu_amount_in_days"`
	GpuAmountInDays      int `db:"gpu_amount_in_days" json:"gpu_amount_in_days"`
	StorageAmountInDays  int `db:"storage_amount_in_days" json:"storage_amount_in_days"`
	CpuAmountInHours     int `db:"cpu_amount_in_hours" json:"cpu_amount_in_hours"`
	GpuAmountInHours     int `db:"gpu_amount_in_hours" json:"gpu_amount_in_hours"`
	StorageAmountInHours int `db:"storage_amount_in_hours" json:"storage_amount_in_hours"`

	CpuNodeMeteringJson string `db:"cpu_node_metering" json:"cpu_node_metering"`
	GpuNodeMeteringJson string `db:"gpu_node_metering" json:"gpu_node_metering"`
	StorageMeteringJson string `db:"storage_node_metering" json:"storage_metering"`

	CreatedAt time.Time `db:"created_at" json:"created_at"`
}

Jump to

Keyboard shortcuts

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