attachment

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the attachment type in the database.
	Label = "attachment"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldFilename holds the string denoting the filename field in the database.
	FieldFilename = "filename"
	// FieldMimeType holds the string denoting the mime_type field in the database.
	FieldMimeType = "mime_type"
	// FieldSizeBytes holds the string denoting the size_bytes field in the database.
	FieldSizeBytes = "size_bytes"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldThumbnailPath holds the string denoting the thumbnail_path field in the database.
	FieldThumbnailPath = "thumbnail_path"
	// EdgeMessage holds the string denoting the message edge name in mutations.
	EdgeMessage = "message"
	// Table holds the table name of the attachment in the database.
	Table = "attachments"
	// MessageTable is the table that holds the message relation/edge.
	MessageTable = "attachments"
	// MessageInverseTable is the table name for the Message entity.
	// It exists in this package in order to avoid circular dependency with the "message" package.
	MessageInverseTable = "messages"
	// MessageColumn is the table column denoting the message relation/edge.
	MessageColumn = "message_attachments"
)

Variables

View Source
var (
	// FilenameValidator is a validator for the "filename" field. It is called by the builders before save.
	FilenameValidator func(string) error
	// MimeTypeValidator is a validator for the "mime_type" field. It is called by the builders before save.
	MimeTypeValidator func(string) error
	// SizeBytesValidator is a validator for the "size_bytes" field. It is called by the builders before save.
	SizeBytesValidator func(int64) error
	// PathValidator is a validator for the "path" field. It is called by the builders before save.
	PathValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for attachment fields.

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

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

Functions

func And

func And(predicates ...predicate.Attachment) predicate.Attachment

And groups predicates with the AND operator between them.

func Filename

func Filename(v string) predicate.Attachment

Filename applies equality check predicate on the "filename" field. It's identical to FilenameEQ.

func FilenameContains

func FilenameContains(v string) predicate.Attachment

FilenameContains applies the Contains predicate on the "filename" field.

func FilenameContainsFold

func FilenameContainsFold(v string) predicate.Attachment

FilenameContainsFold applies the ContainsFold predicate on the "filename" field.

func FilenameEQ

func FilenameEQ(v string) predicate.Attachment

FilenameEQ applies the EQ predicate on the "filename" field.

func FilenameEqualFold

func FilenameEqualFold(v string) predicate.Attachment

FilenameEqualFold applies the EqualFold predicate on the "filename" field.

func FilenameGT

func FilenameGT(v string) predicate.Attachment

FilenameGT applies the GT predicate on the "filename" field.

func FilenameGTE

func FilenameGTE(v string) predicate.Attachment

FilenameGTE applies the GTE predicate on the "filename" field.

func FilenameHasPrefix

func FilenameHasPrefix(v string) predicate.Attachment

FilenameHasPrefix applies the HasPrefix predicate on the "filename" field.

func FilenameHasSuffix

func FilenameHasSuffix(v string) predicate.Attachment

FilenameHasSuffix applies the HasSuffix predicate on the "filename" field.

func FilenameIn

func FilenameIn(vs ...string) predicate.Attachment

FilenameIn applies the In predicate on the "filename" field.

func FilenameLT

func FilenameLT(v string) predicate.Attachment

FilenameLT applies the LT predicate on the "filename" field.

func FilenameLTE

func FilenameLTE(v string) predicate.Attachment

FilenameLTE applies the LTE predicate on the "filename" field.

func FilenameNEQ

func FilenameNEQ(v string) predicate.Attachment

FilenameNEQ applies the NEQ predicate on the "filename" field.

func FilenameNotIn

func FilenameNotIn(vs ...string) predicate.Attachment

FilenameNotIn applies the NotIn predicate on the "filename" field.

func HasMessage

func HasMessage() predicate.Attachment

HasMessage applies the HasEdge predicate on the "message" edge.

func HasMessageWith

func HasMessageWith(preds ...predicate.Message) predicate.Attachment

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Attachment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Attachment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Attachment

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Attachment

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Attachment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Attachment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Attachment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Attachment

IDNotIn applies the NotIn predicate on the ID field.

func MimeType

func MimeType(v string) predicate.Attachment

MimeType applies equality check predicate on the "mime_type" field. It's identical to MimeTypeEQ.

func MimeTypeContains

func MimeTypeContains(v string) predicate.Attachment

MimeTypeContains applies the Contains predicate on the "mime_type" field.

func MimeTypeContainsFold

func MimeTypeContainsFold(v string) predicate.Attachment

MimeTypeContainsFold applies the ContainsFold predicate on the "mime_type" field.

func MimeTypeEQ

func MimeTypeEQ(v string) predicate.Attachment

MimeTypeEQ applies the EQ predicate on the "mime_type" field.

func MimeTypeEqualFold

func MimeTypeEqualFold(v string) predicate.Attachment

MimeTypeEqualFold applies the EqualFold predicate on the "mime_type" field.

func MimeTypeGT

func MimeTypeGT(v string) predicate.Attachment

MimeTypeGT applies the GT predicate on the "mime_type" field.

func MimeTypeGTE

func MimeTypeGTE(v string) predicate.Attachment

MimeTypeGTE applies the GTE predicate on the "mime_type" field.

func MimeTypeHasPrefix

func MimeTypeHasPrefix(v string) predicate.Attachment

MimeTypeHasPrefix applies the HasPrefix predicate on the "mime_type" field.

func MimeTypeHasSuffix

func MimeTypeHasSuffix(v string) predicate.Attachment

MimeTypeHasSuffix applies the HasSuffix predicate on the "mime_type" field.

func MimeTypeIn

func MimeTypeIn(vs ...string) predicate.Attachment

MimeTypeIn applies the In predicate on the "mime_type" field.

func MimeTypeLT

func MimeTypeLT(v string) predicate.Attachment

MimeTypeLT applies the LT predicate on the "mime_type" field.

func MimeTypeLTE

func MimeTypeLTE(v string) predicate.Attachment

MimeTypeLTE applies the LTE predicate on the "mime_type" field.

func MimeTypeNEQ

func MimeTypeNEQ(v string) predicate.Attachment

MimeTypeNEQ applies the NEQ predicate on the "mime_type" field.

func MimeTypeNotIn

func MimeTypeNotIn(vs ...string) predicate.Attachment

MimeTypeNotIn applies the NotIn predicate on the "mime_type" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Attachment) predicate.Attachment

Or groups predicates with the OR operator between them.

func Path

func Path(v string) predicate.Attachment

Path applies equality check predicate on the "path" field. It's identical to PathEQ.

func PathContains

func PathContains(v string) predicate.Attachment

PathContains applies the Contains predicate on the "path" field.

func PathContainsFold

func PathContainsFold(v string) predicate.Attachment

PathContainsFold applies the ContainsFold predicate on the "path" field.

func PathEQ

func PathEQ(v string) predicate.Attachment

PathEQ applies the EQ predicate on the "path" field.

func PathEqualFold

func PathEqualFold(v string) predicate.Attachment

PathEqualFold applies the EqualFold predicate on the "path" field.

func PathGT

func PathGT(v string) predicate.Attachment

PathGT applies the GT predicate on the "path" field.

func PathGTE

func PathGTE(v string) predicate.Attachment

PathGTE applies the GTE predicate on the "path" field.

func PathHasPrefix

func PathHasPrefix(v string) predicate.Attachment

PathHasPrefix applies the HasPrefix predicate on the "path" field.

func PathHasSuffix

func PathHasSuffix(v string) predicate.Attachment

PathHasSuffix applies the HasSuffix predicate on the "path" field.

func PathIn

func PathIn(vs ...string) predicate.Attachment

PathIn applies the In predicate on the "path" field.

func PathLT

func PathLT(v string) predicate.Attachment

PathLT applies the LT predicate on the "path" field.

func PathLTE

func PathLTE(v string) predicate.Attachment

PathLTE applies the LTE predicate on the "path" field.

func PathNEQ

func PathNEQ(v string) predicate.Attachment

PathNEQ applies the NEQ predicate on the "path" field.

func PathNotIn

func PathNotIn(vs ...string) predicate.Attachment

PathNotIn applies the NotIn predicate on the "path" field.

func SizeBytes

func SizeBytes(v int64) predicate.Attachment

SizeBytes applies equality check predicate on the "size_bytes" field. It's identical to SizeBytesEQ.

func SizeBytesEQ

func SizeBytesEQ(v int64) predicate.Attachment

SizeBytesEQ applies the EQ predicate on the "size_bytes" field.

func SizeBytesGT

func SizeBytesGT(v int64) predicate.Attachment

SizeBytesGT applies the GT predicate on the "size_bytes" field.

func SizeBytesGTE

func SizeBytesGTE(v int64) predicate.Attachment

SizeBytesGTE applies the GTE predicate on the "size_bytes" field.

func SizeBytesIn

func SizeBytesIn(vs ...int64) predicate.Attachment

SizeBytesIn applies the In predicate on the "size_bytes" field.

func SizeBytesLT

func SizeBytesLT(v int64) predicate.Attachment

SizeBytesLT applies the LT predicate on the "size_bytes" field.

func SizeBytesLTE

func SizeBytesLTE(v int64) predicate.Attachment

SizeBytesLTE applies the LTE predicate on the "size_bytes" field.

func SizeBytesNEQ

func SizeBytesNEQ(v int64) predicate.Attachment

SizeBytesNEQ applies the NEQ predicate on the "size_bytes" field.

func SizeBytesNotIn

func SizeBytesNotIn(vs ...int64) predicate.Attachment

SizeBytesNotIn applies the NotIn predicate on the "size_bytes" field.

func ThumbnailPath

func ThumbnailPath(v string) predicate.Attachment

ThumbnailPath applies equality check predicate on the "thumbnail_path" field. It's identical to ThumbnailPathEQ.

func ThumbnailPathContains

func ThumbnailPathContains(v string) predicate.Attachment

ThumbnailPathContains applies the Contains predicate on the "thumbnail_path" field.

func ThumbnailPathContainsFold

func ThumbnailPathContainsFold(v string) predicate.Attachment

ThumbnailPathContainsFold applies the ContainsFold predicate on the "thumbnail_path" field.

func ThumbnailPathEQ

func ThumbnailPathEQ(v string) predicate.Attachment

ThumbnailPathEQ applies the EQ predicate on the "thumbnail_path" field.

func ThumbnailPathEqualFold

func ThumbnailPathEqualFold(v string) predicate.Attachment

ThumbnailPathEqualFold applies the EqualFold predicate on the "thumbnail_path" field.

func ThumbnailPathGT

func ThumbnailPathGT(v string) predicate.Attachment

ThumbnailPathGT applies the GT predicate on the "thumbnail_path" field.

func ThumbnailPathGTE

func ThumbnailPathGTE(v string) predicate.Attachment

ThumbnailPathGTE applies the GTE predicate on the "thumbnail_path" field.

func ThumbnailPathHasPrefix

func ThumbnailPathHasPrefix(v string) predicate.Attachment

ThumbnailPathHasPrefix applies the HasPrefix predicate on the "thumbnail_path" field.

func ThumbnailPathHasSuffix

func ThumbnailPathHasSuffix(v string) predicate.Attachment

ThumbnailPathHasSuffix applies the HasSuffix predicate on the "thumbnail_path" field.

func ThumbnailPathIn

func ThumbnailPathIn(vs ...string) predicate.Attachment

ThumbnailPathIn applies the In predicate on the "thumbnail_path" field.

func ThumbnailPathIsNil

func ThumbnailPathIsNil() predicate.Attachment

ThumbnailPathIsNil applies the IsNil predicate on the "thumbnail_path" field.

func ThumbnailPathLT

func ThumbnailPathLT(v string) predicate.Attachment

ThumbnailPathLT applies the LT predicate on the "thumbnail_path" field.

func ThumbnailPathLTE

func ThumbnailPathLTE(v string) predicate.Attachment

ThumbnailPathLTE applies the LTE predicate on the "thumbnail_path" field.

func ThumbnailPathNEQ

func ThumbnailPathNEQ(v string) predicate.Attachment

ThumbnailPathNEQ applies the NEQ predicate on the "thumbnail_path" field.

func ThumbnailPathNotIn

func ThumbnailPathNotIn(vs ...string) predicate.Attachment

ThumbnailPathNotIn applies the NotIn predicate on the "thumbnail_path" field.

func ThumbnailPathNotNil

func ThumbnailPathNotNil() predicate.Attachment

ThumbnailPathNotNil applies the NotNil predicate on the "thumbnail_path" 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 Attachment queries.

func ByFilename

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

ByFilename orders the results by the filename field.

func ByID

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

ByID orders the results by the id field.

func ByMessageField

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

ByMessageField orders the results by message field.

func ByMimeType

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

ByMimeType orders the results by the mime_type field.

func ByPath

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

ByPath orders the results by the path field.

func BySizeBytes

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

BySizeBytes orders the results by the size_bytes field.

func ByThumbnailPath

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

ByThumbnailPath orders the results by the thumbnail_path field.

Jump to

Keyboard shortcuts

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