Documentation
¶
Index ¶
- Variables
- func AccountCostMeta(period string) bigquery.TableMetadata
- func Create(ctx context.Context, projectID, location, dsn string, ...) error
- func Delete(ctx context.Context, projectID, location, dsn string, ...) error
- func Insert(ctx context.Context, projectID, location, dsn, table string, ...) error
- func Query(ctx context.Context, projectID, location, query string, ...) error
- func ReservationMeta(period string) bigquery.TableMetadata
- func Tables(ctx context.Context, projectID, location, dsn string) ([]bigquery.TableMetadata, error)
- type AccountCost
- type Client
- func (c *Client) Close() error
- func (c *Client) Create(ctx context.Context, dsn string, meta []bigquery.TableMetadata) error
- func (c *Client) Delete(ctx context.Context, dsn string, meta []bigquery.TableMetadata) error
- func (c *Client) Insert(ctx context.Context, dsn, table string, items []interface{}) error
- func (c *Client) Query(ctx context.Context, query string, fn func(values []bigquery.Value)) error
- func (c *Client) Tables(ctx context.Context, dsn string) ([]bigquery.TableMetadata, error)
- type Reservation
Constants ¶
This section is empty.
Variables ¶
View Source
var AccountCostSchema = bigquery.Schema{ {Name: "account_id", Type: bigquery.StringFieldType}, {Name: "description", Type: bigquery.StringFieldType}, {Name: "date", Type: bigquery.DateFieldType}, {Name: "service", Type: bigquery.StringFieldType}, {Name: "record_type", Type: bigquery.StringFieldType}, {Name: "unblended_cost", Type: bigquery.FloatFieldType}, {Name: "blended_cost", Type: bigquery.FloatFieldType}, {Name: "amortized_cost", Type: bigquery.FloatFieldType}, {Name: "net_amortized_cost", Type: bigquery.FloatFieldType}, {Name: "net_unblended_cost", Type: bigquery.FloatFieldType}, {Name: "inserted_at", Type: bigquery.TimestampFieldType}, }
View Source
var ReservationSchema = bigquery.Schema{ {Name: "account_id", Type: bigquery.StringFieldType}, {Name: "description", Type: bigquery.StringFieldType}, {Name: "region", Type: bigquery.StringFieldType}, {Name: "instance_type", Type: bigquery.StringFieldType}, {Name: "platform", Type: bigquery.StringFieldType}, {Name: "cache_engine", Type: bigquery.StringFieldType}, {Name: "database_engine", Type: bigquery.StringFieldType}, {Name: "deployment_option", Type: bigquery.StringFieldType}, {Name: "date", Type: bigquery.DateFieldType}, {Name: "hours", Type: bigquery.FloatFieldType}, {Name: "num", Type: bigquery.FloatFieldType}, {Name: "percentage", Type: bigquery.FloatFieldType}, {Name: "inserted_at", Type: bigquery.TimestampFieldType}, }
Functions ¶
func AccountCostMeta ¶
func AccountCostMeta(period string) bigquery.TableMetadata
func ReservationMeta ¶
func ReservationMeta(period string) bigquery.TableMetadata
Types ¶
type AccountCost ¶
type AccountCost struct { AccountID string `bigquery:"account_id"` Description string `bigquery:"description"` Date civil.Date `bigquery:"date"` Service string `bigquery:"service"` RecordType string `bigquery:"record_type"` UnblendedCost float64 `bigquery:"unblended_cost"` // volume discount for a single account BlendedCost float64 `bigquery:"blended_cost"` // volume discount across linked account AmortizedCost float64 `bigquery:"amortized_cost"` // unblended + ReservedInstances/12 NetAmortizedCost float64 `bigquery:"net_amortized_cost"` // before discount NetUnblendedCost float64 `bigquery:"net_unblended_cost"` // before discount InsertedAt time.Time `bigquery:"inserted_at"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Reservation ¶
type Reservation struct { AccountID string `bigquery:"account_id"` Description string `bigquery:"description"` Region string `bigquery:"region"` InstanceType string `bigquery:"instance_type"` Platform string `bigquery:"platform"` CacheEngine string `bigquery:"cache_engine"` DatabaseEngine string `bigquery:"database_engine"` DeploymentOption string `bigquery:"deployment_option"` Date civil.Date `bigquery:"date"` Hours float64 `bigquery:"hours"` Num float64 `bigquery:"num"` Percentage float64 `bigquery:"percentage"` InsertedAt time.Time `bigquery:"inserted_at"` }
Click to show internal directories.
Click to hide internal directories.