subscription

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 4 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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldNodeID holds the string denoting the node_id field in the database.
	FieldNodeID = "node_id"
	// FieldTermID holds the string denoting the term_id field in the database.
	FieldTermID = "term_id"
	// FieldMuted holds the string denoting the muted field in the database.
	FieldMuted = "muted"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// 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"
	// EdgeNode holds the string denoting the node edge name in mutations.
	EdgeNode = "node"
	// EdgeTerm holds the string denoting the term edge name in mutations.
	EdgeTerm = "term"
	// 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_id"
	// NodeTable is the table that holds the node relation/edge.
	NodeTable = "subscriptions"
	// NodeInverseTable is the table name for the Node entity.
	// It exists in this package in order to avoid circular dependency with the "node" package.
	NodeInverseTable = "nodes"
	// NodeColumn is the table column denoting the node relation/edge.
	NodeColumn = "node_id"
	// TermTable is the table that holds the term relation/edge.
	TermTable = "subscriptions"
	// TermInverseTable is the table name for the Term entity.
	// It exists in this package in order to avoid circular dependency with the "term" package.
	TermInverseTable = "taxonomy_term_data"
	// TermColumn is the table column denoting the term relation/edge.
	TermColumn = "term_id"
)

Variables

View Source
var (
	// DefaultMuted holds the default value on creation for the "muted" field.
	DefaultMuted bool
	// TokenValidator is a validator for the "token" field. It is called by the builders before save.
	TokenValidator func(string) error
)

Columns holds all SQL columns for subscription fields.

Functions

func And

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

And groups predicates with the AND operator between them.

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 HasNode

func HasNode() predicate.Subscription

HasNode applies the HasEdge predicate on the "node" edge.

func HasNodeWith

func HasNodeWith(preds ...predicate.Node) predicate.Subscription

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

func HasTerm

func HasTerm() predicate.Subscription

HasTerm applies the HasEdge predicate on the "term" edge.

func HasTermWith

func HasTermWith(preds ...predicate.Term) predicate.Subscription

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

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

func ID(id int) predicate.Subscription

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Subscription

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Subscription

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Subscription

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Subscription

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Subscription

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Subscription

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Subscription

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Subscription

IDNotIn applies the NotIn predicate on the ID field.

func Muted

func Muted(v bool) predicate.Subscription

Muted applies equality check predicate on the "muted" field. It's identical to MutedEQ.

func MutedEQ

func MutedEQ(v bool) predicate.Subscription

MutedEQ applies the EQ predicate on the "muted" field.

func MutedNEQ

func MutedNEQ(v bool) predicate.Subscription

MutedNEQ applies the NEQ predicate on the "muted" field.

func NodeID

func NodeID(v int) predicate.Subscription

NodeID applies equality check predicate on the "node_id" field. It's identical to NodeIDEQ.

func NodeIDEQ

func NodeIDEQ(v int) predicate.Subscription

NodeIDEQ applies the EQ predicate on the "node_id" field.

func NodeIDIn

func NodeIDIn(vs ...int) predicate.Subscription

NodeIDIn applies the In predicate on the "node_id" field.

func NodeIDIsNil

func NodeIDIsNil() predicate.Subscription

NodeIDIsNil applies the IsNil predicate on the "node_id" field.

func NodeIDNEQ

func NodeIDNEQ(v int) predicate.Subscription

NodeIDNEQ applies the NEQ predicate on the "node_id" field.

func NodeIDNotIn

func NodeIDNotIn(vs ...int) predicate.Subscription

NodeIDNotIn applies the NotIn predicate on the "node_id" field.

func NodeIDNotNil

func NodeIDNotNil() predicate.Subscription

NodeIDNotNil applies the NotNil predicate on the "node_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 TermID

func TermID(v int) predicate.Subscription

TermID applies equality check predicate on the "term_id" field. It's identical to TermIDEQ.

func TermIDEQ

func TermIDEQ(v int) predicate.Subscription

TermIDEQ applies the EQ predicate on the "term_id" field.

func TermIDIn

func TermIDIn(vs ...int) predicate.Subscription

TermIDIn applies the In predicate on the "term_id" field.

func TermIDIsNil

func TermIDIsNil() predicate.Subscription

TermIDIsNil applies the IsNil predicate on the "term_id" field.

func TermIDNEQ

func TermIDNEQ(v int) predicate.Subscription

TermIDNEQ applies the NEQ predicate on the "term_id" field.

func TermIDNotIn

func TermIDNotIn(vs ...int) predicate.Subscription

TermIDNotIn applies the NotIn predicate on the "term_id" field.

func TermIDNotNil

func TermIDNotNil() predicate.Subscription

TermIDNotNil applies the NotNil predicate on the "term_id" field.

func Token

func Token(v string) predicate.Subscription

Token applies equality check predicate on the "token" field. It's identical to TokenEQ.

func TokenContains

func TokenContains(v string) predicate.Subscription

TokenContains applies the Contains predicate on the "token" field.

func TokenContainsFold

func TokenContainsFold(v string) predicate.Subscription

TokenContainsFold applies the ContainsFold predicate on the "token" field.

func TokenEQ

func TokenEQ(v string) predicate.Subscription

TokenEQ applies the EQ predicate on the "token" field.

func TokenEqualFold

func TokenEqualFold(v string) predicate.Subscription

TokenEqualFold applies the EqualFold predicate on the "token" field.

func TokenGT

func TokenGT(v string) predicate.Subscription

TokenGT applies the GT predicate on the "token" field.

func TokenGTE

func TokenGTE(v string) predicate.Subscription

TokenGTE applies the GTE predicate on the "token" field.

func TokenHasPrefix

func TokenHasPrefix(v string) predicate.Subscription

TokenHasPrefix applies the HasPrefix predicate on the "token" field.

func TokenHasSuffix

func TokenHasSuffix(v string) predicate.Subscription

TokenHasSuffix applies the HasSuffix predicate on the "token" field.

func TokenIn

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

TokenIn applies the In predicate on the "token" field.

func TokenLT

func TokenLT(v string) predicate.Subscription

TokenLT applies the LT predicate on the "token" field.

func TokenLTE

func TokenLTE(v string) predicate.Subscription

TokenLTE applies the LTE predicate on the "token" field.

func TokenNEQ

func TokenNEQ(v string) predicate.Subscription

TokenNEQ applies the NEQ predicate on the "token" field.

func TokenNotIn

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

TokenNotIn applies the NotIn predicate on the "token" field.

func UserID

func UserID(v int) predicate.Subscription

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Subscription

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Subscription

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Subscription

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Subscription

UserIDNotIn applies the NotIn predicate on the "user_id" field.

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 Subscription queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByMuted

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

ByMuted orders the results by the muted field.

func ByNodeField

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

ByNodeField orders the results by node field.

func ByNodeID

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

ByNodeID orders the results by the node_id field.

func ByTermField

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

ByTermField orders the results by term field.

func ByTermID

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

ByTermID orders the results by the term_id field.

func ByToken

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

ByToken orders the results by the token field.

func ByUserField

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

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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