note

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 note type in the database.
	Label = "note"
	// 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"
	// FieldSubject holds the string denoting the subject field in the database.
	FieldSubject = "subject"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldIsSensitive holds the string denoting the issensitive field in the database.
	FieldIsSensitive = "is_sensitive"
	// FieldVisibility holds the string denoting the visibility field in the database.
	FieldVisibility = "visibility"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// EdgeMentions holds the string denoting the mentions edge name in mutations.
	EdgeMentions = "mentions"
	// EdgeAttachments holds the string denoting the attachments edge name in mutations.
	EdgeAttachments = "attachments"
	// Table holds the table name of the note in the database.
	Table = "notes"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "notes"
	// AuthorInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	AuthorInverseTable = "users"
	// AuthorColumn is the table column denoting the author relation/edge.
	AuthorColumn = "note_author"
	// MentionsTable is the table that holds the mentions relation/edge. The primary key declared below.
	MentionsTable = "note_mentions"
	// MentionsInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	MentionsInverseTable = "users"
	// AttachmentsTable is the table that holds the attachments relation/edge.
	AttachmentsTable = "attachments"
	// AttachmentsInverseTable is the table name for the Attachment entity.
	// It exists in this package in order to avoid circular dependency with the "attachment" package.
	AttachmentsInverseTable = "attachments"
	// AttachmentsColumn is the table column denoting the attachments relation/edge.
	AttachmentsColumn = "note_attachments"
)
View Source
const DefaultVisibility = VisibilityPublic

VisibilityPublic is the default value of the Visibility 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
	// SubjectValidator is a validator for the "subject" field. It is called by the builders before save.
	SubjectValidator func(string) error
	// DefaultIsSensitive holds the default value on creation for the "isSensitive" field.
	DefaultIsSensitive bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for note fields.

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

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

View Source
var (
	// MentionsPrimaryKey and MentionsColumn2 are the table columns denoting the
	// primary key for the mentions relation (M2M).
	MentionsPrimaryKey = []string{"note_id", "user_id"}
)

Functions

func And

func And(predicates ...predicate.Note) predicate.Note

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Note

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Note

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Note

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Note

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Note

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Note

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Note

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Note

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Note

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Note

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Note

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Note

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Note

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Note

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Note

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Note

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Note

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Note

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Note

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Note

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Note

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

func CreatedAtNotIn

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

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

func HasAttachments

func HasAttachments() predicate.Note

HasAttachments applies the HasEdge predicate on the "attachments" edge.

func HasAttachmentsWith

func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Note

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

func HasAuthor

func HasAuthor() predicate.Note

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.Note

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

func HasMentions

func HasMentions() predicate.Note

HasMentions applies the HasEdge predicate on the "mentions" edge.

func HasMentionsWith

func HasMentionsWith(preds ...predicate.User) predicate.Note

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

func ID

func ID(id uuid.UUID) predicate.Note

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Note

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Note

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Note

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Note

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Note

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Note

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsRemote

func IsRemote(v bool) predicate.Note

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

func IsRemoteEQ

func IsRemoteEQ(v bool) predicate.Note

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

func IsRemoteNEQ

func IsRemoteNEQ(v bool) predicate.Note

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

func IsSensitive

func IsSensitive(v bool) predicate.Note

IsSensitive applies equality check predicate on the "isSensitive" field. It's identical to IsSensitiveEQ.

func IsSensitiveEQ

func IsSensitiveEQ(v bool) predicate.Note

IsSensitiveEQ applies the EQ predicate on the "isSensitive" field.

func IsSensitiveNEQ

func IsSensitiveNEQ(v bool) predicate.Note

IsSensitiveNEQ applies the NEQ predicate on the "isSensitive" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Note) predicate.Note

Or groups predicates with the OR operator between them.

func Subject

func Subject(v string) predicate.Note

Subject applies equality check predicate on the "subject" field. It's identical to SubjectEQ.

func SubjectContains

func SubjectContains(v string) predicate.Note

SubjectContains applies the Contains predicate on the "subject" field.

func SubjectContainsFold

func SubjectContainsFold(v string) predicate.Note

SubjectContainsFold applies the ContainsFold predicate on the "subject" field.

func SubjectEQ

func SubjectEQ(v string) predicate.Note

SubjectEQ applies the EQ predicate on the "subject" field.

func SubjectEqualFold

func SubjectEqualFold(v string) predicate.Note

SubjectEqualFold applies the EqualFold predicate on the "subject" field.

func SubjectGT

func SubjectGT(v string) predicate.Note

SubjectGT applies the GT predicate on the "subject" field.

func SubjectGTE

func SubjectGTE(v string) predicate.Note

SubjectGTE applies the GTE predicate on the "subject" field.

func SubjectHasPrefix

func SubjectHasPrefix(v string) predicate.Note

SubjectHasPrefix applies the HasPrefix predicate on the "subject" field.

func SubjectHasSuffix

func SubjectHasSuffix(v string) predicate.Note

SubjectHasSuffix applies the HasSuffix predicate on the "subject" field.

func SubjectIn

func SubjectIn(vs ...string) predicate.Note

SubjectIn applies the In predicate on the "subject" field.

func SubjectIsNil

func SubjectIsNil() predicate.Note

SubjectIsNil applies the IsNil predicate on the "subject" field.

func SubjectLT

func SubjectLT(v string) predicate.Note

SubjectLT applies the LT predicate on the "subject" field.

func SubjectLTE

func SubjectLTE(v string) predicate.Note

SubjectLTE applies the LTE predicate on the "subject" field.

func SubjectNEQ

func SubjectNEQ(v string) predicate.Note

SubjectNEQ applies the NEQ predicate on the "subject" field.

func SubjectNotIn

func SubjectNotIn(vs ...string) predicate.Note

SubjectNotIn applies the NotIn predicate on the "subject" field.

func SubjectNotNil

func SubjectNotNil() predicate.Note

SubjectNotNil applies the NotNil predicate on the "subject" field.

func URI

func URI(v string) predicate.Note

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

func URIContains

func URIContains(v string) predicate.Note

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

func URIContainsFold

func URIContainsFold(v string) predicate.Note

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

func URIEQ

func URIEQ(v string) predicate.Note

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

func URIEqualFold

func URIEqualFold(v string) predicate.Note

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

func URIGT

func URIGT(v string) predicate.Note

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

func URIGTE

func URIGTE(v string) predicate.Note

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

func URIHasPrefix

func URIHasPrefix(v string) predicate.Note

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

func URIHasSuffix

func URIHasSuffix(v string) predicate.Note

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

func URIIn

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

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

func URILT

func URILT(v string) predicate.Note

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

func URILTE

func URILTE(v string) predicate.Note

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

func URINEQ

func URINEQ(v string) predicate.Note

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

func URINotIn

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

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Note

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Note

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Note

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Note

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Note

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Note

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Note

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

func UpdatedAtNotIn

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

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

func VisibilityEQ

func VisibilityEQ(v Visibility) predicate.Note

VisibilityEQ applies the EQ predicate on the "visibility" field.

func VisibilityIn

func VisibilityIn(vs ...Visibility) predicate.Note

VisibilityIn applies the In predicate on the "visibility" field.

func VisibilityNEQ

func VisibilityNEQ(v Visibility) predicate.Note

VisibilityNEQ applies the NEQ predicate on the "visibility" field.

func VisibilityNotIn

func VisibilityNotIn(vs ...Visibility) predicate.Note

VisibilityNotIn applies the NotIn predicate on the "visibility" field.

func VisibilityValidator

func VisibilityValidator(v Visibility) error

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Note queries.

func ByAttachments

func ByAttachments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAttachments orders the results by attachments terms.

func ByAttachmentsCount

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

ByAttachmentsCount orders the results by attachments count.

func ByAuthorField

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

ByAuthorField orders the results by author field.

func ByContent

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

ByContent orders the results by the content field.

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 ByIsRemote

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

ByIsRemote orders the results by the isRemote field.

func ByIsSensitive

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

ByIsSensitive orders the results by the isSensitive field.

func ByMentions

func ByMentions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByMentions orders the results by mentions terms.

func ByMentionsCount

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

ByMentionsCount orders the results by mentions count.

func BySubject

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

BySubject orders the results by the subject 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.

func ByVisibility

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

ByVisibility orders the results by the visibility field.

type Visibility

type Visibility string

Visibility defines the type for the "visibility" enum field.

const (
	VisibilityPublic    Visibility = "public"
	VisibilityUnlisted  Visibility = "unlisted"
	VisibilityFollowers Visibility = "followers"
	VisibilityDirect    Visibility = "direct"
)

Visibility values.

func (Visibility) String

func (v Visibility) String() string

Jump to

Keyboard shortcuts

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