file

package
v0.0.0-...-eeb60d1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the file type in the database.
	Label = "file"
	// 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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldUUID holds the string denoting the uuid field in the database.
	FieldUUID = "uuid"
	// FieldSize holds the string denoting the size field in the database.
	FieldSize = "size"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// 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"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeFiletype holds the string denoting the filetype edge name in mutations.
	EdgeFiletype = "filetype"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// FiletypeFieldID holds the string denoting the ID field of the Filetype.
	FiletypeFieldID = "type"
	// TagFieldID holds the string denoting the ID field of the Tag.
	TagFieldID = "name"
	// Table holds the table name of the file in the database.
	Table = "files"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "files"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
	// FiletypeTable is the table that holds the filetype relation/edge.
	FiletypeTable = "files"
	// FiletypeInverseTable is the table name for the Filetype entity.
	// It exists in this package in order to avoid circular dependency with the "filetype" package.
	FiletypeInverseTable = "filetypes"
	// FiletypeColumn is the table column denoting the filetype relation/edge.
	FiletypeColumn = "type"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "file_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// UUIDValidator is a validator for the "uuid" field. It is called by the builders before save.
	UUIDValidator func(string) error
	// TypeValidator is a validator for the "type" field. It is called by the builders before save.
	TypeValidator func(string) error
	// 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
	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
	DefaultDeletedAt func() time.Time
)

Columns holds all SQL columns for file fields.

View Source
var (
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"file_id", "tag_id"}
)

Functions

func And

func And(predicates ...predicate.File) predicate.File

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.File

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.File

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.File

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.File

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

func CreatedAtIn

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

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

func CreatedAtIsNil

func CreatedAtIsNil() predicate.File

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.File

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.File

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.File

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

func CreatedAtNotIn

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

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

func CreatedAtNotNil

func CreatedAtNotNil() predicate.File

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

func DeletedAt

func DeletedAt(v time.Time) predicate.File

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.File

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.File

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.File

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.File

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.File

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.File

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.File

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.File

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

func HasFiletype

func HasFiletype() predicate.File

HasFiletype applies the HasEdge predicate on the "filetype" edge.

func HasFiletypeWith

func HasFiletypeWith(preds ...predicate.Filetype) predicate.File

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

func HasTags

func HasTags() predicate.File

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.File

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

func HasUser

func HasUser() predicate.File

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.File

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

func ID

func ID(id int) predicate.File

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.File

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

func NameContains

func NameContains(v string) predicate.File

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

func NameContainsFold

func NameContainsFold(v string) predicate.File

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

func NameEQ

func NameEQ(v string) predicate.File

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

func NameEqualFold

func NameEqualFold(v string) predicate.File

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

func NameGT

func NameGT(v string) predicate.File

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

func NameGTE

func NameGTE(v string) predicate.File

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.File

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.File

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.File

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

func NameLTE

func NameLTE(v string) predicate.File

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

func NameNEQ

func NameNEQ(v string) predicate.File

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func Size

func Size(v int) predicate.File

Size applies equality check predicate on the "size" field. It's identical to SizeEQ.

func SizeEQ

func SizeEQ(v int) predicate.File

SizeEQ applies the EQ predicate on the "size" field.

func SizeGT

func SizeGT(v int) predicate.File

SizeGT applies the GT predicate on the "size" field.

func SizeGTE

func SizeGTE(v int) predicate.File

SizeGTE applies the GTE predicate on the "size" field.

func SizeIn

func SizeIn(vs ...int) predicate.File

SizeIn applies the In predicate on the "size" field.

func SizeLT

func SizeLT(v int) predicate.File

SizeLT applies the LT predicate on the "size" field.

func SizeLTE

func SizeLTE(v int) predicate.File

SizeLTE applies the LTE predicate on the "size" field.

func SizeNEQ

func SizeNEQ(v int) predicate.File

SizeNEQ applies the NEQ predicate on the "size" field.

func SizeNotIn

func SizeNotIn(vs ...int) predicate.File

SizeNotIn applies the NotIn predicate on the "size" field.

func Type

func Type(v string) predicate.File

Type applies equality check predicate on the "type" field. It's identical to TypeEQ.

func TypeContains

func TypeContains(v string) predicate.File

TypeContains applies the Contains predicate on the "type" field.

func TypeContainsFold

func TypeContainsFold(v string) predicate.File

TypeContainsFold applies the ContainsFold predicate on the "type" field.

func TypeEQ

func TypeEQ(v string) predicate.File

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

func TypeEqualFold

func TypeEqualFold(v string) predicate.File

TypeEqualFold applies the EqualFold predicate on the "type" field.

func TypeGT

func TypeGT(v string) predicate.File

TypeGT applies the GT predicate on the "type" field.

func TypeGTE

func TypeGTE(v string) predicate.File

TypeGTE applies the GTE predicate on the "type" field.

func TypeHasPrefix

func TypeHasPrefix(v string) predicate.File

TypeHasPrefix applies the HasPrefix predicate on the "type" field.

func TypeHasSuffix

func TypeHasSuffix(v string) predicate.File

TypeHasSuffix applies the HasSuffix predicate on the "type" field.

func TypeIn

func TypeIn(vs ...string) predicate.File

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

func TypeLT

func TypeLT(v string) predicate.File

TypeLT applies the LT predicate on the "type" field.

func TypeLTE

func TypeLTE(v string) predicate.File

TypeLTE applies the LTE predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v string) predicate.File

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

func TypeNotIn

func TypeNotIn(vs ...string) predicate.File

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

func UUID

func UUID(v string) predicate.File

UUID applies equality check predicate on the "uuid" field. It's identical to UUIDEQ.

func UUIDContains

func UUIDContains(v string) predicate.File

UUIDContains applies the Contains predicate on the "uuid" field.

func UUIDContainsFold

func UUIDContainsFold(v string) predicate.File

UUIDContainsFold applies the ContainsFold predicate on the "uuid" field.

func UUIDEQ

func UUIDEQ(v string) predicate.File

UUIDEQ applies the EQ predicate on the "uuid" field.

func UUIDEqualFold

func UUIDEqualFold(v string) predicate.File

UUIDEqualFold applies the EqualFold predicate on the "uuid" field.

func UUIDGT

func UUIDGT(v string) predicate.File

UUIDGT applies the GT predicate on the "uuid" field.

func UUIDGTE

func UUIDGTE(v string) predicate.File

UUIDGTE applies the GTE predicate on the "uuid" field.

func UUIDHasPrefix

func UUIDHasPrefix(v string) predicate.File

UUIDHasPrefix applies the HasPrefix predicate on the "uuid" field.

func UUIDHasSuffix

func UUIDHasSuffix(v string) predicate.File

UUIDHasSuffix applies the HasSuffix predicate on the "uuid" field.

func UUIDIn

func UUIDIn(vs ...string) predicate.File

UUIDIn applies the In predicate on the "uuid" field.

func UUIDLT

func UUIDLT(v string) predicate.File

UUIDLT applies the LT predicate on the "uuid" field.

func UUIDLTE

func UUIDLTE(v string) predicate.File

UUIDLTE applies the LTE predicate on the "uuid" field.

func UUIDNEQ

func UUIDNEQ(v string) predicate.File

UUIDNEQ applies the NEQ predicate on the "uuid" field.

func UUIDNotIn

func UUIDNotIn(vs ...string) predicate.File

UUIDNotIn applies the NotIn predicate on the "uuid" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.File

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.File

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.File

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.File

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.File

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.File

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.File

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

func UpdatedAtNotIn

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

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

func UserID

func UserID(v int) predicate.File

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.File

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.File

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.File

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.File

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the File queries.

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 ByFiletypeField

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

ByFiletypeField orders the results by filetype field.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func BySize

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

BySize orders the results by the size field.

func ByTags

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

ByTags orders the results by tags terms.

func ByTagsCount

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

ByTagsCount orders the results by tags count.

func ByType

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

ByType orders the results by the type field.

func ByUUID

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

ByUUID orders the results by the uuid field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUserField

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

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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