content

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the content type in the database.
	Label = "content"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldTimetableType holds the string denoting the timetable_type field in the database.
	FieldTimetableType = "timetable_type"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldLocale holds the string denoting the locale field in the database.
	FieldLocale = "locale"
	// FieldLocation holds the string denoting the location field in the database.
	FieldLocation = "location"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldPublishedAt holds the string denoting the published_at field in the database.
	FieldPublishedAt = "published_at"
	// Table holds the table name of the content in the database.
	Table = "contents"
)
View Source
const DefaultLocation = LocationTOP

LocationTOP is the default value of the Location enum.

View Source
const DefaultStatus = StatusDRAFT

StatusDRAFT is the default value of the Status enum.

View Source
const DefaultTimetableType = TimetableTypeDEFAULT

TimetableTypeDEFAULT is the default value of the TimetableType enum.

View Source
const DefaultType = TypeTEXT

TypeTEXT is the default value of the Type enum.

Variables

View Source
var (
	Hooks [1]ent.Hook
	// 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
	// DefaultLocale holds the default value on creation for the "locale" field.
	DefaultLocale string
	// LocaleValidator is a validator for the "locale" field. It is called by the builders before save.
	LocaleValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/hkonitzer/ohmab/ent/runtime"

Columns holds all SQL columns for content fields.

Functions

func And

func And(predicates ...predicate.Content) predicate.Content

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Content

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

func ContentContains

func ContentContains(v string) predicate.Content

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

func ContentContainsFold

func ContentContainsFold(v string) predicate.Content

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

func ContentEQ

func ContentEQ(v string) predicate.Content

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

func ContentEqualFold

func ContentEqualFold(v string) predicate.Content

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

func ContentGT

func ContentGT(v string) predicate.Content

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

func ContentGTE

func ContentGTE(v string) predicate.Content

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

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Content

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

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Content

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

func ContentIn

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

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

func ContentLT

func ContentLT(v string) predicate.Content

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

func ContentLTE

func ContentLTE(v string) predicate.Content

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

func ContentNEQ

func ContentNEQ(v string) predicate.Content

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

func ContentNotIn

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

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

func CreatedAt

func CreatedAt(v time.Time) predicate.Content

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Content

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Content

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Content

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Content

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Content

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Content

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Content

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Content

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Content

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Content

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Content

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Content

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Content

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Content

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Content

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

func ID

func ID(id uuid.UUID) predicate.Content

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Content

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Content

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Content

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Content

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Content

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Content

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Locale

func Locale(v string) predicate.Content

Locale applies equality check predicate on the "locale" field. It's identical to LocaleEQ.

func LocaleContains

func LocaleContains(v string) predicate.Content

LocaleContains applies the Contains predicate on the "locale" field.

func LocaleContainsFold

func LocaleContainsFold(v string) predicate.Content

LocaleContainsFold applies the ContainsFold predicate on the "locale" field.

func LocaleEQ

func LocaleEQ(v string) predicate.Content

LocaleEQ applies the EQ predicate on the "locale" field.

func LocaleEqualFold

func LocaleEqualFold(v string) predicate.Content

LocaleEqualFold applies the EqualFold predicate on the "locale" field.

func LocaleGT

func LocaleGT(v string) predicate.Content

LocaleGT applies the GT predicate on the "locale" field.

func LocaleGTE

func LocaleGTE(v string) predicate.Content

LocaleGTE applies the GTE predicate on the "locale" field.

func LocaleHasPrefix

func LocaleHasPrefix(v string) predicate.Content

LocaleHasPrefix applies the HasPrefix predicate on the "locale" field.

func LocaleHasSuffix

func LocaleHasSuffix(v string) predicate.Content

LocaleHasSuffix applies the HasSuffix predicate on the "locale" field.

func LocaleIn

func LocaleIn(vs ...string) predicate.Content

LocaleIn applies the In predicate on the "locale" field.

func LocaleLT

func LocaleLT(v string) predicate.Content

LocaleLT applies the LT predicate on the "locale" field.

func LocaleLTE

func LocaleLTE(v string) predicate.Content

LocaleLTE applies the LTE predicate on the "locale" field.

func LocaleNEQ

func LocaleNEQ(v string) predicate.Content

LocaleNEQ applies the NEQ predicate on the "locale" field.

func LocaleNotIn

func LocaleNotIn(vs ...string) predicate.Content

LocaleNotIn applies the NotIn predicate on the "locale" field.

func LocationEQ

func LocationEQ(v Location) predicate.Content

LocationEQ applies the EQ predicate on the "location" field.

func LocationIn

func LocationIn(vs ...Location) predicate.Content

LocationIn applies the In predicate on the "location" field.

func LocationNEQ

func LocationNEQ(v Location) predicate.Content

LocationNEQ applies the NEQ predicate on the "location" field.

func LocationNotIn

func LocationNotIn(vs ...Location) predicate.Content

LocationNotIn applies the NotIn predicate on the "location" field.

func LocationValidator

func LocationValidator(l Location) error

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Content) predicate.Content

Or groups predicates with the OR operator between them.

func PublishedAt

func PublishedAt(v time.Time) predicate.Content

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

func PublishedAtEQ

func PublishedAtEQ(v time.Time) predicate.Content

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

func PublishedAtGT

func PublishedAtGT(v time.Time) predicate.Content

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

func PublishedAtGTE

func PublishedAtGTE(v time.Time) predicate.Content

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

func PublishedAtIn

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

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

func PublishedAtIsNil

func PublishedAtIsNil() predicate.Content

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

func PublishedAtLT

func PublishedAtLT(v time.Time) predicate.Content

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

func PublishedAtLTE

func PublishedAtLTE(v time.Time) predicate.Content

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

func PublishedAtNEQ

func PublishedAtNEQ(v time.Time) predicate.Content

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

func PublishedAtNotIn

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

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

func PublishedAtNotNil

func PublishedAtNotNil() predicate.Content

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

func StatusEQ

func StatusEQ(v Status) predicate.Content

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Content

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

func StatusNotIn

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

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 TimetableTypeEQ

func TimetableTypeEQ(v TimetableType) predicate.Content

TimetableTypeEQ applies the EQ predicate on the "timetable_type" field.

func TimetableTypeIn

func TimetableTypeIn(vs ...TimetableType) predicate.Content

TimetableTypeIn applies the In predicate on the "timetable_type" field.

func TimetableTypeNEQ

func TimetableTypeNEQ(v TimetableType) predicate.Content

TimetableTypeNEQ applies the NEQ predicate on the "timetable_type" field.

func TimetableTypeNotIn

func TimetableTypeNotIn(vs ...TimetableType) predicate.Content

TimetableTypeNotIn applies the NotIn predicate on the "timetable_type" field.

func TimetableTypeValidator

func TimetableTypeValidator(tt TimetableType) error

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

func TypeEQ

func TypeEQ(v Type) predicate.Content

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Content

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Content

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Content

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Content

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Content

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Content

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Content

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Content

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Content

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Content

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

func UpdatedAtNotIn

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

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 Location

type Location string

Location defines the type for the "location" enum field.

const (
	LocationTOP    Location = "TOP"
	LocationBOTTOM Location = "BOTTOM"
)

Location values.

func (Location) MarshalGQL

func (e Location) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Location) String

func (l Location) String() string

func (*Location) UnmarshalGQL

func (e *Location) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Content queries.

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 ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByID

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

ByID orders the results by the id field.

func ByLocale

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

ByLocale orders the results by the locale field.

func ByLocation

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

ByLocation orders the results by the location field.

func ByPublishedAt

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

ByPublishedAt orders the results by the published_at field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTimetableType

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

ByTimetableType orders the results by the timetable_type field.

func ByType

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

ByType orders the results by the type 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 (
	StatusDRAFT     Status = "DRAFT"
	StatusPUBLISHED Status = "PUBLISHED"
)

Status values.

func (Status) MarshalGQL

func (e Status) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalGQL

func (e *Status) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type TimetableType

type TimetableType string

TimetableType defines the type for the "timetable_type" enum field.

const (
	TimetableTypeDEFAULT          TimetableType = "DEFAULT"
	TimetableTypeREGULAR          TimetableType = "REGULAR"
	TimetableTypeCLOSED           TimetableType = "CLOSED"
	TimetableTypeEMERGENCYSERVICE TimetableType = "EMERGENCYSERVICE"
	TimetableTypeHOLIDAY          TimetableType = "HOLIDAY"
	TimetableTypeSPECIAL          TimetableType = "SPECIAL"
)

TimetableType values.

func (TimetableType) MarshalGQL

func (e TimetableType) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (TimetableType) String

func (tt TimetableType) String() string

func (*TimetableType) UnmarshalGQL

func (e *TimetableType) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeTEXT  Type = "TEXT"
	TypeHTML  Type = "HTML"
	TypeCSS   Type = "CSS"
	TypeOTHER Type = "OTHER"
)

Type values.

func (Type) MarshalGQL

func (e Type) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Type) String

func (_type Type) String() string

func (*Type) UnmarshalGQL

func (e *Type) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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