entitlement

package
v1.0.0-beta.172 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the entitlement type in the database.
	Label = "entitlement"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldNamespace holds the string denoting the namespace field in the database.
	FieldNamespace = "namespace"
	// FieldMetadata holds the string denoting the metadata field in the database.
	FieldMetadata = "metadata"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldEntitlementType holds the string denoting the entitlement_type field in the database.
	FieldEntitlementType = "entitlement_type"
	// FieldFeatureID holds the string denoting the feature_id field in the database.
	FieldFeatureID = "feature_id"
	// FieldFeatureKey holds the string denoting the feature_key field in the database.
	FieldFeatureKey = "feature_key"
	// FieldSubjectKey holds the string denoting the subject_key field in the database.
	FieldSubjectKey = "subject_key"
	// FieldMeasureUsageFrom holds the string denoting the measure_usage_from field in the database.
	FieldMeasureUsageFrom = "measure_usage_from"
	// FieldIssueAfterReset holds the string denoting the issue_after_reset field in the database.
	FieldIssueAfterReset = "issue_after_reset"
	// FieldIssueAfterResetPriority holds the string denoting the issue_after_reset_priority field in the database.
	FieldIssueAfterResetPriority = "issue_after_reset_priority"
	// FieldIsSoftLimit holds the string denoting the is_soft_limit field in the database.
	FieldIsSoftLimit = "is_soft_limit"
	// FieldPreserveOverageAtReset holds the string denoting the preserve_overage_at_reset field in the database.
	FieldPreserveOverageAtReset = "preserve_overage_at_reset"
	// FieldConfig holds the string denoting the config field in the database.
	FieldConfig = "config"
	// FieldUsagePeriodInterval holds the string denoting the usage_period_interval field in the database.
	FieldUsagePeriodInterval = "usage_period_interval"
	// FieldUsagePeriodAnchor holds the string denoting the usage_period_anchor field in the database.
	FieldUsagePeriodAnchor = "usage_period_anchor"
	// FieldCurrentUsagePeriodStart holds the string denoting the current_usage_period_start field in the database.
	FieldCurrentUsagePeriodStart = "current_usage_period_start"
	// FieldCurrentUsagePeriodEnd holds the string denoting the current_usage_period_end field in the database.
	FieldCurrentUsagePeriodEnd = "current_usage_period_end"
	// EdgeUsageReset holds the string denoting the usage_reset edge name in mutations.
	EdgeUsageReset = "usage_reset"
	// EdgeGrant holds the string denoting the grant edge name in mutations.
	EdgeGrant = "grant"
	// EdgeBalanceSnapshot holds the string denoting the balance_snapshot edge name in mutations.
	EdgeBalanceSnapshot = "balance_snapshot"
	// EdgeFeature holds the string denoting the feature edge name in mutations.
	EdgeFeature = "feature"
	// Table holds the table name of the entitlement in the database.
	Table = "entitlements"
	// UsageResetTable is the table that holds the usage_reset relation/edge.
	UsageResetTable = "usage_resets"
	// UsageResetInverseTable is the table name for the UsageReset entity.
	// It exists in this package in order to avoid circular dependency with the "usagereset" package.
	UsageResetInverseTable = "usage_resets"
	// UsageResetColumn is the table column denoting the usage_reset relation/edge.
	UsageResetColumn = "entitlement_id"
	// GrantTable is the table that holds the grant relation/edge.
	GrantTable = "grants"
	// GrantInverseTable is the table name for the Grant entity.
	// It exists in this package in order to avoid circular dependency with the "dbgrant" package.
	GrantInverseTable = "grants"
	// GrantColumn is the table column denoting the grant relation/edge.
	GrantColumn = "owner_id"
	// BalanceSnapshotTable is the table that holds the balance_snapshot relation/edge.
	BalanceSnapshotTable = "balance_snapshots"
	// BalanceSnapshotInverseTable is the table name for the BalanceSnapshot entity.
	// It exists in this package in order to avoid circular dependency with the "balancesnapshot" package.
	BalanceSnapshotInverseTable = "balance_snapshots"
	// BalanceSnapshotColumn is the table column denoting the balance_snapshot relation/edge.
	BalanceSnapshotColumn = "owner_id"
	// FeatureTable is the table that holds the feature relation/edge.
	FeatureTable = "entitlements"
	// FeatureInverseTable is the table name for the Feature entity.
	// It exists in this package in order to avoid circular dependency with the "feature" package.
	FeatureInverseTable = "features"
	// FeatureColumn is the table column denoting the feature relation/edge.
	FeatureColumn = "feature_id"
)

Variables

View Source
var (
	// NamespaceValidator is a validator for the "namespace" field. It is called by the builders before save.
	NamespaceValidator func(string) error
	// 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
	// FeatureKeyValidator is a validator for the "feature_key" field. It is called by the builders before save.
	FeatureKeyValidator func(string) error
	// SubjectKeyValidator is a validator for the "subject_key" field. It is called by the builders before save.
	SubjectKeyValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
)

Columns holds all SQL columns for entitlement fields.

Functions

func And

func And(predicates ...predicate.Entitlement) predicate.Entitlement

And groups predicates with the AND operator between them.

func ConfigIsNil

func ConfigIsNil() predicate.Entitlement

ConfigIsNil applies the IsNil predicate on the "config" field.

func ConfigNotNil

func ConfigNotNil() predicate.Entitlement

ConfigNotNil applies the NotNil predicate on the "config" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Entitlement

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Entitlement

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Entitlement

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Entitlement

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Entitlement

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Entitlement

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Entitlement

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Entitlement

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Entitlement

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CurrentUsagePeriodEnd

func CurrentUsagePeriodEnd(v time.Time) predicate.Entitlement

CurrentUsagePeriodEnd applies equality check predicate on the "current_usage_period_end" field. It's identical to CurrentUsagePeriodEndEQ.

func CurrentUsagePeriodEndEQ

func CurrentUsagePeriodEndEQ(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndEQ applies the EQ predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndGT

func CurrentUsagePeriodEndGT(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndGT applies the GT predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndGTE

func CurrentUsagePeriodEndGTE(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndGTE applies the GTE predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndIn

func CurrentUsagePeriodEndIn(vs ...time.Time) predicate.Entitlement

CurrentUsagePeriodEndIn applies the In predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndIsNil

func CurrentUsagePeriodEndIsNil() predicate.Entitlement

CurrentUsagePeriodEndIsNil applies the IsNil predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndLT

func CurrentUsagePeriodEndLT(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndLT applies the LT predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndLTE

func CurrentUsagePeriodEndLTE(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndLTE applies the LTE predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndNEQ

func CurrentUsagePeriodEndNEQ(v time.Time) predicate.Entitlement

CurrentUsagePeriodEndNEQ applies the NEQ predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndNotIn

func CurrentUsagePeriodEndNotIn(vs ...time.Time) predicate.Entitlement

CurrentUsagePeriodEndNotIn applies the NotIn predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodEndNotNil

func CurrentUsagePeriodEndNotNil() predicate.Entitlement

CurrentUsagePeriodEndNotNil applies the NotNil predicate on the "current_usage_period_end" field.

func CurrentUsagePeriodStart

func CurrentUsagePeriodStart(v time.Time) predicate.Entitlement

CurrentUsagePeriodStart applies equality check predicate on the "current_usage_period_start" field. It's identical to CurrentUsagePeriodStartEQ.

func CurrentUsagePeriodStartEQ

func CurrentUsagePeriodStartEQ(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartEQ applies the EQ predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartGT

func CurrentUsagePeriodStartGT(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartGT applies the GT predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartGTE

func CurrentUsagePeriodStartGTE(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartGTE applies the GTE predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartIn

func CurrentUsagePeriodStartIn(vs ...time.Time) predicate.Entitlement

CurrentUsagePeriodStartIn applies the In predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartIsNil

func CurrentUsagePeriodStartIsNil() predicate.Entitlement

CurrentUsagePeriodStartIsNil applies the IsNil predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartLT

func CurrentUsagePeriodStartLT(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartLT applies the LT predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartLTE

func CurrentUsagePeriodStartLTE(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartLTE applies the LTE predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartNEQ

func CurrentUsagePeriodStartNEQ(v time.Time) predicate.Entitlement

CurrentUsagePeriodStartNEQ applies the NEQ predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartNotIn

func CurrentUsagePeriodStartNotIn(vs ...time.Time) predicate.Entitlement

CurrentUsagePeriodStartNotIn applies the NotIn predicate on the "current_usage_period_start" field.

func CurrentUsagePeriodStartNotNil

func CurrentUsagePeriodStartNotNil() predicate.Entitlement

CurrentUsagePeriodStartNotNil applies the NotNil predicate on the "current_usage_period_start" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Entitlement

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Entitlement

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Entitlement

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Entitlement

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Entitlement

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Entitlement

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Entitlement

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Entitlement

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Entitlement

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Entitlement

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Entitlement

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func EntitlementTypeEQ

func EntitlementTypeEQ(v EntitlementType) predicate.Entitlement

EntitlementTypeEQ applies the EQ predicate on the "entitlement_type" field.

func EntitlementTypeIn

func EntitlementTypeIn(vs ...EntitlementType) predicate.Entitlement

EntitlementTypeIn applies the In predicate on the "entitlement_type" field.

func EntitlementTypeNEQ

func EntitlementTypeNEQ(v EntitlementType) predicate.Entitlement

EntitlementTypeNEQ applies the NEQ predicate on the "entitlement_type" field.

func EntitlementTypeNotIn

func EntitlementTypeNotIn(vs ...EntitlementType) predicate.Entitlement

EntitlementTypeNotIn applies the NotIn predicate on the "entitlement_type" field.

func EntitlementTypeValidator

func EntitlementTypeValidator(et EntitlementType) error

EntitlementTypeValidator is a validator for the "entitlement_type" field enum values. It is called by the builders before save.

func FeatureID

func FeatureID(v string) predicate.Entitlement

FeatureID applies equality check predicate on the "feature_id" field. It's identical to FeatureIDEQ.

func FeatureIDContains

func FeatureIDContains(v string) predicate.Entitlement

FeatureIDContains applies the Contains predicate on the "feature_id" field.

func FeatureIDContainsFold

func FeatureIDContainsFold(v string) predicate.Entitlement

FeatureIDContainsFold applies the ContainsFold predicate on the "feature_id" field.

func FeatureIDEQ

func FeatureIDEQ(v string) predicate.Entitlement

FeatureIDEQ applies the EQ predicate on the "feature_id" field.

func FeatureIDEqualFold

func FeatureIDEqualFold(v string) predicate.Entitlement

FeatureIDEqualFold applies the EqualFold predicate on the "feature_id" field.

func FeatureIDGT

func FeatureIDGT(v string) predicate.Entitlement

FeatureIDGT applies the GT predicate on the "feature_id" field.

func FeatureIDGTE

func FeatureIDGTE(v string) predicate.Entitlement

FeatureIDGTE applies the GTE predicate on the "feature_id" field.

func FeatureIDHasPrefix

func FeatureIDHasPrefix(v string) predicate.Entitlement

FeatureIDHasPrefix applies the HasPrefix predicate on the "feature_id" field.

func FeatureIDHasSuffix

func FeatureIDHasSuffix(v string) predicate.Entitlement

FeatureIDHasSuffix applies the HasSuffix predicate on the "feature_id" field.

func FeatureIDIn

func FeatureIDIn(vs ...string) predicate.Entitlement

FeatureIDIn applies the In predicate on the "feature_id" field.

func FeatureIDLT

func FeatureIDLT(v string) predicate.Entitlement

FeatureIDLT applies the LT predicate on the "feature_id" field.

func FeatureIDLTE

func FeatureIDLTE(v string) predicate.Entitlement

FeatureIDLTE applies the LTE predicate on the "feature_id" field.

func FeatureIDNEQ

func FeatureIDNEQ(v string) predicate.Entitlement

FeatureIDNEQ applies the NEQ predicate on the "feature_id" field.

func FeatureIDNotIn

func FeatureIDNotIn(vs ...string) predicate.Entitlement

FeatureIDNotIn applies the NotIn predicate on the "feature_id" field.

func FeatureKey

func FeatureKey(v string) predicate.Entitlement

FeatureKey applies equality check predicate on the "feature_key" field. It's identical to FeatureKeyEQ.

func FeatureKeyContains

func FeatureKeyContains(v string) predicate.Entitlement

FeatureKeyContains applies the Contains predicate on the "feature_key" field.

func FeatureKeyContainsFold

func FeatureKeyContainsFold(v string) predicate.Entitlement

FeatureKeyContainsFold applies the ContainsFold predicate on the "feature_key" field.

func FeatureKeyEQ

func FeatureKeyEQ(v string) predicate.Entitlement

FeatureKeyEQ applies the EQ predicate on the "feature_key" field.

func FeatureKeyEqualFold

func FeatureKeyEqualFold(v string) predicate.Entitlement

FeatureKeyEqualFold applies the EqualFold predicate on the "feature_key" field.

func FeatureKeyGT

func FeatureKeyGT(v string) predicate.Entitlement

FeatureKeyGT applies the GT predicate on the "feature_key" field.

func FeatureKeyGTE

func FeatureKeyGTE(v string) predicate.Entitlement

FeatureKeyGTE applies the GTE predicate on the "feature_key" field.

func FeatureKeyHasPrefix

func FeatureKeyHasPrefix(v string) predicate.Entitlement

FeatureKeyHasPrefix applies the HasPrefix predicate on the "feature_key" field.

func FeatureKeyHasSuffix

func FeatureKeyHasSuffix(v string) predicate.Entitlement

FeatureKeyHasSuffix applies the HasSuffix predicate on the "feature_key" field.

func FeatureKeyIn

func FeatureKeyIn(vs ...string) predicate.Entitlement

FeatureKeyIn applies the In predicate on the "feature_key" field.

func FeatureKeyLT

func FeatureKeyLT(v string) predicate.Entitlement

FeatureKeyLT applies the LT predicate on the "feature_key" field.

func FeatureKeyLTE

func FeatureKeyLTE(v string) predicate.Entitlement

FeatureKeyLTE applies the LTE predicate on the "feature_key" field.

func FeatureKeyNEQ

func FeatureKeyNEQ(v string) predicate.Entitlement

FeatureKeyNEQ applies the NEQ predicate on the "feature_key" field.

func FeatureKeyNotIn

func FeatureKeyNotIn(vs ...string) predicate.Entitlement

FeatureKeyNotIn applies the NotIn predicate on the "feature_key" field.

func HasBalanceSnapshot

func HasBalanceSnapshot() predicate.Entitlement

HasBalanceSnapshot applies the HasEdge predicate on the "balance_snapshot" edge.

func HasBalanceSnapshotWith

func HasBalanceSnapshotWith(preds ...predicate.BalanceSnapshot) predicate.Entitlement

HasBalanceSnapshotWith applies the HasEdge predicate on the "balance_snapshot" edge with a given conditions (other predicates).

func HasFeature

func HasFeature() predicate.Entitlement

HasFeature applies the HasEdge predicate on the "feature" edge.

func HasFeatureWith

func HasFeatureWith(preds ...predicate.Feature) predicate.Entitlement

HasFeatureWith applies the HasEdge predicate on the "feature" edge with a given conditions (other predicates).

func HasGrant

func HasGrant() predicate.Entitlement

HasGrant applies the HasEdge predicate on the "grant" edge.

func HasGrantWith

func HasGrantWith(preds ...predicate.Grant) predicate.Entitlement

HasGrantWith applies the HasEdge predicate on the "grant" edge with a given conditions (other predicates).

func HasUsageReset

func HasUsageReset() predicate.Entitlement

HasUsageReset applies the HasEdge predicate on the "usage_reset" edge.

func HasUsageResetWith

func HasUsageResetWith(preds ...predicate.UsageReset) predicate.Entitlement

HasUsageResetWith applies the HasEdge predicate on the "usage_reset" edge with a given conditions (other predicates).

func ID

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Entitlement

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Entitlement

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Entitlement

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Entitlement

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Entitlement

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Entitlement

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Entitlement

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Entitlement

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Entitlement

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Entitlement

IDNotIn applies the NotIn predicate on the ID field.

func IsSoftLimit

func IsSoftLimit(v bool) predicate.Entitlement

IsSoftLimit applies equality check predicate on the "is_soft_limit" field. It's identical to IsSoftLimitEQ.

func IsSoftLimitEQ

func IsSoftLimitEQ(v bool) predicate.Entitlement

IsSoftLimitEQ applies the EQ predicate on the "is_soft_limit" field.

func IsSoftLimitIsNil

func IsSoftLimitIsNil() predicate.Entitlement

IsSoftLimitIsNil applies the IsNil predicate on the "is_soft_limit" field.

func IsSoftLimitNEQ

func IsSoftLimitNEQ(v bool) predicate.Entitlement

IsSoftLimitNEQ applies the NEQ predicate on the "is_soft_limit" field.

func IsSoftLimitNotNil

func IsSoftLimitNotNil() predicate.Entitlement

IsSoftLimitNotNil applies the NotNil predicate on the "is_soft_limit" field.

func IssueAfterReset

func IssueAfterReset(v float64) predicate.Entitlement

IssueAfterReset applies equality check predicate on the "issue_after_reset" field. It's identical to IssueAfterResetEQ.

func IssueAfterResetEQ

func IssueAfterResetEQ(v float64) predicate.Entitlement

IssueAfterResetEQ applies the EQ predicate on the "issue_after_reset" field.

func IssueAfterResetGT

func IssueAfterResetGT(v float64) predicate.Entitlement

IssueAfterResetGT applies the GT predicate on the "issue_after_reset" field.

func IssueAfterResetGTE

func IssueAfterResetGTE(v float64) predicate.Entitlement

IssueAfterResetGTE applies the GTE predicate on the "issue_after_reset" field.

func IssueAfterResetIn

func IssueAfterResetIn(vs ...float64) predicate.Entitlement

IssueAfterResetIn applies the In predicate on the "issue_after_reset" field.

func IssueAfterResetIsNil

func IssueAfterResetIsNil() predicate.Entitlement

IssueAfterResetIsNil applies the IsNil predicate on the "issue_after_reset" field.

func IssueAfterResetLT

func IssueAfterResetLT(v float64) predicate.Entitlement

IssueAfterResetLT applies the LT predicate on the "issue_after_reset" field.

func IssueAfterResetLTE

func IssueAfterResetLTE(v float64) predicate.Entitlement

IssueAfterResetLTE applies the LTE predicate on the "issue_after_reset" field.

func IssueAfterResetNEQ

func IssueAfterResetNEQ(v float64) predicate.Entitlement

IssueAfterResetNEQ applies the NEQ predicate on the "issue_after_reset" field.

func IssueAfterResetNotIn

func IssueAfterResetNotIn(vs ...float64) predicate.Entitlement

IssueAfterResetNotIn applies the NotIn predicate on the "issue_after_reset" field.

func IssueAfterResetNotNil

func IssueAfterResetNotNil() predicate.Entitlement

IssueAfterResetNotNil applies the NotNil predicate on the "issue_after_reset" field.

func IssueAfterResetPriority

func IssueAfterResetPriority(v uint8) predicate.Entitlement

IssueAfterResetPriority applies equality check predicate on the "issue_after_reset_priority" field. It's identical to IssueAfterResetPriorityEQ.

func IssueAfterResetPriorityEQ

func IssueAfterResetPriorityEQ(v uint8) predicate.Entitlement

IssueAfterResetPriorityEQ applies the EQ predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityGT

func IssueAfterResetPriorityGT(v uint8) predicate.Entitlement

IssueAfterResetPriorityGT applies the GT predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityGTE

func IssueAfterResetPriorityGTE(v uint8) predicate.Entitlement

IssueAfterResetPriorityGTE applies the GTE predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityIn

func IssueAfterResetPriorityIn(vs ...uint8) predicate.Entitlement

IssueAfterResetPriorityIn applies the In predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityIsNil

func IssueAfterResetPriorityIsNil() predicate.Entitlement

IssueAfterResetPriorityIsNil applies the IsNil predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityLT

func IssueAfterResetPriorityLT(v uint8) predicate.Entitlement

IssueAfterResetPriorityLT applies the LT predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityLTE

func IssueAfterResetPriorityLTE(v uint8) predicate.Entitlement

IssueAfterResetPriorityLTE applies the LTE predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityNEQ

func IssueAfterResetPriorityNEQ(v uint8) predicate.Entitlement

IssueAfterResetPriorityNEQ applies the NEQ predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityNotIn

func IssueAfterResetPriorityNotIn(vs ...uint8) predicate.Entitlement

IssueAfterResetPriorityNotIn applies the NotIn predicate on the "issue_after_reset_priority" field.

func IssueAfterResetPriorityNotNil

func IssueAfterResetPriorityNotNil() predicate.Entitlement

IssueAfterResetPriorityNotNil applies the NotNil predicate on the "issue_after_reset_priority" field.

func MeasureUsageFrom

func MeasureUsageFrom(v time.Time) predicate.Entitlement

MeasureUsageFrom applies equality check predicate on the "measure_usage_from" field. It's identical to MeasureUsageFromEQ.

func MeasureUsageFromEQ

func MeasureUsageFromEQ(v time.Time) predicate.Entitlement

MeasureUsageFromEQ applies the EQ predicate on the "measure_usage_from" field.

func MeasureUsageFromGT

func MeasureUsageFromGT(v time.Time) predicate.Entitlement

MeasureUsageFromGT applies the GT predicate on the "measure_usage_from" field.

func MeasureUsageFromGTE

func MeasureUsageFromGTE(v time.Time) predicate.Entitlement

MeasureUsageFromGTE applies the GTE predicate on the "measure_usage_from" field.

func MeasureUsageFromIn

func MeasureUsageFromIn(vs ...time.Time) predicate.Entitlement

MeasureUsageFromIn applies the In predicate on the "measure_usage_from" field.

func MeasureUsageFromIsNil

func MeasureUsageFromIsNil() predicate.Entitlement

MeasureUsageFromIsNil applies the IsNil predicate on the "measure_usage_from" field.

func MeasureUsageFromLT

func MeasureUsageFromLT(v time.Time) predicate.Entitlement

MeasureUsageFromLT applies the LT predicate on the "measure_usage_from" field.

func MeasureUsageFromLTE

func MeasureUsageFromLTE(v time.Time) predicate.Entitlement

MeasureUsageFromLTE applies the LTE predicate on the "measure_usage_from" field.

func MeasureUsageFromNEQ

func MeasureUsageFromNEQ(v time.Time) predicate.Entitlement

MeasureUsageFromNEQ applies the NEQ predicate on the "measure_usage_from" field.

func MeasureUsageFromNotIn

func MeasureUsageFromNotIn(vs ...time.Time) predicate.Entitlement

MeasureUsageFromNotIn applies the NotIn predicate on the "measure_usage_from" field.

func MeasureUsageFromNotNil

func MeasureUsageFromNotNil() predicate.Entitlement

MeasureUsageFromNotNil applies the NotNil predicate on the "measure_usage_from" field.

func MetadataIsNil

func MetadataIsNil() predicate.Entitlement

MetadataIsNil applies the IsNil predicate on the "metadata" field.

func MetadataNotNil

func MetadataNotNil() predicate.Entitlement

MetadataNotNil applies the NotNil predicate on the "metadata" field.

func Namespace

func Namespace(v string) predicate.Entitlement

Namespace applies equality check predicate on the "namespace" field. It's identical to NamespaceEQ.

func NamespaceContains

func NamespaceContains(v string) predicate.Entitlement

NamespaceContains applies the Contains predicate on the "namespace" field.

func NamespaceContainsFold

func NamespaceContainsFold(v string) predicate.Entitlement

NamespaceContainsFold applies the ContainsFold predicate on the "namespace" field.

func NamespaceEQ

func NamespaceEQ(v string) predicate.Entitlement

NamespaceEQ applies the EQ predicate on the "namespace" field.

func NamespaceEqualFold

func NamespaceEqualFold(v string) predicate.Entitlement

NamespaceEqualFold applies the EqualFold predicate on the "namespace" field.

func NamespaceGT

func NamespaceGT(v string) predicate.Entitlement

NamespaceGT applies the GT predicate on the "namespace" field.

func NamespaceGTE

func NamespaceGTE(v string) predicate.Entitlement

NamespaceGTE applies the GTE predicate on the "namespace" field.

func NamespaceHasPrefix

func NamespaceHasPrefix(v string) predicate.Entitlement

NamespaceHasPrefix applies the HasPrefix predicate on the "namespace" field.

func NamespaceHasSuffix

func NamespaceHasSuffix(v string) predicate.Entitlement

NamespaceHasSuffix applies the HasSuffix predicate on the "namespace" field.

func NamespaceIn

func NamespaceIn(vs ...string) predicate.Entitlement

NamespaceIn applies the In predicate on the "namespace" field.

func NamespaceLT

func NamespaceLT(v string) predicate.Entitlement

NamespaceLT applies the LT predicate on the "namespace" field.

func NamespaceLTE

func NamespaceLTE(v string) predicate.Entitlement

NamespaceLTE applies the LTE predicate on the "namespace" field.

func NamespaceNEQ

func NamespaceNEQ(v string) predicate.Entitlement

NamespaceNEQ applies the NEQ predicate on the "namespace" field.

func NamespaceNotIn

func NamespaceNotIn(vs ...string) predicate.Entitlement

NamespaceNotIn applies the NotIn predicate on the "namespace" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Entitlement) predicate.Entitlement

Or groups predicates with the OR operator between them.

func PreserveOverageAtReset

func PreserveOverageAtReset(v bool) predicate.Entitlement

PreserveOverageAtReset applies equality check predicate on the "preserve_overage_at_reset" field. It's identical to PreserveOverageAtResetEQ.

func PreserveOverageAtResetEQ

func PreserveOverageAtResetEQ(v bool) predicate.Entitlement

PreserveOverageAtResetEQ applies the EQ predicate on the "preserve_overage_at_reset" field.

func PreserveOverageAtResetIsNil

func PreserveOverageAtResetIsNil() predicate.Entitlement

PreserveOverageAtResetIsNil applies the IsNil predicate on the "preserve_overage_at_reset" field.

func PreserveOverageAtResetNEQ

func PreserveOverageAtResetNEQ(v bool) predicate.Entitlement

PreserveOverageAtResetNEQ applies the NEQ predicate on the "preserve_overage_at_reset" field.

func PreserveOverageAtResetNotNil

func PreserveOverageAtResetNotNil() predicate.Entitlement

PreserveOverageAtResetNotNil applies the NotNil predicate on the "preserve_overage_at_reset" field.

func SubjectKey

func SubjectKey(v string) predicate.Entitlement

SubjectKey applies equality check predicate on the "subject_key" field. It's identical to SubjectKeyEQ.

func SubjectKeyContains

func SubjectKeyContains(v string) predicate.Entitlement

SubjectKeyContains applies the Contains predicate on the "subject_key" field.

func SubjectKeyContainsFold

func SubjectKeyContainsFold(v string) predicate.Entitlement

SubjectKeyContainsFold applies the ContainsFold predicate on the "subject_key" field.

func SubjectKeyEQ

func SubjectKeyEQ(v string) predicate.Entitlement

SubjectKeyEQ applies the EQ predicate on the "subject_key" field.

func SubjectKeyEqualFold

func SubjectKeyEqualFold(v string) predicate.Entitlement

SubjectKeyEqualFold applies the EqualFold predicate on the "subject_key" field.

func SubjectKeyGT

func SubjectKeyGT(v string) predicate.Entitlement

SubjectKeyGT applies the GT predicate on the "subject_key" field.

func SubjectKeyGTE

func SubjectKeyGTE(v string) predicate.Entitlement

SubjectKeyGTE applies the GTE predicate on the "subject_key" field.

func SubjectKeyHasPrefix

func SubjectKeyHasPrefix(v string) predicate.Entitlement

SubjectKeyHasPrefix applies the HasPrefix predicate on the "subject_key" field.

func SubjectKeyHasSuffix

func SubjectKeyHasSuffix(v string) predicate.Entitlement

SubjectKeyHasSuffix applies the HasSuffix predicate on the "subject_key" field.

func SubjectKeyIn

func SubjectKeyIn(vs ...string) predicate.Entitlement

SubjectKeyIn applies the In predicate on the "subject_key" field.

func SubjectKeyLT

func SubjectKeyLT(v string) predicate.Entitlement

SubjectKeyLT applies the LT predicate on the "subject_key" field.

func SubjectKeyLTE

func SubjectKeyLTE(v string) predicate.Entitlement

SubjectKeyLTE applies the LTE predicate on the "subject_key" field.

func SubjectKeyNEQ

func SubjectKeyNEQ(v string) predicate.Entitlement

SubjectKeyNEQ applies the NEQ predicate on the "subject_key" field.

func SubjectKeyNotIn

func SubjectKeyNotIn(vs ...string) predicate.Entitlement

SubjectKeyNotIn applies the NotIn predicate on the "subject_key" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Entitlement

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Entitlement

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Entitlement

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Entitlement

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Entitlement

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Entitlement

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Entitlement

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Entitlement

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Entitlement

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UsagePeriodAnchor

func UsagePeriodAnchor(v time.Time) predicate.Entitlement

UsagePeriodAnchor applies equality check predicate on the "usage_period_anchor" field. It's identical to UsagePeriodAnchorEQ.

func UsagePeriodAnchorEQ

func UsagePeriodAnchorEQ(v time.Time) predicate.Entitlement

UsagePeriodAnchorEQ applies the EQ predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorGT

func UsagePeriodAnchorGT(v time.Time) predicate.Entitlement

UsagePeriodAnchorGT applies the GT predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorGTE

func UsagePeriodAnchorGTE(v time.Time) predicate.Entitlement

UsagePeriodAnchorGTE applies the GTE predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorIn

func UsagePeriodAnchorIn(vs ...time.Time) predicate.Entitlement

UsagePeriodAnchorIn applies the In predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorIsNil

func UsagePeriodAnchorIsNil() predicate.Entitlement

UsagePeriodAnchorIsNil applies the IsNil predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorLT

func UsagePeriodAnchorLT(v time.Time) predicate.Entitlement

UsagePeriodAnchorLT applies the LT predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorLTE

func UsagePeriodAnchorLTE(v time.Time) predicate.Entitlement

UsagePeriodAnchorLTE applies the LTE predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorNEQ

func UsagePeriodAnchorNEQ(v time.Time) predicate.Entitlement

UsagePeriodAnchorNEQ applies the NEQ predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorNotIn

func UsagePeriodAnchorNotIn(vs ...time.Time) predicate.Entitlement

UsagePeriodAnchorNotIn applies the NotIn predicate on the "usage_period_anchor" field.

func UsagePeriodAnchorNotNil

func UsagePeriodAnchorNotNil() predicate.Entitlement

UsagePeriodAnchorNotNil applies the NotNil predicate on the "usage_period_anchor" field.

func UsagePeriodIntervalEQ

func UsagePeriodIntervalEQ(v UsagePeriodInterval) predicate.Entitlement

UsagePeriodIntervalEQ applies the EQ predicate on the "usage_period_interval" field.

func UsagePeriodIntervalIn

func UsagePeriodIntervalIn(vs ...UsagePeriodInterval) predicate.Entitlement

UsagePeriodIntervalIn applies the In predicate on the "usage_period_interval" field.

func UsagePeriodIntervalIsNil

func UsagePeriodIntervalIsNil() predicate.Entitlement

UsagePeriodIntervalIsNil applies the IsNil predicate on the "usage_period_interval" field.

func UsagePeriodIntervalNEQ

func UsagePeriodIntervalNEQ(v UsagePeriodInterval) predicate.Entitlement

UsagePeriodIntervalNEQ applies the NEQ predicate on the "usage_period_interval" field.

func UsagePeriodIntervalNotIn

func UsagePeriodIntervalNotIn(vs ...UsagePeriodInterval) predicate.Entitlement

UsagePeriodIntervalNotIn applies the NotIn predicate on the "usage_period_interval" field.

func UsagePeriodIntervalNotNil

func UsagePeriodIntervalNotNil() predicate.Entitlement

UsagePeriodIntervalNotNil applies the NotNil predicate on the "usage_period_interval" field.

func UsagePeriodIntervalValidator

func UsagePeriodIntervalValidator(upi UsagePeriodInterval) error

UsagePeriodIntervalValidator is a validator for the "usage_period_interval" field enum values. It is called by the builders before save.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type EntitlementType

type EntitlementType string

EntitlementType defines the type for the "entitlement_type" enum field.

const (
	EntitlementTypeMetered EntitlementType = "metered"
	EntitlementTypeStatic  EntitlementType = "static"
	EntitlementTypeBoolean EntitlementType = "boolean"
)

EntitlementType values.

func (EntitlementType) String

func (et EntitlementType) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Entitlement queries.

func ByBalanceSnapshot

func ByBalanceSnapshot(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByBalanceSnapshot orders the results by balance_snapshot terms.

func ByBalanceSnapshotCount

func ByBalanceSnapshotCount(opts ...sql.OrderTermOption) OrderOption

ByBalanceSnapshotCount orders the results by balance_snapshot count.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByCurrentUsagePeriodEnd

func ByCurrentUsagePeriodEnd(opts ...sql.OrderTermOption) OrderOption

ByCurrentUsagePeriodEnd orders the results by the current_usage_period_end field.

func ByCurrentUsagePeriodStart

func ByCurrentUsagePeriodStart(opts ...sql.OrderTermOption) OrderOption

ByCurrentUsagePeriodStart orders the results by the current_usage_period_start field.

func ByDeletedAt

func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption

ByDeletedAt orders the results by the deleted_at field.

func ByEntitlementType

func ByEntitlementType(opts ...sql.OrderTermOption) OrderOption

ByEntitlementType orders the results by the entitlement_type field.

func ByFeatureField

func ByFeatureField(field string, opts ...sql.OrderTermOption) OrderOption

ByFeatureField orders the results by feature field.

func ByFeatureID

func ByFeatureID(opts ...sql.OrderTermOption) OrderOption

ByFeatureID orders the results by the feature_id field.

func ByFeatureKey

func ByFeatureKey(opts ...sql.OrderTermOption) OrderOption

ByFeatureKey orders the results by the feature_key field.

func ByGrant

func ByGrant(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByGrant orders the results by grant terms.

func ByGrantCount

func ByGrantCount(opts ...sql.OrderTermOption) OrderOption

ByGrantCount orders the results by grant count.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsSoftLimit

func ByIsSoftLimit(opts ...sql.OrderTermOption) OrderOption

ByIsSoftLimit orders the results by the is_soft_limit field.

func ByIssueAfterReset

func ByIssueAfterReset(opts ...sql.OrderTermOption) OrderOption

ByIssueAfterReset orders the results by the issue_after_reset field.

func ByIssueAfterResetPriority

func ByIssueAfterResetPriority(opts ...sql.OrderTermOption) OrderOption

ByIssueAfterResetPriority orders the results by the issue_after_reset_priority field.

func ByMeasureUsageFrom

func ByMeasureUsageFrom(opts ...sql.OrderTermOption) OrderOption

ByMeasureUsageFrom orders the results by the measure_usage_from field.

func ByNamespace

func ByNamespace(opts ...sql.OrderTermOption) OrderOption

ByNamespace orders the results by the namespace field.

func ByPreserveOverageAtReset

func ByPreserveOverageAtReset(opts ...sql.OrderTermOption) OrderOption

ByPreserveOverageAtReset orders the results by the preserve_overage_at_reset field.

func BySubjectKey

func BySubjectKey(opts ...sql.OrderTermOption) OrderOption

BySubjectKey orders the results by the subject_key field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByUsagePeriodAnchor

func ByUsagePeriodAnchor(opts ...sql.OrderTermOption) OrderOption

ByUsagePeriodAnchor orders the results by the usage_period_anchor field.

func ByUsagePeriodInterval

func ByUsagePeriodInterval(opts ...sql.OrderTermOption) OrderOption

ByUsagePeriodInterval orders the results by the usage_period_interval field.

func ByUsageReset

func ByUsageReset(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByUsageReset orders the results by usage_reset terms.

func ByUsageResetCount

func ByUsageResetCount(opts ...sql.OrderTermOption) OrderOption

ByUsageResetCount orders the results by usage_reset count.

type UsagePeriodInterval

type UsagePeriodInterval string

UsagePeriodInterval defines the type for the "usage_period_interval" enum field.

const (
	UsagePeriodIntervalDAY   UsagePeriodInterval = "DAY"
	UsagePeriodIntervalWEEK  UsagePeriodInterval = "WEEK"
	UsagePeriodIntervalMONTH UsagePeriodInterval = "MONTH"
	UsagePeriodIntervalYEAR  UsagePeriodInterval = "YEAR"
)

UsagePeriodInterval values.

func (UsagePeriodInterval) String

func (upi UsagePeriodInterval) String() string

Jump to

Keyboard shortcuts

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