Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Usage) predicate.Usage
- func ComputedAt(v time.Time) predicate.Usage
- func ComputedAtEQ(v time.Time) predicate.Usage
- func ComputedAtGT(v time.Time) predicate.Usage
- func ComputedAtGTE(v time.Time) predicate.Usage
- func ComputedAtIn(vs ...time.Time) predicate.Usage
- func ComputedAtLT(v time.Time) predicate.Usage
- func ComputedAtLTE(v time.Time) predicate.Usage
- func ComputedAtNEQ(v time.Time) predicate.Usage
- func ComputedAtNotIn(vs ...time.Time) predicate.Usage
- func CreatedAt(v time.Time) predicate.Usage
- func CreatedAtEQ(v time.Time) predicate.Usage
- func CreatedAtGT(v time.Time) predicate.Usage
- func CreatedAtGTE(v time.Time) predicate.Usage
- func CreatedAtIn(vs ...time.Time) predicate.Usage
- func CreatedAtLT(v time.Time) predicate.Usage
- func CreatedAtLTE(v time.Time) predicate.Usage
- func CreatedAtNEQ(v time.Time) predicate.Usage
- func CreatedAtNotIn(vs ...time.Time) predicate.Usage
- func FinalizedAt(v time.Time) predicate.Usage
- func FinalizedAtEQ(v time.Time) predicate.Usage
- func FinalizedAtGT(v time.Time) predicate.Usage
- func FinalizedAtGTE(v time.Time) predicate.Usage
- func FinalizedAtIn(vs ...time.Time) predicate.Usage
- func FinalizedAtIsNil() predicate.Usage
- func FinalizedAtLT(v time.Time) predicate.Usage
- func FinalizedAtLTE(v time.Time) predicate.Usage
- func FinalizedAtNEQ(v time.Time) predicate.Usage
- func FinalizedAtNotIn(vs ...time.Time) predicate.Usage
- func FinalizedAtNotNil() predicate.Usage
- func HasWorkspace() predicate.Usage
- func HasWorkspaceWith(preds ...predicate.Workspace) predicate.Usage
- func ID(id int64) predicate.Usage
- func IDEQ(id int64) predicate.Usage
- func IDGT(id int64) predicate.Usage
- func IDGTE(id int64) predicate.Usage
- func IDIn(ids ...int64) predicate.Usage
- func IDLT(id int64) predicate.Usage
- func IDLTE(id int64) predicate.Usage
- func IDNEQ(id int64) predicate.Usage
- func IDNotIn(ids ...int64) predicate.Usage
- func Metric(v string) predicate.Usage
- func MetricContains(v string) predicate.Usage
- func MetricContainsFold(v string) predicate.Usage
- func MetricEQ(v string) predicate.Usage
- func MetricEqualFold(v string) predicate.Usage
- func MetricGT(v string) predicate.Usage
- func MetricGTE(v string) predicate.Usage
- func MetricHasPrefix(v string) predicate.Usage
- func MetricHasSuffix(v string) predicate.Usage
- func MetricIn(vs ...string) predicate.Usage
- func MetricLT(v string) predicate.Usage
- func MetricLTE(v string) predicate.Usage
- func MetricNEQ(v string) predicate.Usage
- func MetricNotIn(vs ...string) predicate.Usage
- func Not(p predicate.Usage) predicate.Usage
- func Or(predicates ...predicate.Usage) predicate.Usage
- func PeriodStart(v time.Time) predicate.Usage
- func PeriodStartEQ(v time.Time) predicate.Usage
- func PeriodStartGT(v time.Time) predicate.Usage
- func PeriodStartGTE(v time.Time) predicate.Usage
- func PeriodStartIn(vs ...time.Time) predicate.Usage
- func PeriodStartLT(v time.Time) predicate.Usage
- func PeriodStartLTE(v time.Time) predicate.Usage
- func PeriodStartNEQ(v time.Time) predicate.Usage
- func PeriodStartNotIn(vs ...time.Time) predicate.Usage
- func UpdatedAt(v time.Time) predicate.Usage
- func UpdatedAtEQ(v time.Time) predicate.Usage
- func UpdatedAtGT(v time.Time) predicate.Usage
- func UpdatedAtGTE(v time.Time) predicate.Usage
- func UpdatedAtIn(vs ...time.Time) predicate.Usage
- func UpdatedAtLT(v time.Time) predicate.Usage
- func UpdatedAtLTE(v time.Time) predicate.Usage
- func UpdatedAtNEQ(v time.Time) predicate.Usage
- func UpdatedAtNotIn(vs ...time.Time) predicate.Usage
- func ValidColumn(column string) bool
- func Value(v int64) predicate.Usage
- func ValueEQ(v int64) predicate.Usage
- func ValueGT(v int64) predicate.Usage
- func ValueGTE(v int64) predicate.Usage
- func ValueIn(vs ...int64) predicate.Usage
- func ValueLT(v int64) predicate.Usage
- func ValueLTE(v int64) predicate.Usage
- func ValueNEQ(v int64) predicate.Usage
- func ValueNotIn(vs ...int64) predicate.Usage
- func WorkspaceID(v int64) predicate.Usage
- func WorkspaceIDEQ(v int64) predicate.Usage
- func WorkspaceIDIn(vs ...int64) predicate.Usage
- func WorkspaceIDNEQ(v int64) predicate.Usage
- func WorkspaceIDNotIn(vs ...int64) predicate.Usage
- type OrderOption
- func ByComputedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByFinalizedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMetric(opts ...sql.OrderTermOption) OrderOption
- func ByPeriodStart(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByValue(opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the usage type in the database. Label = "usage" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldWorkspaceID holds the string denoting the workspace_id field in the database. FieldWorkspaceID = "workspace_id" // FieldPeriodStart holds the string denoting the period_start field in the database. FieldPeriodStart = "period_start" // FieldMetric holds the string denoting the metric field in the database. FieldMetric = "metric" // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // FieldFinalizedAt holds the string denoting the finalized_at field in the database. FieldFinalizedAt = "finalized_at" // FieldComputedAt holds the string denoting the computed_at field in the database. FieldComputedAt = "computed_at" // EdgeWorkspace holds the string denoting the workspace edge name in mutations. EdgeWorkspace = "workspace" // Table holds the table name of the usage in the database. Table = "usages" // WorkspaceTable is the table that holds the workspace relation/edge. WorkspaceTable = "usages" // WorkspaceInverseTable is the table name for the Workspace entity. // It exists in this package in order to avoid circular dependency with the "workspace" package. WorkspaceInverseTable = "workspaces" // WorkspaceColumn is the table column denoting the workspace relation/edge. WorkspaceColumn = "workspace_id" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // MetricValidator is a validator for the "metric" field. It is called by the builders before save. MetricValidator func(string) error // DefaultValue holds the default value on creation for the "value" field. DefaultValue int64 // ValueValidator is a validator for the "value" field. It is called by the builders before save. ValueValidator func(int64) error )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldWorkspaceID, FieldPeriodStart, FieldMetric, FieldValue, FieldFinalizedAt, FieldComputedAt, }
Columns holds all SQL columns for usage fields.
Functions ¶
func ComputedAt ¶
ComputedAt applies equality check predicate on the "computed_at" field. It's identical to ComputedAtEQ.
func ComputedAtEQ ¶
ComputedAtEQ applies the EQ predicate on the "computed_at" field.
func ComputedAtGT ¶
ComputedAtGT applies the GT predicate on the "computed_at" field.
func ComputedAtGTE ¶
ComputedAtGTE applies the GTE predicate on the "computed_at" field.
func ComputedAtIn ¶
ComputedAtIn applies the In predicate on the "computed_at" field.
func ComputedAtLT ¶
ComputedAtLT applies the LT predicate on the "computed_at" field.
func ComputedAtLTE ¶
ComputedAtLTE applies the LTE predicate on the "computed_at" field.
func ComputedAtNEQ ¶
ComputedAtNEQ applies the NEQ predicate on the "computed_at" field.
func ComputedAtNotIn ¶
ComputedAtNotIn applies the NotIn predicate on the "computed_at" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func FinalizedAt ¶
FinalizedAt applies equality check predicate on the "finalized_at" field. It's identical to FinalizedAtEQ.
func FinalizedAtEQ ¶
FinalizedAtEQ applies the EQ predicate on the "finalized_at" field.
func FinalizedAtGT ¶
FinalizedAtGT applies the GT predicate on the "finalized_at" field.
func FinalizedAtGTE ¶
FinalizedAtGTE applies the GTE predicate on the "finalized_at" field.
func FinalizedAtIn ¶
FinalizedAtIn applies the In predicate on the "finalized_at" field.
func FinalizedAtIsNil ¶
FinalizedAtIsNil applies the IsNil predicate on the "finalized_at" field.
func FinalizedAtLT ¶
FinalizedAtLT applies the LT predicate on the "finalized_at" field.
func FinalizedAtLTE ¶
FinalizedAtLTE applies the LTE predicate on the "finalized_at" field.
func FinalizedAtNEQ ¶
FinalizedAtNEQ applies the NEQ predicate on the "finalized_at" field.
func FinalizedAtNotIn ¶
FinalizedAtNotIn applies the NotIn predicate on the "finalized_at" field.
func FinalizedAtNotNil ¶
FinalizedAtNotNil applies the NotNil predicate on the "finalized_at" field.
func HasWorkspace ¶
HasWorkspace applies the HasEdge predicate on the "workspace" edge.
func HasWorkspaceWith ¶
HasWorkspaceWith applies the HasEdge predicate on the "workspace" edge with a given conditions (other predicates).
func Metric ¶
Metric applies equality check predicate on the "metric" field. It's identical to MetricEQ.
func MetricContains ¶
MetricContains applies the Contains predicate on the "metric" field.
func MetricContainsFold ¶
MetricContainsFold applies the ContainsFold predicate on the "metric" field.
func MetricEqualFold ¶
MetricEqualFold applies the EqualFold predicate on the "metric" field.
func MetricHasPrefix ¶
MetricHasPrefix applies the HasPrefix predicate on the "metric" field.
func MetricHasSuffix ¶
MetricHasSuffix applies the HasSuffix predicate on the "metric" field.
func MetricNotIn ¶
MetricNotIn applies the NotIn predicate on the "metric" field.
func PeriodStart ¶
PeriodStart applies equality check predicate on the "period_start" field. It's identical to PeriodStartEQ.
func PeriodStartEQ ¶
PeriodStartEQ applies the EQ predicate on the "period_start" field.
func PeriodStartGT ¶
PeriodStartGT applies the GT predicate on the "period_start" field.
func PeriodStartGTE ¶
PeriodStartGTE applies the GTE predicate on the "period_start" field.
func PeriodStartIn ¶
PeriodStartIn applies the In predicate on the "period_start" field.
func PeriodStartLT ¶
PeriodStartLT applies the LT predicate on the "period_start" field.
func PeriodStartLTE ¶
PeriodStartLTE applies the LTE predicate on the "period_start" field.
func PeriodStartNEQ ¶
PeriodStartNEQ applies the NEQ predicate on the "period_start" field.
func PeriodStartNotIn ¶
PeriodStartNotIn applies the NotIn predicate on the "period_start" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Value ¶
Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func ValueNotIn ¶
ValueNotIn applies the NotIn predicate on the "value" field.
func WorkspaceID ¶
WorkspaceID applies equality check predicate on the "workspace_id" field. It's identical to WorkspaceIDEQ.
func WorkspaceIDEQ ¶
WorkspaceIDEQ applies the EQ predicate on the "workspace_id" field.
func WorkspaceIDIn ¶
WorkspaceIDIn applies the In predicate on the "workspace_id" field.
func WorkspaceIDNEQ ¶
WorkspaceIDNEQ applies the NEQ predicate on the "workspace_id" field.
func WorkspaceIDNotIn ¶
WorkspaceIDNotIn applies the NotIn predicate on the "workspace_id" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Usage queries.
func ByComputedAt ¶
func ByComputedAt(opts ...sql.OrderTermOption) OrderOption
ByComputedAt orders the results by the computed_at field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByFinalizedAt ¶
func ByFinalizedAt(opts ...sql.OrderTermOption) OrderOption
ByFinalizedAt orders the results by the finalized_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMetric ¶
func ByMetric(opts ...sql.OrderTermOption) OrderOption
ByMetric orders the results by the metric field.
func ByPeriodStart ¶
func ByPeriodStart(opts ...sql.OrderTermOption) OrderOption
ByPeriodStart orders the results by the period_start field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByValue ¶
func ByValue(opts ...sql.OrderTermOption) OrderOption
ByValue orders the results by the value field.
func ByWorkspaceField ¶
func ByWorkspaceField(field string, opts ...sql.OrderTermOption) OrderOption
ByWorkspaceField orders the results by workspace field.
func ByWorkspaceID ¶
func ByWorkspaceID(opts ...sql.OrderTermOption) OrderOption
ByWorkspaceID orders the results by the workspace_id field.