card

package
v0.0.0-...-657e486 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the card type in the database.
	Label = "card"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "oid"
	// FieldNumber holds the string denoting the number field in the database.
	FieldNumber = "number"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldCcv holds the string denoting the ccv field in the database.
	FieldCcv = "ccv"
	// FieldExpirationYear holds the string denoting the expiration_year field in the database.
	FieldExpirationYear = "expiration_year"
	// FieldExpirationMonth holds the string denoting the expiration_month field in the database.
	FieldExpirationMonth = "expiration_month"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// Table holds the table name of the card in the database.
	Table = "cards"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "cards"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_cards"
)

Variables

View Source
var (
	// NumberValidator is a validator for the "number" field. It is called by the builders before save.
	NumberValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// CcvValidator is a validator for the "ccv" field. It is called by the builders before save.
	CcvValidator func(int) error
	// ExpirationYearValidator is a validator for the "expiration_year" field. It is called by the builders before save.
	ExpirationYearValidator func(int) error
	// ExpirationMonthValidator is a validator for the "expiration_month" field. It is called by the builders before save.
	ExpirationMonthValidator func(int) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for card fields.

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

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

Functions

func And

func And(predicates ...predicate.Card) predicate.Card

And groups predicates with the AND operator between them.

func Ccv

func Ccv(v int) predicate.Card

Ccv applies equality check predicate on the "ccv" field. It's identical to CcvEQ.

func CcvEQ

func CcvEQ(v int) predicate.Card

CcvEQ applies the EQ predicate on the "ccv" field.

func CcvGT

func CcvGT(v int) predicate.Card

CcvGT applies the GT predicate on the "ccv" field.

func CcvGTE

func CcvGTE(v int) predicate.Card

CcvGTE applies the GTE predicate on the "ccv" field.

func CcvIn

func CcvIn(vs ...int) predicate.Card

CcvIn applies the In predicate on the "ccv" field.

func CcvLT

func CcvLT(v int) predicate.Card

CcvLT applies the LT predicate on the "ccv" field.

func CcvLTE

func CcvLTE(v int) predicate.Card

CcvLTE applies the LTE predicate on the "ccv" field.

func CcvNEQ

func CcvNEQ(v int) predicate.Card

CcvNEQ applies the NEQ predicate on the "ccv" field.

func CcvNotIn

func CcvNotIn(vs ...int) predicate.Card

CcvNotIn applies the NotIn predicate on the "ccv" field.

func ExpirationMonth

func ExpirationMonth(v int) predicate.Card

ExpirationMonth applies equality check predicate on the "expiration_month" field. It's identical to ExpirationMonthEQ.

func ExpirationMonthEQ

func ExpirationMonthEQ(v int) predicate.Card

ExpirationMonthEQ applies the EQ predicate on the "expiration_month" field.

func ExpirationMonthGT

func ExpirationMonthGT(v int) predicate.Card

ExpirationMonthGT applies the GT predicate on the "expiration_month" field.

func ExpirationMonthGTE

func ExpirationMonthGTE(v int) predicate.Card

ExpirationMonthGTE applies the GTE predicate on the "expiration_month" field.

func ExpirationMonthIn

func ExpirationMonthIn(vs ...int) predicate.Card

ExpirationMonthIn applies the In predicate on the "expiration_month" field.

func ExpirationMonthLT

func ExpirationMonthLT(v int) predicate.Card

ExpirationMonthLT applies the LT predicate on the "expiration_month" field.

func ExpirationMonthLTE

func ExpirationMonthLTE(v int) predicate.Card

ExpirationMonthLTE applies the LTE predicate on the "expiration_month" field.

func ExpirationMonthNEQ

func ExpirationMonthNEQ(v int) predicate.Card

ExpirationMonthNEQ applies the NEQ predicate on the "expiration_month" field.

func ExpirationMonthNotIn

func ExpirationMonthNotIn(vs ...int) predicate.Card

ExpirationMonthNotIn applies the NotIn predicate on the "expiration_month" field.

func ExpirationYear

func ExpirationYear(v int) predicate.Card

ExpirationYear applies equality check predicate on the "expiration_year" field. It's identical to ExpirationYearEQ.

func ExpirationYearEQ

func ExpirationYearEQ(v int) predicate.Card

ExpirationYearEQ applies the EQ predicate on the "expiration_year" field.

func ExpirationYearGT

func ExpirationYearGT(v int) predicate.Card

ExpirationYearGT applies the GT predicate on the "expiration_year" field.

func ExpirationYearGTE

func ExpirationYearGTE(v int) predicate.Card

ExpirationYearGTE applies the GTE predicate on the "expiration_year" field.

func ExpirationYearIn

func ExpirationYearIn(vs ...int) predicate.Card

ExpirationYearIn applies the In predicate on the "expiration_year" field.

func ExpirationYearLT

func ExpirationYearLT(v int) predicate.Card

ExpirationYearLT applies the LT predicate on the "expiration_year" field.

func ExpirationYearLTE

func ExpirationYearLTE(v int) predicate.Card

ExpirationYearLTE applies the LTE predicate on the "expiration_year" field.

func ExpirationYearNEQ

func ExpirationYearNEQ(v int) predicate.Card

ExpirationYearNEQ applies the NEQ predicate on the "expiration_year" field.

func ExpirationYearNotIn

func ExpirationYearNotIn(vs ...int) predicate.Card

ExpirationYearNotIn applies the NotIn predicate on the "expiration_year" field.

func HasOwner

func HasOwner() predicate.Card

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Card

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

func ID

func ID(id uuid.UUID) predicate.Card

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Card

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Card

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Card

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Card

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Card

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Card

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Card

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Card

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Card

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Card

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Card

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Card

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Card

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Card

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Card

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Card

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Card

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Card

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Card

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Card

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Number

func Number(v string) predicate.Card

Number applies equality check predicate on the "number" field. It's identical to NumberEQ.

func NumberContains

func NumberContains(v string) predicate.Card

NumberContains applies the Contains predicate on the "number" field.

func NumberContainsFold

func NumberContainsFold(v string) predicate.Card

NumberContainsFold applies the ContainsFold predicate on the "number" field.

func NumberEQ

func NumberEQ(v string) predicate.Card

NumberEQ applies the EQ predicate on the "number" field.

func NumberEqualFold

func NumberEqualFold(v string) predicate.Card

NumberEqualFold applies the EqualFold predicate on the "number" field.

func NumberGT

func NumberGT(v string) predicate.Card

NumberGT applies the GT predicate on the "number" field.

func NumberGTE

func NumberGTE(v string) predicate.Card

NumberGTE applies the GTE predicate on the "number" field.

func NumberHasPrefix

func NumberHasPrefix(v string) predicate.Card

NumberHasPrefix applies the HasPrefix predicate on the "number" field.

func NumberHasSuffix

func NumberHasSuffix(v string) predicate.Card

NumberHasSuffix applies the HasSuffix predicate on the "number" field.

func NumberIn

func NumberIn(vs ...string) predicate.Card

NumberIn applies the In predicate on the "number" field.

func NumberLT

func NumberLT(v string) predicate.Card

NumberLT applies the LT predicate on the "number" field.

func NumberLTE

func NumberLTE(v string) predicate.Card

NumberLTE applies the LTE predicate on the "number" field.

func NumberNEQ

func NumberNEQ(v string) predicate.Card

NumberNEQ applies the NEQ predicate on the "number" field.

func NumberNotIn

func NumberNotIn(vs ...string) predicate.Card

NumberNotIn applies the NotIn predicate on the "number" field.

func Or

func Or(predicates ...predicate.Card) predicate.Card

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Card queries.

func ByCcv

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

ByCcv orders the results by the ccv field.

func ByExpirationMonth

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

ByExpirationMonth orders the results by the expiration_month field.

func ByExpirationYear

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

ByExpirationYear orders the results by the expiration_year field.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByNumber

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

ByNumber orders the results by the number field.

func ByOwnerField

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

ByOwnerField orders the results by owner field.

Jump to

Keyboard shortcuts

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