group

package
v4.0.0-...-5b82330 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the group type in the database.
	Label = "group"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldMaxStorage holds the string denoting the max_storage field in the database.
	FieldMaxStorage = "max_storage"
	// FieldSpeedLimit holds the string denoting the speed_limit field in the database.
	FieldSpeedLimit = "speed_limit"
	// FieldPermissions holds the string denoting the permissions field in the database.
	FieldPermissions = "permissions"
	// FieldSettings holds the string denoting the settings field in the database.
	FieldSettings = "settings"
	// FieldStoragePolicyID holds the string denoting the storage_policy_id field in the database.
	FieldStoragePolicyID = "storage_policy_id"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgeStoragePolicies holds the string denoting the storage_policies edge name in mutations.
	EdgeStoragePolicies = "storage_policies"
	// Table holds the table name of the group in the database.
	Table = "groups"
	// UsersTable is the table that holds the users relation/edge.
	UsersTable = "users"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// UsersColumn is the table column denoting the users relation/edge.
	UsersColumn = "group_users"
	// StoragePoliciesTable is the table that holds the storage_policies relation/edge.
	StoragePoliciesTable = "groups"
	// StoragePoliciesInverseTable is the table name for the StoragePolicy entity.
	// It exists in this package in order to avoid circular dependency with the "storagepolicy" package.
	StoragePoliciesInverseTable = "storage_policies"
	// StoragePoliciesColumn is the table column denoting the storage_policies relation/edge.
	StoragePoliciesColumn = "storage_policy_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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
	// DefaultSettings holds the default value on creation for the "settings" field.
	DefaultSettings *types.GroupSetting
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"

Columns holds all SQL columns for group fields.

Functions

func And

func And(predicates ...predicate.Group) predicate.Group

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Group

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Group

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Group

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Group

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Group

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Group

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Group

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Group

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Group

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Group

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Group

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Group

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Group

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Group

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Group

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Group

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

func HasStoragePolicies

func HasStoragePolicies() predicate.Group

HasStoragePolicies applies the HasEdge predicate on the "storage_policies" edge.

func HasStoragePoliciesWith

func HasStoragePoliciesWith(preds ...predicate.StoragePolicy) predicate.Group

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

func HasUsers

func HasUsers() predicate.Group

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.Group

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

func ID

func ID(id int) predicate.Group

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Group

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Group

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Group

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Group

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Group

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Group

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func MaxStorage

func MaxStorage(v int64) predicate.Group

MaxStorage applies equality check predicate on the "max_storage" field. It's identical to MaxStorageEQ.

func MaxStorageEQ

func MaxStorageEQ(v int64) predicate.Group

MaxStorageEQ applies the EQ predicate on the "max_storage" field.

func MaxStorageGT

func MaxStorageGT(v int64) predicate.Group

MaxStorageGT applies the GT predicate on the "max_storage" field.

func MaxStorageGTE

func MaxStorageGTE(v int64) predicate.Group

MaxStorageGTE applies the GTE predicate on the "max_storage" field.

func MaxStorageIn

func MaxStorageIn(vs ...int64) predicate.Group

MaxStorageIn applies the In predicate on the "max_storage" field.

func MaxStorageIsNil

func MaxStorageIsNil() predicate.Group

MaxStorageIsNil applies the IsNil predicate on the "max_storage" field.

func MaxStorageLT

func MaxStorageLT(v int64) predicate.Group

MaxStorageLT applies the LT predicate on the "max_storage" field.

func MaxStorageLTE

func MaxStorageLTE(v int64) predicate.Group

MaxStorageLTE applies the LTE predicate on the "max_storage" field.

func MaxStorageNEQ

func MaxStorageNEQ(v int64) predicate.Group

MaxStorageNEQ applies the NEQ predicate on the "max_storage" field.

func MaxStorageNotIn

func MaxStorageNotIn(vs ...int64) predicate.Group

MaxStorageNotIn applies the NotIn predicate on the "max_storage" field.

func MaxStorageNotNil

func MaxStorageNotNil() predicate.Group

MaxStorageNotNil applies the NotNil predicate on the "max_storage" field.

func Name

func Name(v string) predicate.Group

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

func NameContains

func NameContains(v string) predicate.Group

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

func NameContainsFold

func NameContainsFold(v string) predicate.Group

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

func NameEQ

func NameEQ(v string) predicate.Group

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

func NameEqualFold

func NameEqualFold(v string) predicate.Group

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

func NameGT

func NameGT(v string) predicate.Group

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

func NameGTE

func NameGTE(v string) predicate.Group

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Group

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Group

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Group

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

func NameLTE

func NameLTE(v string) predicate.Group

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

func NameNEQ

func NameNEQ(v string) predicate.Group

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func Permissions

func Permissions(v *boolset.BooleanSet) predicate.Group

Permissions applies equality check predicate on the "permissions" field. It's identical to PermissionsEQ.

func PermissionsEQ

func PermissionsEQ(v *boolset.BooleanSet) predicate.Group

PermissionsEQ applies the EQ predicate on the "permissions" field.

func PermissionsGT

func PermissionsGT(v *boolset.BooleanSet) predicate.Group

PermissionsGT applies the GT predicate on the "permissions" field.

func PermissionsGTE

func PermissionsGTE(v *boolset.BooleanSet) predicate.Group

PermissionsGTE applies the GTE predicate on the "permissions" field.

func PermissionsIn

func PermissionsIn(vs ...*boolset.BooleanSet) predicate.Group

PermissionsIn applies the In predicate on the "permissions" field.

func PermissionsLT

func PermissionsLT(v *boolset.BooleanSet) predicate.Group

PermissionsLT applies the LT predicate on the "permissions" field.

func PermissionsLTE

func PermissionsLTE(v *boolset.BooleanSet) predicate.Group

PermissionsLTE applies the LTE predicate on the "permissions" field.

func PermissionsNEQ

func PermissionsNEQ(v *boolset.BooleanSet) predicate.Group

PermissionsNEQ applies the NEQ predicate on the "permissions" field.

func PermissionsNotIn

func PermissionsNotIn(vs ...*boolset.BooleanSet) predicate.Group

PermissionsNotIn applies the NotIn predicate on the "permissions" field.

func SettingsIsNil

func SettingsIsNil() predicate.Group

SettingsIsNil applies the IsNil predicate on the "settings" field.

func SettingsNotNil

func SettingsNotNil() predicate.Group

SettingsNotNil applies the NotNil predicate on the "settings" field.

func SpeedLimit

func SpeedLimit(v int) predicate.Group

SpeedLimit applies equality check predicate on the "speed_limit" field. It's identical to SpeedLimitEQ.

func SpeedLimitEQ

func SpeedLimitEQ(v int) predicate.Group

SpeedLimitEQ applies the EQ predicate on the "speed_limit" field.

func SpeedLimitGT

func SpeedLimitGT(v int) predicate.Group

SpeedLimitGT applies the GT predicate on the "speed_limit" field.

func SpeedLimitGTE

func SpeedLimitGTE(v int) predicate.Group

SpeedLimitGTE applies the GTE predicate on the "speed_limit" field.

func SpeedLimitIn

func SpeedLimitIn(vs ...int) predicate.Group

SpeedLimitIn applies the In predicate on the "speed_limit" field.

func SpeedLimitIsNil

func SpeedLimitIsNil() predicate.Group

SpeedLimitIsNil applies the IsNil predicate on the "speed_limit" field.

func SpeedLimitLT

func SpeedLimitLT(v int) predicate.Group

SpeedLimitLT applies the LT predicate on the "speed_limit" field.

func SpeedLimitLTE

func SpeedLimitLTE(v int) predicate.Group

SpeedLimitLTE applies the LTE predicate on the "speed_limit" field.

func SpeedLimitNEQ

func SpeedLimitNEQ(v int) predicate.Group

SpeedLimitNEQ applies the NEQ predicate on the "speed_limit" field.

func SpeedLimitNotIn

func SpeedLimitNotIn(vs ...int) predicate.Group

SpeedLimitNotIn applies the NotIn predicate on the "speed_limit" field.

func SpeedLimitNotNil

func SpeedLimitNotNil() predicate.Group

SpeedLimitNotNil applies the NotNil predicate on the "speed_limit" field.

func StoragePolicyID

func StoragePolicyID(v int) predicate.Group

StoragePolicyID applies equality check predicate on the "storage_policy_id" field. It's identical to StoragePolicyIDEQ.

func StoragePolicyIDEQ

func StoragePolicyIDEQ(v int) predicate.Group

StoragePolicyIDEQ applies the EQ predicate on the "storage_policy_id" field.

func StoragePolicyIDIn

func StoragePolicyIDIn(vs ...int) predicate.Group

StoragePolicyIDIn applies the In predicate on the "storage_policy_id" field.

func StoragePolicyIDIsNil

func StoragePolicyIDIsNil() predicate.Group

StoragePolicyIDIsNil applies the IsNil predicate on the "storage_policy_id" field.

func StoragePolicyIDNEQ

func StoragePolicyIDNEQ(v int) predicate.Group

StoragePolicyIDNEQ applies the NEQ predicate on the "storage_policy_id" field.

func StoragePolicyIDNotIn

func StoragePolicyIDNotIn(vs ...int) predicate.Group

StoragePolicyIDNotIn applies the NotIn predicate on the "storage_policy_id" field.

func StoragePolicyIDNotNil

func StoragePolicyIDNotNil() predicate.Group

StoragePolicyIDNotNil applies the NotNil predicate on the "storage_policy_id" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Group

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Group

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Group

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Group

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Group

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Group

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Group

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

func UpdatedAtNotIn

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

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

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Group 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 ByID

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

ByID orders the results by the id field.

func ByMaxStorage

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

ByMaxStorage orders the results by the max_storage field.

func ByName

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

ByName orders the results by the name field.

func BySpeedLimit

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

BySpeedLimit orders the results by the speed_limit field.

func ByStoragePoliciesField

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

ByStoragePoliciesField orders the results by storage_policies field.

func ByStoragePolicyID

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

ByStoragePolicyID orders the results by the storage_policy_id field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsers

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

ByUsers orders the results by users terms.

func ByUsersCount

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

ByUsersCount orders the results by users count.

Jump to

Keyboard shortcuts

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