image

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the image type in the database.
	Label = "image"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeFile holds the string denoting the file edge name in mutations.
	EdgeFile = "file"
	// Table holds the table name of the image in the database.
	Table = "images"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "images"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_image"
	// FileTable is the table that holds the file relation/edge.
	FileTable = "images"
	// FileInverseTable is the table name for the File entity.
	// It exists in this package in order to avoid circular dependency with the "file" package.
	FileInverseTable = "files"
	// FileColumn is the table column denoting the file relation/edge.
	FileColumn = "file_image"
)

Variables

View Source
var (
	// 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
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Columns holds all SQL columns for image fields.

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

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

Functions

func And

func And(predicates ...predicate.Image) predicate.Image

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Image

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Image

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Image

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Image

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Image

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Image

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Image

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

func CreatedAtNotIn

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

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

func Description

func Description(v string) predicate.Image

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Image

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Image

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Image

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Image

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Image

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Image

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Image

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Image

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Image

DescriptionIn applies the In predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Image

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Image

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Image

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Image

DescriptionNotIn applies the NotIn predicate on the "description" field.

func HasFile

func HasFile() predicate.Image

HasFile applies the HasEdge predicate on the "file" edge.

func HasFileWith

func HasFileWith(preds ...predicate.File) predicate.Image

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

func HasOwner

func HasOwner() predicate.Image

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Image

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id model.InternalID) predicate.Image

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...model.InternalID) predicate.Image

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id model.InternalID) predicate.Image

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id model.InternalID) predicate.Image

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...model.InternalID) predicate.Image

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Image

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Image

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Image

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Image

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Image

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Image

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Image

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Image

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Image

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Image

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Image

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Image

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Image

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Image

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Image) predicate.Image

Or groups predicates with the OR operator between them.

func StatusEQ added in v0.1.4

func StatusEQ(v Status) predicate.Image

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

func StatusIn added in v0.1.4

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

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

func StatusNEQ added in v0.1.4

func StatusNEQ(v Status) predicate.Image

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

func StatusNotIn added in v0.1.4

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

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator added in v0.1.4

func StatusValidator(s Status) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Image

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Image

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Image

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Image

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Image

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Image

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Image

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

func UpdatedAtNotIn

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

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 OrderOption added in v0.1.4

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Image queries.

func ByCreatedAt added in v0.1.4

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

ByCreatedAt orders the results by the created_at field.

func ByDescription added in v0.1.4

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

ByDescription orders the results by the description field.

func ByFileField added in v0.1.4

func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption

ByFileField orders the results by file field.

func ByID added in v0.1.4

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

ByID orders the results by the id field.

func ByName added in v0.1.4

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

ByName orders the results by the name field.

func ByOwnerField added in v0.1.4

func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption

ByOwnerField orders the results by owner field.

func ByStatus added in v0.1.4

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

ByStatus orders the results by the status field.

func ByUpdatedAt added in v0.1.4

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

ByUpdatedAt orders the results by the updated_at field.

type Status added in v0.1.4

type Status string

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

const (
	StatusUploaded Status = "uploaded"
	StatusScanned  Status = "scanned"
)

Status values.

func (Status) String added in v0.1.4

func (s Status) String() string

Jump to

Keyboard shortcuts

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