post

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the post type in the database.
	Label = "post"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedByID holds the string denoting the created_by_id field in the database.
	FieldCreatedByID = "created_by_id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedByID holds the string denoting the updated_by_id field in the database.
	FieldUpdatedByID = "updated_by_id"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedByID holds the string denoting the deleted_by_id field in the database.
	FieldDeletedByID = "deleted_by_id"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldPublishedAt holds the string denoting the published_at field in the database.
	FieldPublishedAt = "published_at"
	// FieldArchivedAt holds the string denoting the archived_at field in the database.
	FieldArchivedAt = "archived_at"
	// FieldOwnerDomainID holds the string denoting the owner_domain_id field in the database.
	FieldOwnerDomainID = "owner_domain_id"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldSlug holds the string denoting the slug field in the database.
	FieldSlug = "slug"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldViewCount holds the string denoting the view_count field in the database.
	FieldViewCount = "view_count"
	// FieldTags holds the string denoting the tags field in the database.
	FieldTags = "tags"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// EdgeMedia holds the string denoting the media edge name in mutations.
	EdgeMedia = "media"
	// Table holds the table name of the post in the database.
	Table = "posts"
	// AuthorTable is the table that holds the author relation/edge. The primary key declared below.
	AuthorTable = "user_posts"
	// 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"
	// MediaTable is the table that holds the media relation/edge. The primary key declared below.
	MediaTable = "post_media"
	// MediaInverseTable is the table name for the Media entity.
	// It exists in this package in order to avoid circular dependency with the "media" package.
	MediaInverseTable = "media"
)
View Source
const DefaultStatus = StatusDraft

StatusDraft is the default value of the Status enum.

Variables

View Source
var (
	// AuthorPrimaryKey and AuthorColumn2 are the table columns denoting the
	// primary key for the author relation (M2M).
	AuthorPrimaryKey = []string{"user_id", "post_id"}
	// MediaPrimaryKey and MediaColumn2 are the table columns denoting the
	// primary key for the media relation (M2M).
	MediaPrimaryKey = []string{"post_id", "media_id"}
)
View Source
var (
	// 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
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// SlugValidator is a validator for the "slug" field. It is called by the builders before save.
	SlugValidator func(string) error
	// DefaultViewCount holds the default value on creation for the "view_count" field.
	DefaultViewCount int
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for post fields.

Functions

func And

func And(predicates ...predicate.Post) predicate.Post

And groups predicates with the AND operator between them.

func ArchivedAt

func ArchivedAt(v time.Time) predicate.Post

ArchivedAt applies equality check predicate on the "archived_at" field. It's identical to ArchivedAtEQ.

func ArchivedAtEQ

func ArchivedAtEQ(v time.Time) predicate.Post

ArchivedAtEQ applies the EQ predicate on the "archived_at" field.

func ArchivedAtGT

func ArchivedAtGT(v time.Time) predicate.Post

ArchivedAtGT applies the GT predicate on the "archived_at" field.

func ArchivedAtGTE

func ArchivedAtGTE(v time.Time) predicate.Post

ArchivedAtGTE applies the GTE predicate on the "archived_at" field.

func ArchivedAtIn

func ArchivedAtIn(vs ...time.Time) predicate.Post

ArchivedAtIn applies the In predicate on the "archived_at" field.

func ArchivedAtIsNil

func ArchivedAtIsNil() predicate.Post

ArchivedAtIsNil applies the IsNil predicate on the "archived_at" field.

func ArchivedAtLT

func ArchivedAtLT(v time.Time) predicate.Post

ArchivedAtLT applies the LT predicate on the "archived_at" field.

func ArchivedAtLTE

func ArchivedAtLTE(v time.Time) predicate.Post

ArchivedAtLTE applies the LTE predicate on the "archived_at" field.

func ArchivedAtNEQ

func ArchivedAtNEQ(v time.Time) predicate.Post

ArchivedAtNEQ applies the NEQ predicate on the "archived_at" field.

func ArchivedAtNotIn

func ArchivedAtNotIn(vs ...time.Time) predicate.Post

ArchivedAtNotIn applies the NotIn predicate on the "archived_at" field.

func ArchivedAtNotNil

func ArchivedAtNotNil() predicate.Post

ArchivedAtNotNil applies the NotNil predicate on the "archived_at" field.

func Content

func Content(v string) predicate.Post

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

func ContentContains

func ContentContains(v string) predicate.Post

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

func ContentContainsFold

func ContentContainsFold(v string) predicate.Post

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

func ContentEQ

func ContentEQ(v string) predicate.Post

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

func ContentEqualFold

func ContentEqualFold(v string) predicate.Post

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

func ContentGT

func ContentGT(v string) predicate.Post

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

func ContentGTE

func ContentGTE(v string) predicate.Post

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

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Post

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

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Post

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

func ContentIn

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

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

func ContentLT

func ContentLT(v string) predicate.Post

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

func ContentLTE

func ContentLTE(v string) predicate.Post

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

func ContentNEQ

func ContentNEQ(v string) predicate.Post

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

func ContentNotIn

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

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

func CreatedAt

func CreatedAt(v time.Time) predicate.Post

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Post

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Post

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Post

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

func CreatedAtIn

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

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

func CreatedAtIsNil

func CreatedAtIsNil() predicate.Post

CreatedAtIsNil applies the IsNil predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Post

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Post

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Post

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

func CreatedAtNotIn

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

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

func CreatedAtNotNil

func CreatedAtNotNil() predicate.Post

CreatedAtNotNil applies the NotNil predicate on the "created_at" field.

func CreatedByID

func CreatedByID(v uuid.UUID) predicate.Post

CreatedByID applies equality check predicate on the "created_by_id" field. It's identical to CreatedByIDEQ.

func CreatedByIDEQ

func CreatedByIDEQ(v uuid.UUID) predicate.Post

CreatedByIDEQ applies the EQ predicate on the "created_by_id" field.

func CreatedByIDGT

func CreatedByIDGT(v uuid.UUID) predicate.Post

CreatedByIDGT applies the GT predicate on the "created_by_id" field.

func CreatedByIDGTE

func CreatedByIDGTE(v uuid.UUID) predicate.Post

CreatedByIDGTE applies the GTE predicate on the "created_by_id" field.

func CreatedByIDIn

func CreatedByIDIn(vs ...uuid.UUID) predicate.Post

CreatedByIDIn applies the In predicate on the "created_by_id" field.

func CreatedByIDIsNil

func CreatedByIDIsNil() predicate.Post

CreatedByIDIsNil applies the IsNil predicate on the "created_by_id" field.

func CreatedByIDLT

func CreatedByIDLT(v uuid.UUID) predicate.Post

CreatedByIDLT applies the LT predicate on the "created_by_id" field.

func CreatedByIDLTE

func CreatedByIDLTE(v uuid.UUID) predicate.Post

CreatedByIDLTE applies the LTE predicate on the "created_by_id" field.

func CreatedByIDNEQ

func CreatedByIDNEQ(v uuid.UUID) predicate.Post

CreatedByIDNEQ applies the NEQ predicate on the "created_by_id" field.

func CreatedByIDNotIn

func CreatedByIDNotIn(vs ...uuid.UUID) predicate.Post

CreatedByIDNotIn applies the NotIn predicate on the "created_by_id" field.

func CreatedByIDNotNil

func CreatedByIDNotNil() predicate.Post

CreatedByIDNotNil applies the NotNil predicate on the "created_by_id" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Post

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Post

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Post

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Post

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Post

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Post

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Post

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Post

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Post

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Post

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Post

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func DeletedByID

func DeletedByID(v uuid.UUID) predicate.Post

DeletedByID applies equality check predicate on the "deleted_by_id" field. It's identical to DeletedByIDEQ.

func DeletedByIDEQ

func DeletedByIDEQ(v uuid.UUID) predicate.Post

DeletedByIDEQ applies the EQ predicate on the "deleted_by_id" field.

func DeletedByIDGT

func DeletedByIDGT(v uuid.UUID) predicate.Post

DeletedByIDGT applies the GT predicate on the "deleted_by_id" field.

func DeletedByIDGTE

func DeletedByIDGTE(v uuid.UUID) predicate.Post

DeletedByIDGTE applies the GTE predicate on the "deleted_by_id" field.

func DeletedByIDIn

func DeletedByIDIn(vs ...uuid.UUID) predicate.Post

DeletedByIDIn applies the In predicate on the "deleted_by_id" field.

func DeletedByIDIsNil

func DeletedByIDIsNil() predicate.Post

DeletedByIDIsNil applies the IsNil predicate on the "deleted_by_id" field.

func DeletedByIDLT

func DeletedByIDLT(v uuid.UUID) predicate.Post

DeletedByIDLT applies the LT predicate on the "deleted_by_id" field.

func DeletedByIDLTE

func DeletedByIDLTE(v uuid.UUID) predicate.Post

DeletedByIDLTE applies the LTE predicate on the "deleted_by_id" field.

func DeletedByIDNEQ

func DeletedByIDNEQ(v uuid.UUID) predicate.Post

DeletedByIDNEQ applies the NEQ predicate on the "deleted_by_id" field.

func DeletedByIDNotIn

func DeletedByIDNotIn(vs ...uuid.UUID) predicate.Post

DeletedByIDNotIn applies the NotIn predicate on the "deleted_by_id" field.

func DeletedByIDNotNil

func DeletedByIDNotNil() predicate.Post

DeletedByIDNotNil applies the NotNil predicate on the "deleted_by_id" field.

func HasAuthor

func HasAuthor() predicate.Post

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

func HasAuthorWith

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

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

func HasMedia

func HasMedia() predicate.Post

HasMedia applies the HasEdge predicate on the "media" edge.

func HasMediaWith

func HasMediaWith(preds ...predicate.Media) predicate.Post

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

func ID

func ID(id uuid.UUID) predicate.Post

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Post

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Post

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Post

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Post

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Post

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Post

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func OwnerDomainID

func OwnerDomainID(v uuid.UUID) predicate.Post

OwnerDomainID applies equality check predicate on the "owner_domain_id" field. It's identical to OwnerDomainIDEQ.

func OwnerDomainIDEQ

func OwnerDomainIDEQ(v uuid.UUID) predicate.Post

OwnerDomainIDEQ applies the EQ predicate on the "owner_domain_id" field.

func OwnerDomainIDGT

func OwnerDomainIDGT(v uuid.UUID) predicate.Post

OwnerDomainIDGT applies the GT predicate on the "owner_domain_id" field.

func OwnerDomainIDGTE

func OwnerDomainIDGTE(v uuid.UUID) predicate.Post

OwnerDomainIDGTE applies the GTE predicate on the "owner_domain_id" field.

func OwnerDomainIDIn

func OwnerDomainIDIn(vs ...uuid.UUID) predicate.Post

OwnerDomainIDIn applies the In predicate on the "owner_domain_id" field.

func OwnerDomainIDIsNil

func OwnerDomainIDIsNil() predicate.Post

OwnerDomainIDIsNil applies the IsNil predicate on the "owner_domain_id" field.

func OwnerDomainIDLT

func OwnerDomainIDLT(v uuid.UUID) predicate.Post

OwnerDomainIDLT applies the LT predicate on the "owner_domain_id" field.

func OwnerDomainIDLTE

func OwnerDomainIDLTE(v uuid.UUID) predicate.Post

OwnerDomainIDLTE applies the LTE predicate on the "owner_domain_id" field.

func OwnerDomainIDNEQ

func OwnerDomainIDNEQ(v uuid.UUID) predicate.Post

OwnerDomainIDNEQ applies the NEQ predicate on the "owner_domain_id" field.

func OwnerDomainIDNotIn

func OwnerDomainIDNotIn(vs ...uuid.UUID) predicate.Post

OwnerDomainIDNotIn applies the NotIn predicate on the "owner_domain_id" field.

func OwnerDomainIDNotNil

func OwnerDomainIDNotNil() predicate.Post

OwnerDomainIDNotNil applies the NotNil predicate on the "owner_domain_id" field.

func PublishedAt

func PublishedAt(v time.Time) predicate.Post

PublishedAt applies equality check predicate on the "published_at" field. It's identical to PublishedAtEQ.

func PublishedAtEQ

func PublishedAtEQ(v time.Time) predicate.Post

PublishedAtEQ applies the EQ predicate on the "published_at" field.

func PublishedAtGT

func PublishedAtGT(v time.Time) predicate.Post

PublishedAtGT applies the GT predicate on the "published_at" field.

func PublishedAtGTE

func PublishedAtGTE(v time.Time) predicate.Post

PublishedAtGTE applies the GTE predicate on the "published_at" field.

func PublishedAtIn

func PublishedAtIn(vs ...time.Time) predicate.Post

PublishedAtIn applies the In predicate on the "published_at" field.

func PublishedAtIsNil

func PublishedAtIsNil() predicate.Post

PublishedAtIsNil applies the IsNil predicate on the "published_at" field.

func PublishedAtLT

func PublishedAtLT(v time.Time) predicate.Post

PublishedAtLT applies the LT predicate on the "published_at" field.

func PublishedAtLTE

func PublishedAtLTE(v time.Time) predicate.Post

PublishedAtLTE applies the LTE predicate on the "published_at" field.

func PublishedAtNEQ

func PublishedAtNEQ(v time.Time) predicate.Post

PublishedAtNEQ applies the NEQ predicate on the "published_at" field.

func PublishedAtNotIn

func PublishedAtNotIn(vs ...time.Time) predicate.Post

PublishedAtNotIn applies the NotIn predicate on the "published_at" field.

func PublishedAtNotNil

func PublishedAtNotNil() predicate.Post

PublishedAtNotNil applies the NotNil predicate on the "published_at" field.

func Slug

func Slug(v string) predicate.Post

Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.

func SlugContains

func SlugContains(v string) predicate.Post

SlugContains applies the Contains predicate on the "slug" field.

func SlugContainsFold

func SlugContainsFold(v string) predicate.Post

SlugContainsFold applies the ContainsFold predicate on the "slug" field.

func SlugEQ

func SlugEQ(v string) predicate.Post

SlugEQ applies the EQ predicate on the "slug" field.

func SlugEqualFold

func SlugEqualFold(v string) predicate.Post

SlugEqualFold applies the EqualFold predicate on the "slug" field.

func SlugGT

func SlugGT(v string) predicate.Post

SlugGT applies the GT predicate on the "slug" field.

func SlugGTE

func SlugGTE(v string) predicate.Post

SlugGTE applies the GTE predicate on the "slug" field.

func SlugHasPrefix

func SlugHasPrefix(v string) predicate.Post

SlugHasPrefix applies the HasPrefix predicate on the "slug" field.

func SlugHasSuffix

func SlugHasSuffix(v string) predicate.Post

SlugHasSuffix applies the HasSuffix predicate on the "slug" field.

func SlugIn

func SlugIn(vs ...string) predicate.Post

SlugIn applies the In predicate on the "slug" field.

func SlugLT

func SlugLT(v string) predicate.Post

SlugLT applies the LT predicate on the "slug" field.

func SlugLTE

func SlugLTE(v string) predicate.Post

SlugLTE applies the LTE predicate on the "slug" field.

func SlugNEQ

func SlugNEQ(v string) predicate.Post

SlugNEQ applies the NEQ predicate on the "slug" field.

func SlugNotIn

func SlugNotIn(vs ...string) predicate.Post

SlugNotIn applies the NotIn predicate on the "slug" field.

func StatusEQ

func StatusEQ(v Status) predicate.Post

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Post

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

func StatusNotIn

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

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 TagsIsNil

func TagsIsNil() predicate.Post

TagsIsNil applies the IsNil predicate on the "tags" field.

func TagsNotNil

func TagsNotNil() predicate.Post

TagsNotNil applies the NotNil predicate on the "tags" field.

func Title

func Title(v string) predicate.Post

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Post

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Post

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Post

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Post

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Post

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Post

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Post

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Post

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Post

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Post

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Post

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Post

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Post

TitleNotIn applies the NotIn predicate on the "title" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Post

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Post

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Post

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Post

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

func UpdatedAtIn

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

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

func UpdatedAtIsNil

func UpdatedAtIsNil() predicate.Post

UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Post

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Post

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Post

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedAtNotNil

func UpdatedAtNotNil() predicate.Post

UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.

func UpdatedByID

func UpdatedByID(v uuid.UUID) predicate.Post

UpdatedByID applies equality check predicate on the "updated_by_id" field. It's identical to UpdatedByIDEQ.

func UpdatedByIDEQ

func UpdatedByIDEQ(v uuid.UUID) predicate.Post

UpdatedByIDEQ applies the EQ predicate on the "updated_by_id" field.

func UpdatedByIDGT

func UpdatedByIDGT(v uuid.UUID) predicate.Post

UpdatedByIDGT applies the GT predicate on the "updated_by_id" field.

func UpdatedByIDGTE

func UpdatedByIDGTE(v uuid.UUID) predicate.Post

UpdatedByIDGTE applies the GTE predicate on the "updated_by_id" field.

func UpdatedByIDIn

func UpdatedByIDIn(vs ...uuid.UUID) predicate.Post

UpdatedByIDIn applies the In predicate on the "updated_by_id" field.

func UpdatedByIDIsNil

func UpdatedByIDIsNil() predicate.Post

UpdatedByIDIsNil applies the IsNil predicate on the "updated_by_id" field.

func UpdatedByIDLT

func UpdatedByIDLT(v uuid.UUID) predicate.Post

UpdatedByIDLT applies the LT predicate on the "updated_by_id" field.

func UpdatedByIDLTE

func UpdatedByIDLTE(v uuid.UUID) predicate.Post

UpdatedByIDLTE applies the LTE predicate on the "updated_by_id" field.

func UpdatedByIDNEQ

func UpdatedByIDNEQ(v uuid.UUID) predicate.Post

UpdatedByIDNEQ applies the NEQ predicate on the "updated_by_id" field.

func UpdatedByIDNotIn

func UpdatedByIDNotIn(vs ...uuid.UUID) predicate.Post

UpdatedByIDNotIn applies the NotIn predicate on the "updated_by_id" field.

func UpdatedByIDNotNil

func UpdatedByIDNotNil() predicate.Post

UpdatedByIDNotNil applies the NotNil predicate on the "updated_by_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func ViewCount

func ViewCount(v int) predicate.Post

ViewCount applies equality check predicate on the "view_count" field. It's identical to ViewCountEQ.

func ViewCountEQ

func ViewCountEQ(v int) predicate.Post

ViewCountEQ applies the EQ predicate on the "view_count" field.

func ViewCountGT

func ViewCountGT(v int) predicate.Post

ViewCountGT applies the GT predicate on the "view_count" field.

func ViewCountGTE

func ViewCountGTE(v int) predicate.Post

ViewCountGTE applies the GTE predicate on the "view_count" field.

func ViewCountIn

func ViewCountIn(vs ...int) predicate.Post

ViewCountIn applies the In predicate on the "view_count" field.

func ViewCountLT

func ViewCountLT(v int) predicate.Post

ViewCountLT applies the LT predicate on the "view_count" field.

func ViewCountLTE

func ViewCountLTE(v int) predicate.Post

ViewCountLTE applies the LTE predicate on the "view_count" field.

func ViewCountNEQ

func ViewCountNEQ(v int) predicate.Post

ViewCountNEQ applies the NEQ predicate on the "view_count" field.

func ViewCountNotIn

func ViewCountNotIn(vs ...int) predicate.Post

ViewCountNotIn applies the NotIn predicate on the "view_count" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Post queries.

func ByArchivedAt

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

ByArchivedAt orders the results by the archived_at field.

func ByAuthor

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

ByAuthor orders the results by author terms.

func ByAuthorCount

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

ByAuthorCount orders the results by author count.

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 ByCreatedByID

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

ByCreatedByID orders the results by the created_by_id field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDeletedByID

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

ByDeletedByID orders the results by the deleted_by_id field.

func ByID

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

ByID orders the results by the id field.

func ByMedia

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

ByMedia orders the results by media terms.

func ByMediaCount

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

ByMediaCount orders the results by media count.

func ByOwnerDomainID

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

ByOwnerDomainID orders the results by the owner_domain_id field.

func ByPublishedAt

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

ByPublishedAt orders the results by the published_at field.

func BySlug

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

BySlug orders the results by the slug field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTitle

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

ByTitle orders the results by the title field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedByID

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

ByUpdatedByID orders the results by the updated_by_id field.

func ByViewCount

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

ByViewCount orders the results by the view_count field.

type Status

type Status string

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

const (
	StatusDraft     Status = "draft"
	StatusPublished Status = "published"
	StatusArchived  Status = "archived"
)

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