Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Share) predicate.Share
- func CreatedAt(v time.Time) predicate.Share
- func CreatedAtEQ(v time.Time) predicate.Share
- func CreatedAtGT(v time.Time) predicate.Share
- func CreatedAtGTE(v time.Time) predicate.Share
- func CreatedAtIn(vs ...time.Time) predicate.Share
- func CreatedAtLT(v time.Time) predicate.Share
- func CreatedAtLTE(v time.Time) predicate.Share
- func CreatedAtNEQ(v time.Time) predicate.Share
- func CreatedAtNotIn(vs ...time.Time) predicate.Share
- func DeletedAt(v time.Time) predicate.Share
- func DeletedAtEQ(v time.Time) predicate.Share
- func DeletedAtGT(v time.Time) predicate.Share
- func DeletedAtGTE(v time.Time) predicate.Share
- func DeletedAtIn(vs ...time.Time) predicate.Share
- func DeletedAtIsNil() predicate.Share
- func DeletedAtLT(v time.Time) predicate.Share
- func DeletedAtLTE(v time.Time) predicate.Share
- func DeletedAtNEQ(v time.Time) predicate.Share
- func DeletedAtNotIn(vs ...time.Time) predicate.Share
- func DeletedAtNotNil() predicate.Share
- func Downloads(v int) predicate.Share
- func DownloadsEQ(v int) predicate.Share
- func DownloadsGT(v int) predicate.Share
- func DownloadsGTE(v int) predicate.Share
- func DownloadsIn(vs ...int) predicate.Share
- func DownloadsLT(v int) predicate.Share
- func DownloadsLTE(v int) predicate.Share
- func DownloadsNEQ(v int) predicate.Share
- func DownloadsNotIn(vs ...int) predicate.Share
- func Expires(v time.Time) predicate.Share
- func ExpiresEQ(v time.Time) predicate.Share
- func ExpiresGT(v time.Time) predicate.Share
- func ExpiresGTE(v time.Time) predicate.Share
- func ExpiresIn(vs ...time.Time) predicate.Share
- func ExpiresIsNil() predicate.Share
- func ExpiresLT(v time.Time) predicate.Share
- func ExpiresLTE(v time.Time) predicate.Share
- func ExpiresNEQ(v time.Time) predicate.Share
- func ExpiresNotIn(vs ...time.Time) predicate.Share
- func ExpiresNotNil() predicate.Share
- func HasFile() predicate.Share
- func HasFileWith(preds ...predicate.File) predicate.Share
- func HasUser() predicate.Share
- func HasUserWith(preds ...predicate.User) predicate.Share
- func ID(id int) predicate.Share
- func IDEQ(id int) predicate.Share
- func IDGT(id int) predicate.Share
- func IDGTE(id int) predicate.Share
- func IDIn(ids ...int) predicate.Share
- func IDLT(id int) predicate.Share
- func IDLTE(id int) predicate.Share
- func IDNEQ(id int) predicate.Share
- func IDNotIn(ids ...int) predicate.Share
- func Not(p predicate.Share) predicate.Share
- func Or(predicates ...predicate.Share) predicate.Share
- func Password(v string) predicate.Share
- func PasswordContains(v string) predicate.Share
- func PasswordContainsFold(v string) predicate.Share
- func PasswordEQ(v string) predicate.Share
- func PasswordEqualFold(v string) predicate.Share
- func PasswordGT(v string) predicate.Share
- func PasswordGTE(v string) predicate.Share
- func PasswordHasPrefix(v string) predicate.Share
- func PasswordHasSuffix(v string) predicate.Share
- func PasswordIn(vs ...string) predicate.Share
- func PasswordIsNil() predicate.Share
- func PasswordLT(v string) predicate.Share
- func PasswordLTE(v string) predicate.Share
- func PasswordNEQ(v string) predicate.Share
- func PasswordNotIn(vs ...string) predicate.Share
- func PasswordNotNil() predicate.Share
- func PropsIsNil() predicate.Share
- func PropsNotNil() predicate.Share
- func RemainDownloads(v int) predicate.Share
- func RemainDownloadsEQ(v int) predicate.Share
- func RemainDownloadsGT(v int) predicate.Share
- func RemainDownloadsGTE(v int) predicate.Share
- func RemainDownloadsIn(vs ...int) predicate.Share
- func RemainDownloadsIsNil() predicate.Share
- func RemainDownloadsLT(v int) predicate.Share
- func RemainDownloadsLTE(v int) predicate.Share
- func RemainDownloadsNEQ(v int) predicate.Share
- func RemainDownloadsNotIn(vs ...int) predicate.Share
- func RemainDownloadsNotNil() predicate.Share
- func UpdatedAt(v time.Time) predicate.Share
- func UpdatedAtEQ(v time.Time) predicate.Share
- func UpdatedAtGT(v time.Time) predicate.Share
- func UpdatedAtGTE(v time.Time) predicate.Share
- func UpdatedAtIn(vs ...time.Time) predicate.Share
- func UpdatedAtLT(v time.Time) predicate.Share
- func UpdatedAtLTE(v time.Time) predicate.Share
- func UpdatedAtNEQ(v time.Time) predicate.Share
- func UpdatedAtNotIn(vs ...time.Time) predicate.Share
- func ValidColumn(column string) bool
- func Views(v int) predicate.Share
- func ViewsEQ(v int) predicate.Share
- func ViewsGT(v int) predicate.Share
- func ViewsGTE(v int) predicate.Share
- func ViewsIn(vs ...int) predicate.Share
- func ViewsLT(v int) predicate.Share
- func ViewsLTE(v int) predicate.Share
- func ViewsNEQ(v int) predicate.Share
- func ViewsNotIn(vs ...int) predicate.Share
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDownloads(opts ...sql.OrderTermOption) OrderOption
- func ByExpires(opts ...sql.OrderTermOption) OrderOption
- func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByRemainDownloads(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByViews(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the share type in the database. Label = "share" // 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" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldViews holds the string denoting the views field in the database. FieldViews = "views" // FieldDownloads holds the string denoting the downloads field in the database. FieldDownloads = "downloads" // FieldExpires holds the string denoting the expires field in the database. FieldExpires = "expires" // FieldRemainDownloads holds the string denoting the remain_downloads field in the database. FieldRemainDownloads = "remain_downloads" // FieldProps holds the string denoting the props field in the database. FieldProps = "props" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeFile holds the string denoting the file edge name in mutations. EdgeFile = "file" // Table holds the table name of the share in the database. Table = "shares" // UserTable is the table that holds the user relation/edge. UserTable = "shares" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_shares" // FileTable is the table that holds the file relation/edge. FileTable = "shares" // FileInverseTable is the table name for the File entity. // It exists in this package in order to avoid circular dependency with the "file" package. FileInverseTable = "files" // FileColumn is the table column denoting the file relation/edge. FileColumn = "file_shares" )
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 // DefaultViews holds the default value on creation for the "views" field. DefaultViews int // DefaultDownloads holds the default value on creation for the "downloads" field. DefaultDownloads 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, FieldPassword, FieldViews, FieldDownloads, FieldExpires, FieldRemainDownloads, FieldProps, }
Columns holds all SQL columns for share fields.
var ForeignKeys = []string{
"file_shares",
"user_shares",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "shares" table and are not defined as standalone fields in the schema.
Functions ¶
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 Downloads ¶
Downloads applies equality check predicate on the "downloads" field. It's identical to DownloadsEQ.
func DownloadsEQ ¶
DownloadsEQ applies the EQ predicate on the "downloads" field.
func DownloadsGT ¶
DownloadsGT applies the GT predicate on the "downloads" field.
func DownloadsGTE ¶
DownloadsGTE applies the GTE predicate on the "downloads" field.
func DownloadsIn ¶
DownloadsIn applies the In predicate on the "downloads" field.
func DownloadsLT ¶
DownloadsLT applies the LT predicate on the "downloads" field.
func DownloadsLTE ¶
DownloadsLTE applies the LTE predicate on the "downloads" field.
func DownloadsNEQ ¶
DownloadsNEQ applies the NEQ predicate on the "downloads" field.
func DownloadsNotIn ¶
DownloadsNotIn applies the NotIn predicate on the "downloads" field.
func Expires ¶
Expires applies equality check predicate on the "expires" field. It's identical to ExpiresEQ.
func ExpiresGTE ¶
ExpiresGTE applies the GTE predicate on the "expires" field.
func ExpiresIsNil ¶
ExpiresIsNil applies the IsNil predicate on the "expires" field.
func ExpiresLTE ¶
ExpiresLTE applies the LTE predicate on the "expires" field.
func ExpiresNEQ ¶
ExpiresNEQ applies the NEQ predicate on the "expires" field.
func ExpiresNotIn ¶
ExpiresNotIn applies the NotIn predicate on the "expires" field.
func ExpiresNotNil ¶
ExpiresNotNil applies the NotNil predicate on the "expires" field.
func HasFileWith ¶
HasFileWith applies the HasEdge predicate on the "file" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func Password ¶
Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func PasswordContains ¶
PasswordContains applies the Contains predicate on the "password" field.
func PasswordContainsFold ¶
PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordEQ ¶
PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEqualFold ¶
PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordGT ¶
PasswordGT applies the GT predicate on the "password" field.
func PasswordGTE ¶
PasswordGTE applies the GTE predicate on the "password" field.
func PasswordHasPrefix ¶
PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasSuffix ¶
PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordIn ¶
PasswordIn applies the In predicate on the "password" field.
func PasswordIsNil ¶
PasswordIsNil applies the IsNil predicate on the "password" field.
func PasswordLT ¶
PasswordLT applies the LT predicate on the "password" field.
func PasswordLTE ¶
PasswordLTE applies the LTE predicate on the "password" field.
func PasswordNEQ ¶
PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNotIn ¶
PasswordNotIn applies the NotIn predicate on the "password" field.
func PasswordNotNil ¶
PasswordNotNil applies the NotNil predicate on the "password" field.
func PropsIsNil ¶
PropsIsNil applies the IsNil predicate on the "props" field.
func PropsNotNil ¶
PropsNotNil applies the NotNil predicate on the "props" field.
func RemainDownloads ¶
RemainDownloads applies equality check predicate on the "remain_downloads" field. It's identical to RemainDownloadsEQ.
func RemainDownloadsEQ ¶
RemainDownloadsEQ applies the EQ predicate on the "remain_downloads" field.
func RemainDownloadsGT ¶
RemainDownloadsGT applies the GT predicate on the "remain_downloads" field.
func RemainDownloadsGTE ¶
RemainDownloadsGTE applies the GTE predicate on the "remain_downloads" field.
func RemainDownloadsIn ¶
RemainDownloadsIn applies the In predicate on the "remain_downloads" field.
func RemainDownloadsIsNil ¶
RemainDownloadsIsNil applies the IsNil predicate on the "remain_downloads" field.
func RemainDownloadsLT ¶
RemainDownloadsLT applies the LT predicate on the "remain_downloads" field.
func RemainDownloadsLTE ¶
RemainDownloadsLTE applies the LTE predicate on the "remain_downloads" field.
func RemainDownloadsNEQ ¶
RemainDownloadsNEQ applies the NEQ predicate on the "remain_downloads" field.
func RemainDownloadsNotIn ¶
RemainDownloadsNotIn applies the NotIn predicate on the "remain_downloads" field.
func RemainDownloadsNotNil ¶
RemainDownloadsNotNil applies the NotNil predicate on the "remain_downloads" field.
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 Views ¶
Views applies equality check predicate on the "views" field. It's identical to ViewsEQ.
func ViewsNotIn ¶
ViewsNotIn applies the NotIn predicate on the "views" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Share 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 ByDownloads ¶
func ByDownloads(opts ...sql.OrderTermOption) OrderOption
ByDownloads orders the results by the downloads field.
func ByExpires ¶
func ByExpires(opts ...sql.OrderTermOption) OrderOption
ByExpires orders the results by the expires field.
func ByFileField ¶
func ByFileField(field string, opts ...sql.OrderTermOption) OrderOption
ByFileField orders the results by file field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPassword ¶
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByRemainDownloads ¶
func ByRemainDownloads(opts ...sql.OrderTermOption) OrderOption
ByRemainDownloads orders the results by the remain_downloads field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByViews ¶
func ByViews(opts ...sql.OrderTermOption) OrderOption
ByViews orders the results by the views field.