Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Node) predicate.Node
- func Capabilities(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesEQ(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesGT(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesGTE(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesIn(vs ...*boolset.BooleanSet) predicate.Node
- func CapabilitiesLT(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesLTE(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesNEQ(v *boolset.BooleanSet) predicate.Node
- func CapabilitiesNotIn(vs ...*boolset.BooleanSet) predicate.Node
- func CreatedAt(v time.Time) predicate.Node
- func CreatedAtEQ(v time.Time) predicate.Node
- func CreatedAtGT(v time.Time) predicate.Node
- func CreatedAtGTE(v time.Time) predicate.Node
- func CreatedAtIn(vs ...time.Time) predicate.Node
- func CreatedAtLT(v time.Time) predicate.Node
- func CreatedAtLTE(v time.Time) predicate.Node
- func CreatedAtNEQ(v time.Time) predicate.Node
- func CreatedAtNotIn(vs ...time.Time) predicate.Node
- func DeletedAt(v time.Time) predicate.Node
- func DeletedAtEQ(v time.Time) predicate.Node
- func DeletedAtGT(v time.Time) predicate.Node
- func DeletedAtGTE(v time.Time) predicate.Node
- func DeletedAtIn(vs ...time.Time) predicate.Node
- func DeletedAtIsNil() predicate.Node
- func DeletedAtLT(v time.Time) predicate.Node
- func DeletedAtLTE(v time.Time) predicate.Node
- func DeletedAtNEQ(v time.Time) predicate.Node
- func DeletedAtNotIn(vs ...time.Time) predicate.Node
- func DeletedAtNotNil() predicate.Node
- func HasStoragePolicy() predicate.Node
- func HasStoragePolicyWith(preds ...predicate.StoragePolicy) predicate.Node
- func ID(id int) predicate.Node
- func IDEQ(id int) predicate.Node
- func IDGT(id int) predicate.Node
- func IDGTE(id int) predicate.Node
- func IDIn(ids ...int) predicate.Node
- func IDLT(id int) predicate.Node
- func IDLTE(id int) predicate.Node
- func IDNEQ(id int) predicate.Node
- func IDNotIn(ids ...int) predicate.Node
- func Name(v string) predicate.Node
- func NameContains(v string) predicate.Node
- func NameContainsFold(v string) predicate.Node
- func NameEQ(v string) predicate.Node
- func NameEqualFold(v string) predicate.Node
- func NameGT(v string) predicate.Node
- func NameGTE(v string) predicate.Node
- func NameHasPrefix(v string) predicate.Node
- func NameHasSuffix(v string) predicate.Node
- func NameIn(vs ...string) predicate.Node
- func NameLT(v string) predicate.Node
- func NameLTE(v string) predicate.Node
- func NameNEQ(v string) predicate.Node
- func NameNotIn(vs ...string) predicate.Node
- func Not(p predicate.Node) predicate.Node
- func Or(predicates ...predicate.Node) predicate.Node
- func Server(v string) predicate.Node
- func ServerContains(v string) predicate.Node
- func ServerContainsFold(v string) predicate.Node
- func ServerEQ(v string) predicate.Node
- func ServerEqualFold(v string) predicate.Node
- func ServerGT(v string) predicate.Node
- func ServerGTE(v string) predicate.Node
- func ServerHasPrefix(v string) predicate.Node
- func ServerHasSuffix(v string) predicate.Node
- func ServerIn(vs ...string) predicate.Node
- func ServerIsNil() predicate.Node
- func ServerLT(v string) predicate.Node
- func ServerLTE(v string) predicate.Node
- func ServerNEQ(v string) predicate.Node
- func ServerNotIn(vs ...string) predicate.Node
- func ServerNotNil() predicate.Node
- func SettingsIsNil() predicate.Node
- func SettingsNotNil() predicate.Node
- func SlaveKey(v string) predicate.Node
- func SlaveKeyContains(v string) predicate.Node
- func SlaveKeyContainsFold(v string) predicate.Node
- func SlaveKeyEQ(v string) predicate.Node
- func SlaveKeyEqualFold(v string) predicate.Node
- func SlaveKeyGT(v string) predicate.Node
- func SlaveKeyGTE(v string) predicate.Node
- func SlaveKeyHasPrefix(v string) predicate.Node
- func SlaveKeyHasSuffix(v string) predicate.Node
- func SlaveKeyIn(vs ...string) predicate.Node
- func SlaveKeyIsNil() predicate.Node
- func SlaveKeyLT(v string) predicate.Node
- func SlaveKeyLTE(v string) predicate.Node
- func SlaveKeyNEQ(v string) predicate.Node
- func SlaveKeyNotIn(vs ...string) predicate.Node
- func SlaveKeyNotNil() predicate.Node
- func StatusEQ(v Status) predicate.Node
- func StatusIn(vs ...Status) predicate.Node
- func StatusNEQ(v Status) predicate.Node
- func StatusNotIn(vs ...Status) predicate.Node
- func StatusValidator(s Status) error
- func TypeEQ(v Type) predicate.Node
- func TypeIn(vs ...Type) predicate.Node
- func TypeNEQ(v Type) predicate.Node
- func TypeNotIn(vs ...Type) predicate.Node
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Node
- func UpdatedAtEQ(v time.Time) predicate.Node
- func UpdatedAtGT(v time.Time) predicate.Node
- func UpdatedAtGTE(v time.Time) predicate.Node
- func UpdatedAtIn(vs ...time.Time) predicate.Node
- func UpdatedAtLT(v time.Time) predicate.Node
- func UpdatedAtLTE(v time.Time) predicate.Node
- func UpdatedAtNEQ(v time.Time) predicate.Node
- func UpdatedAtNotIn(vs ...time.Time) predicate.Node
- func ValidColumn(column string) bool
- func Weight(v int) predicate.Node
- func WeightEQ(v int) predicate.Node
- func WeightGT(v int) predicate.Node
- func WeightGTE(v int) predicate.Node
- func WeightIn(vs ...int) predicate.Node
- func WeightLT(v int) predicate.Node
- func WeightLTE(v int) predicate.Node
- func WeightNEQ(v int) predicate.Node
- func WeightNotIn(vs ...int) predicate.Node
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByServer(opts ...sql.OrderTermOption) OrderOption
- func BySlaveKey(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByStoragePolicy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByStoragePolicyCount(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByWeight(opts ...sql.OrderTermOption) OrderOption
- type Status
- type Type
Constants ¶
const ( // Label holds the string label denoting the node type in the database. Label = "node" // 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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldServer holds the string denoting the server field in the database. FieldServer = "server" // FieldSlaveKey holds the string denoting the slave_key field in the database. FieldSlaveKey = "slave_key" // FieldCapabilities holds the string denoting the capabilities field in the database. FieldCapabilities = "capabilities" // FieldSettings holds the string denoting the settings field in the database. FieldSettings = "settings" // FieldWeight holds the string denoting the weight field in the database. FieldWeight = "weight" // EdgeStoragePolicy holds the string denoting the storage_policy edge name in mutations. EdgeStoragePolicy = "storage_policy" // Table holds the table name of the node in the database. Table = "nodes" // StoragePolicyTable is the table that holds the storage_policy relation/edge. StoragePolicyTable = "storage_policies" // StoragePolicyInverseTable is the table name for the StoragePolicy entity. // It exists in this package in order to avoid circular dependency with the "storagepolicy" package. StoragePolicyInverseTable = "storage_policies" // StoragePolicyColumn is the table column denoting the storage_policy relation/edge. StoragePolicyColumn = "node_id" )
Variables ¶
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.NodeSetting // DefaultWeight holds the default value on creation for the "weight" field. DefaultWeight int )
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldStatus, FieldName, FieldType, FieldServer, FieldSlaveKey, FieldCapabilities, FieldSettings, FieldWeight, }
Columns holds all SQL columns for node fields.
Functions ¶
func Capabilities ¶
func Capabilities(v *boolset.BooleanSet) predicate.Node
Capabilities applies equality check predicate on the "capabilities" field. It's identical to CapabilitiesEQ.
func CapabilitiesEQ ¶
func CapabilitiesEQ(v *boolset.BooleanSet) predicate.Node
CapabilitiesEQ applies the EQ predicate on the "capabilities" field.
func CapabilitiesGT ¶
func CapabilitiesGT(v *boolset.BooleanSet) predicate.Node
CapabilitiesGT applies the GT predicate on the "capabilities" field.
func CapabilitiesGTE ¶
func CapabilitiesGTE(v *boolset.BooleanSet) predicate.Node
CapabilitiesGTE applies the GTE predicate on the "capabilities" field.
func CapabilitiesIn ¶
func CapabilitiesIn(vs ...*boolset.BooleanSet) predicate.Node
CapabilitiesIn applies the In predicate on the "capabilities" field.
func CapabilitiesLT ¶
func CapabilitiesLT(v *boolset.BooleanSet) predicate.Node
CapabilitiesLT applies the LT predicate on the "capabilities" field.
func CapabilitiesLTE ¶
func CapabilitiesLTE(v *boolset.BooleanSet) predicate.Node
CapabilitiesLTE applies the LTE predicate on the "capabilities" field.
func CapabilitiesNEQ ¶
func CapabilitiesNEQ(v *boolset.BooleanSet) predicate.Node
CapabilitiesNEQ applies the NEQ predicate on the "capabilities" field.
func CapabilitiesNotIn ¶
func CapabilitiesNotIn(vs ...*boolset.BooleanSet) predicate.Node
CapabilitiesNotIn applies the NotIn predicate on the "capabilities" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasStoragePolicy ¶
HasStoragePolicy applies the HasEdge predicate on the "storage_policy" edge.
func HasStoragePolicyWith ¶
func HasStoragePolicyWith(preds ...predicate.StoragePolicy) predicate.Node
HasStoragePolicyWith applies the HasEdge predicate on the "storage_policy" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func Server ¶
Server applies equality check predicate on the "server" field. It's identical to ServerEQ.
func ServerContains ¶
ServerContains applies the Contains predicate on the "server" field.
func ServerContainsFold ¶
ServerContainsFold applies the ContainsFold predicate on the "server" field.
func ServerEqualFold ¶
ServerEqualFold applies the EqualFold predicate on the "server" field.
func ServerHasPrefix ¶
ServerHasPrefix applies the HasPrefix predicate on the "server" field.
func ServerHasSuffix ¶
ServerHasSuffix applies the HasSuffix predicate on the "server" field.
func ServerIsNil ¶
ServerIsNil applies the IsNil predicate on the "server" field.
func ServerNotIn ¶
ServerNotIn applies the NotIn predicate on the "server" field.
func ServerNotNil ¶
ServerNotNil applies the NotNil predicate on the "server" field.
func SettingsIsNil ¶
SettingsIsNil applies the IsNil predicate on the "settings" field.
func SettingsNotNil ¶
SettingsNotNil applies the NotNil predicate on the "settings" field.
func SlaveKey ¶
SlaveKey applies equality check predicate on the "slave_key" field. It's identical to SlaveKeyEQ.
func SlaveKeyContains ¶
SlaveKeyContains applies the Contains predicate on the "slave_key" field.
func SlaveKeyContainsFold ¶
SlaveKeyContainsFold applies the ContainsFold predicate on the "slave_key" field.
func SlaveKeyEQ ¶
SlaveKeyEQ applies the EQ predicate on the "slave_key" field.
func SlaveKeyEqualFold ¶
SlaveKeyEqualFold applies the EqualFold predicate on the "slave_key" field.
func SlaveKeyGT ¶
SlaveKeyGT applies the GT predicate on the "slave_key" field.
func SlaveKeyGTE ¶
SlaveKeyGTE applies the GTE predicate on the "slave_key" field.
func SlaveKeyHasPrefix ¶
SlaveKeyHasPrefix applies the HasPrefix predicate on the "slave_key" field.
func SlaveKeyHasSuffix ¶
SlaveKeyHasSuffix applies the HasSuffix predicate on the "slave_key" field.
func SlaveKeyIn ¶
SlaveKeyIn applies the In predicate on the "slave_key" field.
func SlaveKeyIsNil ¶
SlaveKeyIsNil applies the IsNil predicate on the "slave_key" field.
func SlaveKeyLT ¶
SlaveKeyLT applies the LT predicate on the "slave_key" field.
func SlaveKeyLTE ¶
SlaveKeyLTE applies the LTE predicate on the "slave_key" field.
func SlaveKeyNEQ ¶
SlaveKeyNEQ applies the NEQ predicate on the "slave_key" field.
func SlaveKeyNotIn ¶
SlaveKeyNotIn applies the NotIn predicate on the "slave_key" field.
func SlaveKeyNotNil ¶
SlaveKeyNotNil applies the NotNil predicate on the "slave_key" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Weight ¶
Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.
func WeightNotIn ¶
WeightNotIn applies the NotIn predicate on the "weight" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Node 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 ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByServer ¶
func ByServer(opts ...sql.OrderTermOption) OrderOption
ByServer orders the results by the server field.
func BySlaveKey ¶
func BySlaveKey(opts ...sql.OrderTermOption) OrderOption
BySlaveKey orders the results by the slave_key field.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByStoragePolicy ¶
func ByStoragePolicy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByStoragePolicy orders the results by storage_policy terms.
func ByStoragePolicyCount ¶
func ByStoragePolicyCount(opts ...sql.OrderTermOption) OrderOption
ByStoragePolicyCount orders the results by storage_policy count.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByWeight ¶
func ByWeight(opts ...sql.OrderTermOption) OrderOption
ByWeight orders the results by the weight field.