widget

package
v0.0.0-...-f92f37c Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the widget type in the database.
	Label = "widget"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldNote holds the string denoting the note field in the database.
	FieldNote = "note"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldPriority holds the string denoting the priority field in the database.
	FieldPriority = "priority"
	// EdgeType holds the string denoting the type edge name in mutations.
	EdgeType = "type"
	// Table holds the table name of the widget in the database.
	Table = "widgets"
	// TypeTable is the table that holds the type relation/edge.
	TypeTable = "widgets"
	// TypeInverseTable is the table name for the WidgetType entity.
	// It exists in this package in order to avoid circular dependency with the "widgettype" package.
	TypeInverseTable = "widget_types"
	// TypeColumn is the table column denoting the type relation/edge.
	TypeColumn = "widget_type"
)
View Source
const DefaultStatus = StatusDraft

StatusDraft is the default value of the Status enum.

Variables

View Source
var (
	// NoteValidator is a validator for the "note" field. It is called by the builders before save.
	NoteValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultPriority holds the default value on creation for the "priority" field.
	DefaultPriority int
)

Columns holds all SQL columns for widget fields.

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

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

Functions

func And

func And(predicates ...predicate.Widget) predicate.Widget

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Widget

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Widget

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Widget

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Widget

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Widget

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Widget

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Widget

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

func CreatedAtNotIn

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

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

func HasType

func HasType() predicate.Widget

HasType applies the HasEdge predicate on the "type" edge.

func HasTypeWith

func HasTypeWith(preds ...predicate.WidgetType) predicate.Widget

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

func ID

func ID(id int) predicate.Widget

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Widget

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Widget

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Widget

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Widget

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Widget

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Widget

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Widget

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Widget

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Note

func Note(v string) predicate.Widget

Note applies equality check predicate on the "note" field. It's identical to NoteEQ.

func NoteContains

func NoteContains(v string) predicate.Widget

NoteContains applies the Contains predicate on the "note" field.

func NoteContainsFold

func NoteContainsFold(v string) predicate.Widget

NoteContainsFold applies the ContainsFold predicate on the "note" field.

func NoteEQ

func NoteEQ(v string) predicate.Widget

NoteEQ applies the EQ predicate on the "note" field.

func NoteEqualFold

func NoteEqualFold(v string) predicate.Widget

NoteEqualFold applies the EqualFold predicate on the "note" field.

func NoteGT

func NoteGT(v string) predicate.Widget

NoteGT applies the GT predicate on the "note" field.

func NoteGTE

func NoteGTE(v string) predicate.Widget

NoteGTE applies the GTE predicate on the "note" field.

func NoteHasPrefix

func NoteHasPrefix(v string) predicate.Widget

NoteHasPrefix applies the HasPrefix predicate on the "note" field.

func NoteHasSuffix

func NoteHasSuffix(v string) predicate.Widget

NoteHasSuffix applies the HasSuffix predicate on the "note" field.

func NoteIn

func NoteIn(vs ...string) predicate.Widget

NoteIn applies the In predicate on the "note" field.

func NoteLT

func NoteLT(v string) predicate.Widget

NoteLT applies the LT predicate on the "note" field.

func NoteLTE

func NoteLTE(v string) predicate.Widget

NoteLTE applies the LTE predicate on the "note" field.

func NoteNEQ

func NoteNEQ(v string) predicate.Widget

NoteNEQ applies the NEQ predicate on the "note" field.

func NoteNotIn

func NoteNotIn(vs ...string) predicate.Widget

NoteNotIn applies the NotIn predicate on the "note" field.

func Or

func Or(predicates ...predicate.Widget) predicate.Widget

Or groups predicates with the OR operator between them.

func Priority

func Priority(v int) predicate.Widget

Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.

func PriorityEQ

func PriorityEQ(v int) predicate.Widget

PriorityEQ applies the EQ predicate on the "priority" field.

func PriorityGT

func PriorityGT(v int) predicate.Widget

PriorityGT applies the GT predicate on the "priority" field.

func PriorityGTE

func PriorityGTE(v int) predicate.Widget

PriorityGTE applies the GTE predicate on the "priority" field.

func PriorityIn

func PriorityIn(vs ...int) predicate.Widget

PriorityIn applies the In predicate on the "priority" field.

func PriorityLT

func PriorityLT(v int) predicate.Widget

PriorityLT applies the LT predicate on the "priority" field.

func PriorityLTE

func PriorityLTE(v int) predicate.Widget

PriorityLTE applies the LTE predicate on the "priority" field.

func PriorityNEQ

func PriorityNEQ(v int) predicate.Widget

PriorityNEQ applies the NEQ predicate on the "priority" field.

func PriorityNotIn

func PriorityNotIn(vs ...int) predicate.Widget

PriorityNotIn applies the NotIn predicate on the "priority" field.

func StatusEQ

func StatusEQ(v Status) predicate.Widget

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Widget

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

func StatusNotIn

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

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 ValidColumn

func ValidColumn(column string) bool

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

Types

type Status

type Status string

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

const (
	StatusDraft     Status = "draft"
	StatusCompleted Status = "completed"
)

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