follow

package
v0.0.0-...-02ad720 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the follow type in the database.
	Label = "follow"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldIsRemote holds the string denoting the isremote field in the database.
	FieldIsRemote = "is_remote"
	// FieldURI holds the string denoting the uri field in the database.
	FieldURI = "uri"
	// FieldExtensions holds the string denoting the extensions field in the database.
	FieldExtensions = "extensions"
	// 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"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// EdgeFollower holds the string denoting the follower edge name in mutations.
	EdgeFollower = "follower"
	// EdgeFollowee holds the string denoting the followee edge name in mutations.
	EdgeFollowee = "followee"
	// Table holds the table name of the follow in the database.
	Table = "follows"
	// FollowerTable is the table that holds the follower relation/edge.
	FollowerTable = "follows"
	// FollowerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	FollowerInverseTable = "users"
	// FollowerColumn is the table column denoting the follower relation/edge.
	FollowerColumn = "follow_follower"
	// FolloweeTable is the table that holds the followee relation/edge.
	FolloweeTable = "follows"
	// FolloweeInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	FolloweeInverseTable = "users"
	// FolloweeColumn is the table column denoting the followee relation/edge.
	FolloweeColumn = "follow_followee"
)
View Source
const DefaultStatus = StatusPending

StatusPending is the default value of the Status enum.

Variables

View Source
var (
	// URIValidator is a validator for the "uri" field. It is called by the builders before save.
	URIValidator func(string) error
	// DefaultExtensions holds the default value on creation for the "extensions" field.
	DefaultExtensions versia.Extensions
	// 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for follow fields.

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

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

Functions

func And

func And(predicates ...predicate.Follow) predicate.Follow

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Follow

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Follow

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Follow

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Follow

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Follow

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Follow

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Follow

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

func CreatedAtNotIn

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

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

func HasFollowee

func HasFollowee() predicate.Follow

HasFollowee applies the HasEdge predicate on the "followee" edge.

func HasFolloweeWith

func HasFolloweeWith(preds ...predicate.User) predicate.Follow

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

func HasFollower

func HasFollower() predicate.Follow

HasFollower applies the HasEdge predicate on the "follower" edge.

func HasFollowerWith

func HasFollowerWith(preds ...predicate.User) predicate.Follow

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

func ID

func ID(id uuid.UUID) predicate.Follow

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Follow

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Follow

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Follow

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Follow

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Follow

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Follow

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsRemote

func IsRemote(v bool) predicate.Follow

IsRemote applies equality check predicate on the "isRemote" field. It's identical to IsRemoteEQ.

func IsRemoteEQ

func IsRemoteEQ(v bool) predicate.Follow

IsRemoteEQ applies the EQ predicate on the "isRemote" field.

func IsRemoteNEQ

func IsRemoteNEQ(v bool) predicate.Follow

IsRemoteNEQ applies the NEQ predicate on the "isRemote" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Follow) predicate.Follow

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Follow

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Follow

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Follow

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Follow

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func URI

func URI(v string) predicate.Follow

URI applies equality check predicate on the "uri" field. It's identical to URIEQ.

func URIContains

func URIContains(v string) predicate.Follow

URIContains applies the Contains predicate on the "uri" field.

func URIContainsFold

func URIContainsFold(v string) predicate.Follow

URIContainsFold applies the ContainsFold predicate on the "uri" field.

func URIEQ

func URIEQ(v string) predicate.Follow

URIEQ applies the EQ predicate on the "uri" field.

func URIEqualFold

func URIEqualFold(v string) predicate.Follow

URIEqualFold applies the EqualFold predicate on the "uri" field.

func URIGT

func URIGT(v string) predicate.Follow

URIGT applies the GT predicate on the "uri" field.

func URIGTE

func URIGTE(v string) predicate.Follow

URIGTE applies the GTE predicate on the "uri" field.

func URIHasPrefix

func URIHasPrefix(v string) predicate.Follow

URIHasPrefix applies the HasPrefix predicate on the "uri" field.

func URIHasSuffix

func URIHasSuffix(v string) predicate.Follow

URIHasSuffix applies the HasSuffix predicate on the "uri" field.

func URIIn

func URIIn(vs ...string) predicate.Follow

URIIn applies the In predicate on the "uri" field.

func URILT

func URILT(v string) predicate.Follow

URILT applies the LT predicate on the "uri" field.

func URILTE

func URILTE(v string) predicate.Follow

URILTE applies the LTE predicate on the "uri" field.

func URINEQ

func URINEQ(v string) predicate.Follow

URINEQ applies the NEQ predicate on the "uri" field.

func URINotIn

func URINotIn(vs ...string) predicate.Follow

URINotIn applies the NotIn predicate on the "uri" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Follow

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Follow

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Follow

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Follow

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Follow

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Follow

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Follow

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_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 Follow queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByFolloweeField

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

ByFolloweeField orders the results by followee field.

func ByFollowerField

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

ByFollowerField orders the results by follower field.

func ByID

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

ByID orders the results by the id field.

func ByIsRemote

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

ByIsRemote orders the results by the isRemote field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByURI

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

ByURI orders the results by the uri field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending  Status = "pending"
	StatusAccepted Status = "accepted"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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