file

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 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"
	// FieldFolderID holds the string denoting the folder_id field in the database.
	FieldFolderID = "folder_id"
	// FieldMd5 holds the string denoting the md5 field in the database.
	FieldMd5 = "md5"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldSize holds the string denoting the size field in the database.
	FieldSize = "size"
	// FieldContentType holds the string denoting the content_type field in the database.
	FieldContentType = "content_type"
	// FieldDownloads holds the string denoting the downloads field in the database.
	FieldDownloads = "downloads"
	// 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"
	// EdgeFolder holds the string denoting the folder edge name in mutations.
	EdgeFolder = "folder"
	// Table holds the table name of the file in the database.
	Table = "files"
	// FolderTable is the table that holds the folder relation/edge.
	FolderTable = "files"
	// FolderInverseTable is the table name for the Folder entity.
	// It exists in this package in order to avoid circular dependency with the "folder" package.
	FolderInverseTable = "folders"
	// FolderColumn is the table column denoting the folder relation/edge.
	FolderColumn = "folder_id"
)

Variables

View Source
var (
	// DefaultDownloads holds the default value on creation for the "downloads" field.
	DefaultDownloads int64
	// 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() string
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for file fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func ContentType

func ContentType(v string) predicate.File

ContentType applies equality check predicate on the "content_type" field. It's identical to ContentTypeEQ.

func ContentTypeContains

func ContentTypeContains(v string) predicate.File

ContentTypeContains applies the Contains predicate on the "content_type" field.

func ContentTypeContainsFold

func ContentTypeContainsFold(v string) predicate.File

ContentTypeContainsFold applies the ContainsFold predicate on the "content_type" field.

func ContentTypeEQ

func ContentTypeEQ(v string) predicate.File

ContentTypeEQ applies the EQ predicate on the "content_type" field.

func ContentTypeEqualFold

func ContentTypeEqualFold(v string) predicate.File

ContentTypeEqualFold applies the EqualFold predicate on the "content_type" field.

func ContentTypeGT

func ContentTypeGT(v string) predicate.File

ContentTypeGT applies the GT predicate on the "content_type" field.

func ContentTypeGTE

func ContentTypeGTE(v string) predicate.File

ContentTypeGTE applies the GTE predicate on the "content_type" field.

func ContentTypeHasPrefix

func ContentTypeHasPrefix(v string) predicate.File

ContentTypeHasPrefix applies the HasPrefix predicate on the "content_type" field.

func ContentTypeHasSuffix

func ContentTypeHasSuffix(v string) predicate.File

ContentTypeHasSuffix applies the HasSuffix predicate on the "content_type" field.

func ContentTypeIn

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

ContentTypeIn applies the In predicate on the "content_type" field.

func ContentTypeLT

func ContentTypeLT(v string) predicate.File

ContentTypeLT applies the LT predicate on the "content_type" field.

func ContentTypeLTE

func ContentTypeLTE(v string) predicate.File

ContentTypeLTE applies the LTE predicate on the "content_type" field.

func ContentTypeNEQ

func ContentTypeNEQ(v string) predicate.File

ContentTypeNEQ applies the NEQ predicate on the "content_type" field.

func ContentTypeNotIn

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

ContentTypeNotIn applies the NotIn predicate on the "content_type" field.

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 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 Downloads

func Downloads(v int64) predicate.File

Downloads applies equality check predicate on the "downloads" field. It's identical to DownloadsEQ.

func DownloadsEQ

func DownloadsEQ(v int64) predicate.File

DownloadsEQ applies the EQ predicate on the "downloads" field.

func DownloadsGT

func DownloadsGT(v int64) predicate.File

DownloadsGT applies the GT predicate on the "downloads" field.

func DownloadsGTE

func DownloadsGTE(v int64) predicate.File

DownloadsGTE applies the GTE predicate on the "downloads" field.

func DownloadsIn

func DownloadsIn(vs ...int64) predicate.File

DownloadsIn applies the In predicate on the "downloads" field.

func DownloadsLT

func DownloadsLT(v int64) predicate.File

DownloadsLT applies the LT predicate on the "downloads" field.

func DownloadsLTE

func DownloadsLTE(v int64) predicate.File

DownloadsLTE applies the LTE predicate on the "downloads" field.

func DownloadsNEQ

func DownloadsNEQ(v int64) predicate.File

DownloadsNEQ applies the NEQ predicate on the "downloads" field.

func DownloadsNotIn

func DownloadsNotIn(vs ...int64) predicate.File

DownloadsNotIn applies the NotIn predicate on the "downloads" field.

func FolderID

func FolderID(v string) predicate.File

FolderID applies equality check predicate on the "folder_id" field. It's identical to FolderIDEQ.

func FolderIDContains

func FolderIDContains(v string) predicate.File

FolderIDContains applies the Contains predicate on the "folder_id" field.

func FolderIDContainsFold

func FolderIDContainsFold(v string) predicate.File

FolderIDContainsFold applies the ContainsFold predicate on the "folder_id" field.

func FolderIDEQ

func FolderIDEQ(v string) predicate.File

FolderIDEQ applies the EQ predicate on the "folder_id" field.

func FolderIDEqualFold

func FolderIDEqualFold(v string) predicate.File

FolderIDEqualFold applies the EqualFold predicate on the "folder_id" field.

func FolderIDGT

func FolderIDGT(v string) predicate.File

FolderIDGT applies the GT predicate on the "folder_id" field.

func FolderIDGTE

func FolderIDGTE(v string) predicate.File

FolderIDGTE applies the GTE predicate on the "folder_id" field.

func FolderIDHasPrefix

func FolderIDHasPrefix(v string) predicate.File

FolderIDHasPrefix applies the HasPrefix predicate on the "folder_id" field.

func FolderIDHasSuffix

func FolderIDHasSuffix(v string) predicate.File

FolderIDHasSuffix applies the HasSuffix predicate on the "folder_id" field.

func FolderIDIn

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

FolderIDIn applies the In predicate on the "folder_id" field.

func FolderIDLT

func FolderIDLT(v string) predicate.File

FolderIDLT applies the LT predicate on the "folder_id" field.

func FolderIDLTE

func FolderIDLTE(v string) predicate.File

FolderIDLTE applies the LTE predicate on the "folder_id" field.

func FolderIDNEQ

func FolderIDNEQ(v string) predicate.File

FolderIDNEQ applies the NEQ predicate on the "folder_id" field.

func FolderIDNotIn

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

FolderIDNotIn applies the NotIn predicate on the "folder_id" field.

func HasFolder

func HasFolder() predicate.File

HasFolder applies the HasEdge predicate on the "folder" edge.

func HasFolderWith

func HasFolderWith(preds ...predicate.Folder) predicate.File

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

func ID

func ID(id string) predicate.File

ID filters vertices based on their ID field.

func IDContainsFold added in v1.1.1

func IDContainsFold(id string) predicate.File

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold added in v1.1.1

func IDEqualFold(id string) predicate.File

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Md5

func Md5(v string) predicate.File

Md5 applies equality check predicate on the "md5" field. It's identical to Md5EQ.

func Md5Contains

func Md5Contains(v string) predicate.File

Md5Contains applies the Contains predicate on the "md5" field.

func Md5ContainsFold

func Md5ContainsFold(v string) predicate.File

Md5ContainsFold applies the ContainsFold predicate on the "md5" field.

func Md5EQ

func Md5EQ(v string) predicate.File

Md5EQ applies the EQ predicate on the "md5" field.

func Md5EqualFold

func Md5EqualFold(v string) predicate.File

Md5EqualFold applies the EqualFold predicate on the "md5" field.

func Md5GT

func Md5GT(v string) predicate.File

Md5GT applies the GT predicate on the "md5" field.

func Md5GTE

func Md5GTE(v string) predicate.File

Md5GTE applies the GTE predicate on the "md5" field.

func Md5HasPrefix

func Md5HasPrefix(v string) predicate.File

Md5HasPrefix applies the HasPrefix predicate on the "md5" field.

func Md5HasSuffix

func Md5HasSuffix(v string) predicate.File

Md5HasSuffix applies the HasSuffix predicate on the "md5" field.

func Md5In

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

Md5In applies the In predicate on the "md5" field.

func Md5LT

func Md5LT(v string) predicate.File

Md5LT applies the LT predicate on the "md5" field.

func Md5LTE

func Md5LTE(v string) predicate.File

Md5LTE applies the LTE predicate on the "md5" field.

func Md5NEQ

func Md5NEQ(v string) predicate.File

Md5NEQ applies the NEQ predicate on the "md5" field.

func Md5NotIn

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

Md5NotIn applies the NotIn predicate on the "md5" 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 int64) predicate.File

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

func SizeEQ

func SizeEQ(v int64) predicate.File

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

func SizeGT

func SizeGT(v int64) predicate.File

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

func SizeGTE

func SizeGTE(v int64) predicate.File

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

func SizeIn

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

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

func SizeLT

func SizeLT(v int64) predicate.File

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

func SizeLTE

func SizeLTE(v int64) predicate.File

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

func SizeNEQ

func SizeNEQ(v int64) predicate.File

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

func SizeNotIn

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

SizeNotIn applies the NotIn predicate on the "size" 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 ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption added in v1.1.1

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the File queries.

func ByContentType added in v1.1.1

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

ByContentType orders the results by the content_type field.

func ByCreatedAt added in v1.1.1

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

ByCreatedAt orders the results by the created_at field.

func ByDownloads added in v1.1.1

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

ByDownloads orders the results by the downloads field.

func ByFolderField added in v1.1.1

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

ByFolderField orders the results by folder field.

func ByFolderID added in v1.1.1

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

ByFolderID orders the results by the folder_id field.

func ByID added in v1.1.1

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

ByID orders the results by the id field.

func ByMd5 added in v1.1.1

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

ByMd5 orders the results by the md5 field.

func ByName added in v1.1.1

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

ByName orders the results by the name field.

func BySize added in v1.1.1

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

BySize orders the results by the size field.

func ByUpdatedAt added in v1.1.1

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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