file

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 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"
	// 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"
	// FieldSha256 holds the string denoting the sha256 field in the database.
	FieldSha256 = "sha256"
	// 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"
	// EdgeImage holds the string denoting the image edge name in mutations.
	EdgeImage = "image"
	// Table holds the table name of the file in the database.
	Table = "files"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "files"
	// 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_file"
	// ImageTable is the table that holds the image relation/edge.
	ImageTable = "images"
	// ImageInverseTable is the table name for the Image entity.
	// It exists in this package in order to avoid circular dependency with the "image" package.
	ImageInverseTable = "images"
	// ImageColumn is the table column denoting the image relation/edge.
	ImageColumn = "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 file fields.

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

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

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

func HasImage() predicate.File

HasImage applies the HasEdge predicate on the "image" edge.

func HasImageWith

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

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

func HasOwner

func HasOwner() predicate.File

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

func HasOwnerWith

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

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

func IDEQ(id model.InternalID) predicate.File

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id model.InternalID) predicate.File

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id model.InternalID) predicate.File

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id model.InternalID) predicate.File

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id model.InternalID) predicate.File

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id model.InternalID) predicate.File

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...model.InternalID) 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 Sha256

func Sha256(v []byte) predicate.File

Sha256 applies equality check predicate on the "sha256" field. It's identical to Sha256EQ.

func Sha256EQ

func Sha256EQ(v []byte) predicate.File

Sha256EQ applies the EQ predicate on the "sha256" field.

func Sha256GT

func Sha256GT(v []byte) predicate.File

Sha256GT applies the GT predicate on the "sha256" field.

func Sha256GTE

func Sha256GTE(v []byte) predicate.File

Sha256GTE applies the GTE predicate on the "sha256" field.

func Sha256In

func Sha256In(vs ...[]byte) predicate.File

Sha256In applies the In predicate on the "sha256" field.

func Sha256LT

func Sha256LT(v []byte) predicate.File

Sha256LT applies the LT predicate on the "sha256" field.

func Sha256LTE

func Sha256LTE(v []byte) predicate.File

Sha256LTE applies the LTE predicate on the "sha256" field.

func Sha256NEQ

func Sha256NEQ(v []byte) predicate.File

Sha256NEQ applies the NEQ predicate on the "sha256" field.

func Sha256NotIn

func Sha256NotIn(vs ...[]byte) predicate.File

Sha256NotIn applies the NotIn predicate on the "sha256" field.

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 TypeEQ

func TypeEQ(v Type) predicate.File

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

func TypeIn

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

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

func TypeNEQ

func TypeNEQ(v Type) predicate.File

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

func TypeNotIn

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

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

func TypeValidator

func TypeValidator(_type Type) error

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

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 v0.1.4

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the File queries.

func ByCreatedAt added in v0.1.4

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

ByCreatedAt orders the results by the created_at field.

func ByID added in v0.1.4

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

ByID orders the results by the id field.

func ByImageField added in v0.1.4

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

ByImageField orders the results by image 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 BySize added in v0.1.4

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

BySize orders the results by the size field.

func ByType added in v0.1.4

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

ByType orders the results by the type field.

func ByUpdatedAt added in v0.1.4

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

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeGeburaSave  Type = "gebura_save"
	TypeChesedImage Type = "chesed_image"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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