Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Content) predicate.Content
- func Content(v string) predicate.Content
- func ContentContains(v string) predicate.Content
- func ContentContainsFold(v string) predicate.Content
- func ContentEQ(v string) predicate.Content
- func ContentEqualFold(v string) predicate.Content
- func ContentGT(v string) predicate.Content
- func ContentGTE(v string) predicate.Content
- func ContentHasPrefix(v string) predicate.Content
- func ContentHasSuffix(v string) predicate.Content
- func ContentIn(vs ...string) predicate.Content
- func ContentLT(v string) predicate.Content
- func ContentLTE(v string) predicate.Content
- func ContentNEQ(v string) predicate.Content
- func ContentNotIn(vs ...string) predicate.Content
- func CreatedAt(v time.Time) predicate.Content
- func CreatedAtEQ(v time.Time) predicate.Content
- func CreatedAtGT(v time.Time) predicate.Content
- func CreatedAtGTE(v time.Time) predicate.Content
- func CreatedAtIn(vs ...time.Time) predicate.Content
- func CreatedAtLT(v time.Time) predicate.Content
- func CreatedAtLTE(v time.Time) predicate.Content
- func CreatedAtNEQ(v time.Time) predicate.Content
- func CreatedAtNotIn(vs ...time.Time) predicate.Content
- func DeletedAt(v time.Time) predicate.Content
- func DeletedAtEQ(v time.Time) predicate.Content
- func DeletedAtGT(v time.Time) predicate.Content
- func DeletedAtGTE(v time.Time) predicate.Content
- func DeletedAtIn(vs ...time.Time) predicate.Content
- func DeletedAtIsNil() predicate.Content
- func DeletedAtLT(v time.Time) predicate.Content
- func DeletedAtLTE(v time.Time) predicate.Content
- func DeletedAtNEQ(v time.Time) predicate.Content
- func DeletedAtNotIn(vs ...time.Time) predicate.Content
- func DeletedAtNotNil() predicate.Content
- func ID(id uuid.UUID) predicate.Content
- func IDEQ(id uuid.UUID) predicate.Content
- func IDGT(id uuid.UUID) predicate.Content
- func IDGTE(id uuid.UUID) predicate.Content
- func IDIn(ids ...uuid.UUID) predicate.Content
- func IDLT(id uuid.UUID) predicate.Content
- func IDLTE(id uuid.UUID) predicate.Content
- func IDNEQ(id uuid.UUID) predicate.Content
- func IDNotIn(ids ...uuid.UUID) predicate.Content
- func Locale(v string) predicate.Content
- func LocaleContains(v string) predicate.Content
- func LocaleContainsFold(v string) predicate.Content
- func LocaleEQ(v string) predicate.Content
- func LocaleEqualFold(v string) predicate.Content
- func LocaleGT(v string) predicate.Content
- func LocaleGTE(v string) predicate.Content
- func LocaleHasPrefix(v string) predicate.Content
- func LocaleHasSuffix(v string) predicate.Content
- func LocaleIn(vs ...string) predicate.Content
- func LocaleLT(v string) predicate.Content
- func LocaleLTE(v string) predicate.Content
- func LocaleNEQ(v string) predicate.Content
- func LocaleNotIn(vs ...string) predicate.Content
- func LocationEQ(v Location) predicate.Content
- func LocationIn(vs ...Location) predicate.Content
- func LocationNEQ(v Location) predicate.Content
- func LocationNotIn(vs ...Location) predicate.Content
- func LocationValidator(l Location) error
- func Not(p predicate.Content) predicate.Content
- func Or(predicates ...predicate.Content) predicate.Content
- func PublishedAt(v time.Time) predicate.Content
- func PublishedAtEQ(v time.Time) predicate.Content
- func PublishedAtGT(v time.Time) predicate.Content
- func PublishedAtGTE(v time.Time) predicate.Content
- func PublishedAtIn(vs ...time.Time) predicate.Content
- func PublishedAtIsNil() predicate.Content
- func PublishedAtLT(v time.Time) predicate.Content
- func PublishedAtLTE(v time.Time) predicate.Content
- func PublishedAtNEQ(v time.Time) predicate.Content
- func PublishedAtNotIn(vs ...time.Time) predicate.Content
- func PublishedAtNotNil() predicate.Content
- func StatusEQ(v Status) predicate.Content
- func StatusIn(vs ...Status) predicate.Content
- func StatusNEQ(v Status) predicate.Content
- func StatusNotIn(vs ...Status) predicate.Content
- func StatusValidator(s Status) error
- func TimetableTypeEQ(v TimetableType) predicate.Content
- func TimetableTypeIn(vs ...TimetableType) predicate.Content
- func TimetableTypeNEQ(v TimetableType) predicate.Content
- func TimetableTypeNotIn(vs ...TimetableType) predicate.Content
- func TimetableTypeValidator(tt TimetableType) error
- func TypeEQ(v Type) predicate.Content
- func TypeIn(vs ...Type) predicate.Content
- func TypeNEQ(v Type) predicate.Content
- func TypeNotIn(vs ...Type) predicate.Content
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Content
- func UpdatedAtEQ(v time.Time) predicate.Content
- func UpdatedAtGT(v time.Time) predicate.Content
- func UpdatedAtGTE(v time.Time) predicate.Content
- func UpdatedAtIn(vs ...time.Time) predicate.Content
- func UpdatedAtLT(v time.Time) predicate.Content
- func UpdatedAtLTE(v time.Time) predicate.Content
- func UpdatedAtNEQ(v time.Time) predicate.Content
- func UpdatedAtNotIn(vs ...time.Time) predicate.Content
- func ValidColumn(column string) bool
- type Location
- type OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLocale(opts ...sql.OrderTermOption) OrderOption
- func ByLocation(opts ...sql.OrderTermOption) OrderOption
- func ByPublishedAt(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByTimetableType(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Status
- type TimetableType
- type Type
Constants ¶
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" )
const DefaultLocation = LocationTOP
LocationTOP is the default value of the Location enum.
const DefaultStatus = StatusDRAFT
StatusDRAFT is the default value of the Status enum.
const DefaultTimetableType = TimetableTypeDEFAULT
TimetableTypeDEFAULT is the default value of the TimetableType enum.
const DefaultType = TypeTEXT
TypeTEXT is the default value of the Type enum.
Variables ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldTimetableType, FieldType, FieldLocale, FieldLocation, FieldContent, FieldStatus, FieldPublishedAt, }
Columns holds all SQL columns for content fields.
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 DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func Locale ¶
Locale applies equality check predicate on the "locale" field. It's identical to LocaleEQ.
func LocaleContains ¶
LocaleContains applies the Contains predicate on the "locale" field.
func LocaleContainsFold ¶
LocaleContainsFold applies the ContainsFold predicate on the "locale" field.
func LocaleEqualFold ¶
LocaleEqualFold applies the EqualFold predicate on the "locale" field.
func LocaleHasPrefix ¶
LocaleHasPrefix applies the HasPrefix predicate on the "locale" field.
func LocaleHasSuffix ¶
LocaleHasSuffix applies the HasSuffix predicate on the "locale" field.
func LocaleNotIn ¶
LocaleNotIn applies the NotIn predicate on the "locale" field.
func LocationEQ ¶
LocationEQ applies the EQ predicate on the "location" field.
func LocationIn ¶
LocationIn applies the In predicate on the "location" field.
func LocationNEQ ¶
LocationNEQ applies the NEQ predicate on the "location" field.
func LocationNotIn ¶
LocationNotIn applies the NotIn predicate on the "location" field.
func LocationValidator ¶
LocationValidator is a validator for the "location" field enum values. It is called by the builders before save.
func PublishedAt ¶
PublishedAt applies equality check predicate on the "published_at" field. It's identical to PublishedAtEQ.
func PublishedAtEQ ¶
PublishedAtEQ applies the EQ predicate on the "published_at" field.
func PublishedAtGT ¶
PublishedAtGT applies the GT predicate on the "published_at" field.
func PublishedAtGTE ¶
PublishedAtGTE applies the GTE predicate on the "published_at" field.
func PublishedAtIn ¶
PublishedAtIn applies the In predicate on the "published_at" field.
func PublishedAtIsNil ¶
PublishedAtIsNil applies the IsNil predicate on the "published_at" field.
func PublishedAtLT ¶
PublishedAtLT applies the LT predicate on the "published_at" field.
func PublishedAtLTE ¶
PublishedAtLTE applies the LTE predicate on the "published_at" field.
func PublishedAtNEQ ¶
PublishedAtNEQ applies the NEQ predicate on the "published_at" field.
func PublishedAtNotIn ¶
PublishedAtNotIn applies the NotIn predicate on the "published_at" field.
func PublishedAtNotNil ¶
PublishedAtNotNil applies the NotNil predicate on the "published_at" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
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 TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
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).
Types ¶
type Location ¶
type Location string
Location defines the type for the "location" enum field.
func (Location) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Location) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type OrderOption ¶
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.
func (Status) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Status) UnmarshalGQL ¶
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 ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Type) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.