subscription

package
v0.0.0-...-6d1408b Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the subscription type in the database.
	Label = "subscription"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldStripeCustomerID holds the string denoting the stripe_customer_id field in the database.
	FieldStripeCustomerID = "stripe_customer_id"
	// FieldStripeSubscriptionID holds the string denoting the stripe_subscription_id field in the database.
	FieldStripeSubscriptionID = "stripe_subscription_id"
	// FieldTier holds the string denoting the tier field in the database.
	FieldTier = "tier"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// FieldCancelled holds the string denoting the cancelled field in the database.
	FieldCancelled = "cancelled"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the subscription in the database.
	Table = "subscriptions"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "subscriptions"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_subscription"
)
View Source
const DefaultTier = TierFree

TierFree is the default value of the Tier enum.

Variables

View Source
var (
	// DefaultCancelled holds the default value on creation for the "cancelled" field.
	DefaultCancelled bool
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for subscription fields.

View Source
var ForeignKeys = []string{
	"user_subscription",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "subscriptions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Subscription) predicate.Subscription

And groups predicates with the AND operator between them.

func Cancelled

func Cancelled(v bool) predicate.Subscription

Cancelled applies equality check predicate on the "cancelled" field. It's identical to CancelledEQ.

func CancelledEQ

func CancelledEQ(v bool) predicate.Subscription

CancelledEQ applies the EQ predicate on the "cancelled" field.

func CancelledNEQ

func CancelledNEQ(v bool) predicate.Subscription

CancelledNEQ applies the NEQ predicate on the "cancelled" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Subscription

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Subscription

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Subscription

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Subscription

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Subscription

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Subscription

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Subscription

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

func CreatedAtNotIn

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

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

func ExpiresAt

func ExpiresAt(v time.Time) predicate.Subscription

ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.Subscription

ExpiresAtEQ applies the EQ predicate on the "expires_at" field.

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.Subscription

ExpiresAtGT applies the GT predicate on the "expires_at" field.

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.Subscription

ExpiresAtGTE applies the GTE predicate on the "expires_at" field.

func ExpiresAtIn

func ExpiresAtIn(vs ...time.Time) predicate.Subscription

ExpiresAtIn applies the In predicate on the "expires_at" field.

func ExpiresAtIsNil

func ExpiresAtIsNil() predicate.Subscription

ExpiresAtIsNil applies the IsNil predicate on the "expires_at" field.

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.Subscription

ExpiresAtLT applies the LT predicate on the "expires_at" field.

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.Subscription

ExpiresAtLTE applies the LTE predicate on the "expires_at" field.

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.Subscription

ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...time.Time) predicate.Subscription

ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.

func ExpiresAtNotNil

func ExpiresAtNotNil() predicate.Subscription

ExpiresAtNotNil applies the NotNil predicate on the "expires_at" field.

func HasUser

func HasUser() predicate.Subscription

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Subscription

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Subscription

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Subscription

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Subscription

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Subscription

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Subscription

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Subscription) predicate.Subscription

Or groups predicates with the OR operator between them.

func StripeCustomerID

func StripeCustomerID(v string) predicate.Subscription

StripeCustomerID applies equality check predicate on the "stripe_customer_id" field. It's identical to StripeCustomerIDEQ.

func StripeCustomerIDContains

func StripeCustomerIDContains(v string) predicate.Subscription

StripeCustomerIDContains applies the Contains predicate on the "stripe_customer_id" field.

func StripeCustomerIDContainsFold

func StripeCustomerIDContainsFold(v string) predicate.Subscription

StripeCustomerIDContainsFold applies the ContainsFold predicate on the "stripe_customer_id" field.

func StripeCustomerIDEQ

func StripeCustomerIDEQ(v string) predicate.Subscription

StripeCustomerIDEQ applies the EQ predicate on the "stripe_customer_id" field.

func StripeCustomerIDEqualFold

func StripeCustomerIDEqualFold(v string) predicate.Subscription

StripeCustomerIDEqualFold applies the EqualFold predicate on the "stripe_customer_id" field.

func StripeCustomerIDGT

func StripeCustomerIDGT(v string) predicate.Subscription

StripeCustomerIDGT applies the GT predicate on the "stripe_customer_id" field.

func StripeCustomerIDGTE

func StripeCustomerIDGTE(v string) predicate.Subscription

StripeCustomerIDGTE applies the GTE predicate on the "stripe_customer_id" field.

func StripeCustomerIDHasPrefix

func StripeCustomerIDHasPrefix(v string) predicate.Subscription

StripeCustomerIDHasPrefix applies the HasPrefix predicate on the "stripe_customer_id" field.

func StripeCustomerIDHasSuffix

func StripeCustomerIDHasSuffix(v string) predicate.Subscription

StripeCustomerIDHasSuffix applies the HasSuffix predicate on the "stripe_customer_id" field.

func StripeCustomerIDIn

func StripeCustomerIDIn(vs ...string) predicate.Subscription

StripeCustomerIDIn applies the In predicate on the "stripe_customer_id" field.

func StripeCustomerIDIsNil

func StripeCustomerIDIsNil() predicate.Subscription

StripeCustomerIDIsNil applies the IsNil predicate on the "stripe_customer_id" field.

func StripeCustomerIDLT

func StripeCustomerIDLT(v string) predicate.Subscription

StripeCustomerIDLT applies the LT predicate on the "stripe_customer_id" field.

func StripeCustomerIDLTE

func StripeCustomerIDLTE(v string) predicate.Subscription

StripeCustomerIDLTE applies the LTE predicate on the "stripe_customer_id" field.

func StripeCustomerIDNEQ

func StripeCustomerIDNEQ(v string) predicate.Subscription

StripeCustomerIDNEQ applies the NEQ predicate on the "stripe_customer_id" field.

func StripeCustomerIDNotIn

func StripeCustomerIDNotIn(vs ...string) predicate.Subscription

StripeCustomerIDNotIn applies the NotIn predicate on the "stripe_customer_id" field.

func StripeCustomerIDNotNil

func StripeCustomerIDNotNil() predicate.Subscription

StripeCustomerIDNotNil applies the NotNil predicate on the "stripe_customer_id" field.

func StripeSubscriptionID

func StripeSubscriptionID(v string) predicate.Subscription

StripeSubscriptionID applies equality check predicate on the "stripe_subscription_id" field. It's identical to StripeSubscriptionIDEQ.

func StripeSubscriptionIDContains

func StripeSubscriptionIDContains(v string) predicate.Subscription

StripeSubscriptionIDContains applies the Contains predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDContainsFold

func StripeSubscriptionIDContainsFold(v string) predicate.Subscription

StripeSubscriptionIDContainsFold applies the ContainsFold predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDEQ

func StripeSubscriptionIDEQ(v string) predicate.Subscription

StripeSubscriptionIDEQ applies the EQ predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDEqualFold

func StripeSubscriptionIDEqualFold(v string) predicate.Subscription

StripeSubscriptionIDEqualFold applies the EqualFold predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDGT

func StripeSubscriptionIDGT(v string) predicate.Subscription

StripeSubscriptionIDGT applies the GT predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDGTE

func StripeSubscriptionIDGTE(v string) predicate.Subscription

StripeSubscriptionIDGTE applies the GTE predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDHasPrefix

func StripeSubscriptionIDHasPrefix(v string) predicate.Subscription

StripeSubscriptionIDHasPrefix applies the HasPrefix predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDHasSuffix

func StripeSubscriptionIDHasSuffix(v string) predicate.Subscription

StripeSubscriptionIDHasSuffix applies the HasSuffix predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDIn

func StripeSubscriptionIDIn(vs ...string) predicate.Subscription

StripeSubscriptionIDIn applies the In predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDIsNil

func StripeSubscriptionIDIsNil() predicate.Subscription

StripeSubscriptionIDIsNil applies the IsNil predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDLT

func StripeSubscriptionIDLT(v string) predicate.Subscription

StripeSubscriptionIDLT applies the LT predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDLTE

func StripeSubscriptionIDLTE(v string) predicate.Subscription

StripeSubscriptionIDLTE applies the LTE predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDNEQ

func StripeSubscriptionIDNEQ(v string) predicate.Subscription

StripeSubscriptionIDNEQ applies the NEQ predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDNotIn

func StripeSubscriptionIDNotIn(vs ...string) predicate.Subscription

StripeSubscriptionIDNotIn applies the NotIn predicate on the "stripe_subscription_id" field.

func StripeSubscriptionIDNotNil

func StripeSubscriptionIDNotNil() predicate.Subscription

StripeSubscriptionIDNotNil applies the NotNil predicate on the "stripe_subscription_id" field.

func TierEQ

func TierEQ(v Tier) predicate.Subscription

TierEQ applies the EQ predicate on the "tier" field.

func TierIn

func TierIn(vs ...Tier) predicate.Subscription

TierIn applies the In predicate on the "tier" field.

func TierNEQ

func TierNEQ(v Tier) predicate.Subscription

TierNEQ applies the NEQ predicate on the "tier" field.

func TierNotIn

func TierNotIn(vs ...Tier) predicate.Subscription

TierNotIn applies the NotIn predicate on the "tier" field.

func TierValidator

func TierValidator(t Tier) error

TierValidator is a validator for the "tier" 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 Tier

type Tier string

Tier defines the type for the "tier" enum field.

const (
	TierFree       Tier = "free"
	TierPro        Tier = "pro"
	TierEnterprise Tier = "enterprise"
)

Tier values.

func (Tier) String

func (t Tier) String() string

Jump to

Keyboard shortcuts

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