invite

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the invite type in the database.
	Label = "invite"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldTokenHash holds the string denoting the token_hash field in the database.
	FieldTokenHash = "token_hash"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// FieldUsedAt holds the string denoting the used_at field in the database.
	FieldUsedAt = "used_at"
	// EdgeCreatedBy holds the string denoting the created_by edge name in mutations.
	EdgeCreatedBy = "created_by"
	// EdgeUsedBy holds the string denoting the used_by edge name in mutations.
	EdgeUsedBy = "used_by"
	// Table holds the table name of the invite in the database.
	Table = "invites"
	// CreatedByTable is the table that holds the created_by relation/edge.
	CreatedByTable = "invites"
	// CreatedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CreatedByInverseTable = "users"
	// CreatedByColumn is the table column denoting the created_by relation/edge.
	CreatedByColumn = "invite_created_by"
	// UsedByTable is the table that holds the used_by relation/edge.
	UsedByTable = "invites"
	// UsedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsedByInverseTable = "users"
	// UsedByColumn is the table column denoting the used_by relation/edge.
	UsedByColumn = "invite_used_by"
)
View Source
const DefaultRole = RoleMember

RoleMember is the default value of the Role enum.

Variables

View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// TokenHashValidator is a validator for the "token_hash" field. It is called by the builders before save.
	TokenHashValidator func(string) error
)

Columns holds all SQL columns for invite fields.

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

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

Functions

func And

func And(predicates ...predicate.Invite) predicate.Invite

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Invite

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Invite

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Invite

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Invite

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Invite

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Invite

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Invite

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Invite

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Invite

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func Email

func Email(v string) predicate.Invite

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.Invite

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.Invite

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.Invite

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.Invite

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.Invite

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.Invite

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.Invite

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.Invite

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.Invite

EmailIn applies the In predicate on the "email" field.

func EmailIsNil

func EmailIsNil() predicate.Invite

EmailIsNil applies the IsNil predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.Invite

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.Invite

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.Invite

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.Invite

EmailNotIn applies the NotIn predicate on the "email" field.

func EmailNotNil

func EmailNotNil() predicate.Invite

EmailNotNil applies the NotNil predicate on the "email" field.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.Invite

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

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.Invite

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

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.Invite

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

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.Invite

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

func ExpiresAtIn

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

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

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.Invite

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

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.Invite

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

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.Invite

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

func ExpiresAtNotIn

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

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

func HasCreatedBy

func HasCreatedBy() predicate.Invite

HasCreatedBy applies the HasEdge predicate on the "created_by" edge.

func HasCreatedByWith

func HasCreatedByWith(preds ...predicate.User) predicate.Invite

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

func HasUsedBy

func HasUsedBy() predicate.Invite

HasUsedBy applies the HasEdge predicate on the "used_by" edge.

func HasUsedByWith

func HasUsedByWith(preds ...predicate.User) predicate.Invite

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

func ID

func ID(id uint32) predicate.Invite

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint32) predicate.Invite

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint32) predicate.Invite

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint32) predicate.Invite

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint32) predicate.Invite

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint32) predicate.Invite

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint32) predicate.Invite

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint32) predicate.Invite

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint32) predicate.Invite

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.Invite) predicate.Invite

Or groups predicates with the OR operator between them.

func RoleEQ

func RoleEQ(v Role) predicate.Invite

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.Invite

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.Invite

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.Invite

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

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

func TokenHash

func TokenHash(v string) predicate.Invite

TokenHash applies equality check predicate on the "token_hash" field. It's identical to TokenHashEQ.

func TokenHashContains

func TokenHashContains(v string) predicate.Invite

TokenHashContains applies the Contains predicate on the "token_hash" field.

func TokenHashContainsFold

func TokenHashContainsFold(v string) predicate.Invite

TokenHashContainsFold applies the ContainsFold predicate on the "token_hash" field.

func TokenHashEQ

func TokenHashEQ(v string) predicate.Invite

TokenHashEQ applies the EQ predicate on the "token_hash" field.

func TokenHashEqualFold

func TokenHashEqualFold(v string) predicate.Invite

TokenHashEqualFold applies the EqualFold predicate on the "token_hash" field.

func TokenHashGT

func TokenHashGT(v string) predicate.Invite

TokenHashGT applies the GT predicate on the "token_hash" field.

func TokenHashGTE

func TokenHashGTE(v string) predicate.Invite

TokenHashGTE applies the GTE predicate on the "token_hash" field.

func TokenHashHasPrefix

func TokenHashHasPrefix(v string) predicate.Invite

TokenHashHasPrefix applies the HasPrefix predicate on the "token_hash" field.

func TokenHashHasSuffix

func TokenHashHasSuffix(v string) predicate.Invite

TokenHashHasSuffix applies the HasSuffix predicate on the "token_hash" field.

func TokenHashIn

func TokenHashIn(vs ...string) predicate.Invite

TokenHashIn applies the In predicate on the "token_hash" field.

func TokenHashLT

func TokenHashLT(v string) predicate.Invite

TokenHashLT applies the LT predicate on the "token_hash" field.

func TokenHashLTE

func TokenHashLTE(v string) predicate.Invite

TokenHashLTE applies the LTE predicate on the "token_hash" field.

func TokenHashNEQ

func TokenHashNEQ(v string) predicate.Invite

TokenHashNEQ applies the NEQ predicate on the "token_hash" field.

func TokenHashNotIn

func TokenHashNotIn(vs ...string) predicate.Invite

TokenHashNotIn applies the NotIn predicate on the "token_hash" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Invite

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Invite

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Invite

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Invite

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Invite

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Invite

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Invite

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Invite

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Invite

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func UsedAt

func UsedAt(v time.Time) predicate.Invite

UsedAt applies equality check predicate on the "used_at" field. It's identical to UsedAtEQ.

func UsedAtEQ

func UsedAtEQ(v time.Time) predicate.Invite

UsedAtEQ applies the EQ predicate on the "used_at" field.

func UsedAtGT

func UsedAtGT(v time.Time) predicate.Invite

UsedAtGT applies the GT predicate on the "used_at" field.

func UsedAtGTE

func UsedAtGTE(v time.Time) predicate.Invite

UsedAtGTE applies the GTE predicate on the "used_at" field.

func UsedAtIn

func UsedAtIn(vs ...time.Time) predicate.Invite

UsedAtIn applies the In predicate on the "used_at" field.

func UsedAtIsNil

func UsedAtIsNil() predicate.Invite

UsedAtIsNil applies the IsNil predicate on the "used_at" field.

func UsedAtLT

func UsedAtLT(v time.Time) predicate.Invite

UsedAtLT applies the LT predicate on the "used_at" field.

func UsedAtLTE

func UsedAtLTE(v time.Time) predicate.Invite

UsedAtLTE applies the LTE predicate on the "used_at" field.

func UsedAtNEQ

func UsedAtNEQ(v time.Time) predicate.Invite

UsedAtNEQ applies the NEQ predicate on the "used_at" field.

func UsedAtNotIn

func UsedAtNotIn(vs ...time.Time) predicate.Invite

UsedAtNotIn applies the NotIn predicate on the "used_at" field.

func UsedAtNotNil

func UsedAtNotNil() predicate.Invite

UsedAtNotNil applies the NotNil predicate on the "used_at" 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 Invite queries.

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByCreatedByField

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

ByCreatedByField orders the results by created_by field.

func ByEmail

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

ByEmail orders the results by the email field.

func ByExpiresAt

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

ByExpiresAt orders the results by the expires_at field.

func ByID

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

ByID orders the results by the id field.

func ByRole

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

ByRole orders the results by the role field.

func ByTokenHash

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

ByTokenHash orders the results by the token_hash field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

func ByUsedAt

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

ByUsedAt orders the results by the used_at field.

func ByUsedByField

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

ByUsedByField orders the results by used_by field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleAdmin       Role = "admin"
	RoleMember      Role = "member"
	RoleRequestOnly Role = "request_only"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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