Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Note) predicate.Note
- func Content(v string) predicate.Note
- func ContentContains(v string) predicate.Note
- func ContentContainsFold(v string) predicate.Note
- func ContentEQ(v string) predicate.Note
- func ContentEqualFold(v string) predicate.Note
- func ContentGT(v string) predicate.Note
- func ContentGTE(v string) predicate.Note
- func ContentHasPrefix(v string) predicate.Note
- func ContentHasSuffix(v string) predicate.Note
- func ContentIn(vs ...string) predicate.Note
- func ContentLT(v string) predicate.Note
- func ContentLTE(v string) predicate.Note
- func ContentNEQ(v string) predicate.Note
- func ContentNotIn(vs ...string) predicate.Note
- func CreatedAt(v time.Time) predicate.Note
- func CreatedAtEQ(v time.Time) predicate.Note
- func CreatedAtGT(v time.Time) predicate.Note
- func CreatedAtGTE(v time.Time) predicate.Note
- func CreatedAtIn(vs ...time.Time) predicate.Note
- func CreatedAtLT(v time.Time) predicate.Note
- func CreatedAtLTE(v time.Time) predicate.Note
- func CreatedAtNEQ(v time.Time) predicate.Note
- func CreatedAtNotIn(vs ...time.Time) predicate.Note
- func HasAttachments() predicate.Note
- func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Note
- func HasAuthor() predicate.Note
- func HasAuthorWith(preds ...predicate.User) predicate.Note
- func HasMentions() predicate.Note
- func HasMentionsWith(preds ...predicate.User) predicate.Note
- func ID(id uuid.UUID) predicate.Note
- func IDEQ(id uuid.UUID) predicate.Note
- func IDGT(id uuid.UUID) predicate.Note
- func IDGTE(id uuid.UUID) predicate.Note
- func IDIn(ids ...uuid.UUID) predicate.Note
- func IDLT(id uuid.UUID) predicate.Note
- func IDLTE(id uuid.UUID) predicate.Note
- func IDNEQ(id uuid.UUID) predicate.Note
- func IDNotIn(ids ...uuid.UUID) predicate.Note
- func IsRemote(v bool) predicate.Note
- func IsRemoteEQ(v bool) predicate.Note
- func IsRemoteNEQ(v bool) predicate.Note
- func IsSensitive(v bool) predicate.Note
- func IsSensitiveEQ(v bool) predicate.Note
- func IsSensitiveNEQ(v bool) predicate.Note
- func Not(p predicate.Note) predicate.Note
- func Or(predicates ...predicate.Note) predicate.Note
- func Subject(v string) predicate.Note
- func SubjectContains(v string) predicate.Note
- func SubjectContainsFold(v string) predicate.Note
- func SubjectEQ(v string) predicate.Note
- func SubjectEqualFold(v string) predicate.Note
- func SubjectGT(v string) predicate.Note
- func SubjectGTE(v string) predicate.Note
- func SubjectHasPrefix(v string) predicate.Note
- func SubjectHasSuffix(v string) predicate.Note
- func SubjectIn(vs ...string) predicate.Note
- func SubjectIsNil() predicate.Note
- func SubjectLT(v string) predicate.Note
- func SubjectLTE(v string) predicate.Note
- func SubjectNEQ(v string) predicate.Note
- func SubjectNotIn(vs ...string) predicate.Note
- func SubjectNotNil() predicate.Note
- func URI(v string) predicate.Note
- func URIContains(v string) predicate.Note
- func URIContainsFold(v string) predicate.Note
- func URIEQ(v string) predicate.Note
- func URIEqualFold(v string) predicate.Note
- func URIGT(v string) predicate.Note
- func URIGTE(v string) predicate.Note
- func URIHasPrefix(v string) predicate.Note
- func URIHasSuffix(v string) predicate.Note
- func URIIn(vs ...string) predicate.Note
- func URILT(v string) predicate.Note
- func URILTE(v string) predicate.Note
- func URINEQ(v string) predicate.Note
- func URINotIn(vs ...string) predicate.Note
- func UpdatedAt(v time.Time) predicate.Note
- func UpdatedAtEQ(v time.Time) predicate.Note
- func UpdatedAtGT(v time.Time) predicate.Note
- func UpdatedAtGTE(v time.Time) predicate.Note
- func UpdatedAtIn(vs ...time.Time) predicate.Note
- func UpdatedAtLT(v time.Time) predicate.Note
- func UpdatedAtLTE(v time.Time) predicate.Note
- func UpdatedAtNEQ(v time.Time) predicate.Note
- func UpdatedAtNotIn(vs ...time.Time) predicate.Note
- func ValidColumn(column string) bool
- func VisibilityEQ(v Visibility) predicate.Note
- func VisibilityIn(vs ...Visibility) predicate.Note
- func VisibilityNEQ(v Visibility) predicate.Note
- func VisibilityNotIn(vs ...Visibility) predicate.Note
- func VisibilityValidator(v Visibility) error
- type OrderOption
- func ByAttachments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAttachmentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsRemote(opts ...sql.OrderTermOption) OrderOption
- func ByIsSensitive(opts ...sql.OrderTermOption) OrderOption
- func ByMentions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMentionsCount(opts ...sql.OrderTermOption) OrderOption
- func BySubject(opts ...sql.OrderTermOption) OrderOption
- func ByURI(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByVisibility(opts ...sql.OrderTermOption) OrderOption
- type Visibility
Constants ¶
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" )
const DefaultVisibility = VisibilityPublic
VisibilityPublic is the default value of the Visibility enum.
Variables ¶
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 )
var Columns = []string{ FieldID, FieldIsRemote, FieldURI, FieldExtensions, FieldCreatedAt, FieldUpdatedAt, FieldSubject, FieldContent, FieldIsSensitive, FieldVisibility, }
Columns holds all SQL columns for note fields.
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.
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 Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasAttachments ¶
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 HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
func HasMentions ¶
HasMentions applies the HasEdge predicate on the "mentions" edge.
func HasMentionsWith ¶
HasMentionsWith applies the HasEdge predicate on the "mentions" edge with a given conditions (other predicates).
func IsRemote ¶
IsRemote applies equality check predicate on the "isRemote" field. It's identical to IsRemoteEQ.
func IsRemoteEQ ¶
IsRemoteEQ applies the EQ predicate on the "isRemote" field.
func IsRemoteNEQ ¶
IsRemoteNEQ applies the NEQ predicate on the "isRemote" field.
func IsSensitive ¶
IsSensitive applies equality check predicate on the "isSensitive" field. It's identical to IsSensitiveEQ.
func IsSensitiveEQ ¶
IsSensitiveEQ applies the EQ predicate on the "isSensitive" field.
func IsSensitiveNEQ ¶
IsSensitiveNEQ applies the NEQ predicate on the "isSensitive" field.
func Subject ¶
Subject applies equality check predicate on the "subject" field. It's identical to SubjectEQ.
func SubjectContains ¶
SubjectContains applies the Contains predicate on the "subject" field.
func SubjectContainsFold ¶
SubjectContainsFold applies the ContainsFold predicate on the "subject" field.
func SubjectEqualFold ¶
SubjectEqualFold applies the EqualFold predicate on the "subject" field.
func SubjectGTE ¶
SubjectGTE applies the GTE predicate on the "subject" field.
func SubjectHasPrefix ¶
SubjectHasPrefix applies the HasPrefix predicate on the "subject" field.
func SubjectHasSuffix ¶
SubjectHasSuffix applies the HasSuffix predicate on the "subject" field.
func SubjectIsNil ¶
SubjectIsNil applies the IsNil predicate on the "subject" field.
func SubjectLTE ¶
SubjectLTE applies the LTE predicate on the "subject" field.
func SubjectNEQ ¶
SubjectNEQ applies the NEQ predicate on the "subject" field.
func SubjectNotIn ¶
SubjectNotIn applies the NotIn predicate on the "subject" field.
func SubjectNotNil ¶
SubjectNotNil applies the NotNil predicate on the "subject" field.
func URIContains ¶
URIContains applies the Contains predicate on the "uri" field.
func URIContainsFold ¶
URIContainsFold applies the ContainsFold predicate on the "uri" field.
func URIEqualFold ¶
URIEqualFold applies the EqualFold predicate on the "uri" field.
func URIHasPrefix ¶
URIHasPrefix applies the HasPrefix predicate on the "uri" field.
func URIHasSuffix ¶
URIHasSuffix applies the HasSuffix predicate on the "uri" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
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 ¶
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