chore: 初始化 Cloudreve 源码仓库
This commit is contained in:
@@ -0,0 +1,179 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package oauthclient
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/cloudreve/Cloudreve/v4/inventory/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the oauthclient type in the database.
|
||||
Label = "oauth_client"
|
||||
// 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"
|
||||
// FieldGUID holds the string denoting the guid field in the database.
|
||||
FieldGUID = "guid"
|
||||
// FieldSecret holds the string denoting the secret field in the database.
|
||||
FieldSecret = "secret"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// FieldHomepageURL holds the string denoting the homepage_url field in the database.
|
||||
FieldHomepageURL = "homepage_url"
|
||||
// FieldRedirectUris holds the string denoting the redirect_uris field in the database.
|
||||
FieldRedirectUris = "redirect_uris"
|
||||
// FieldScopes holds the string denoting the scopes field in the database.
|
||||
FieldScopes = "scopes"
|
||||
// FieldProps holds the string denoting the props field in the database.
|
||||
FieldProps = "props"
|
||||
// FieldIsEnabled holds the string denoting the is_enabled field in the database.
|
||||
FieldIsEnabled = "is_enabled"
|
||||
// EdgeGrants holds the string denoting the grants edge name in mutations.
|
||||
EdgeGrants = "grants"
|
||||
// Table holds the table name of the oauthclient in the database.
|
||||
Table = "oauth_clients"
|
||||
// GrantsTable is the table that holds the grants relation/edge.
|
||||
GrantsTable = "oauth_grants"
|
||||
// GrantsInverseTable is the table name for the OAuthGrant entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "oauthgrant" package.
|
||||
GrantsInverseTable = "oauth_grants"
|
||||
// GrantsColumn is the table column denoting the grants relation/edge.
|
||||
GrantsColumn = "client_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for oauthclient fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldGUID,
|
||||
FieldSecret,
|
||||
FieldName,
|
||||
FieldHomepageURL,
|
||||
FieldRedirectUris,
|
||||
FieldScopes,
|
||||
FieldProps,
|
||||
FieldIsEnabled,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 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 (
|
||||
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
|
||||
// GUIDValidator is a validator for the "guid" field. It is called by the builders before save.
|
||||
GUIDValidator func(string) error
|
||||
// SecretValidator is a validator for the "secret" field. It is called by the builders before save.
|
||||
SecretValidator func(string) error
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator func(string) error
|
||||
// HomepageURLValidator is a validator for the "homepage_url" field. It is called by the builders before save.
|
||||
HomepageURLValidator func(string) error
|
||||
// DefaultRedirectUris holds the default value on creation for the "redirect_uris" field.
|
||||
DefaultRedirectUris []string
|
||||
// DefaultScopes holds the default value on creation for the "scopes" field.
|
||||
DefaultScopes []string
|
||||
// DefaultProps holds the default value on creation for the "props" field.
|
||||
DefaultProps *types.OAuthClientProps
|
||||
// DefaultIsEnabled holds the default value on creation for the "is_enabled" field.
|
||||
DefaultIsEnabled bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the OAuthClient queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGUID orders the results by the guid field.
|
||||
func ByGUID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGUID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySecret orders the results by the secret field.
|
||||
func BySecret(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSecret, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHomepageURL orders the results by the homepage_url field.
|
||||
func ByHomepageURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHomepageURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsEnabled orders the results by the is_enabled field.
|
||||
func ByIsEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGrantsCount orders the results by grants count.
|
||||
func ByGrantsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newGrantsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByGrants orders the results by grants terms.
|
||||
func ByGrants(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newGrantsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newGrantsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(GrantsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, GrantsTable, GrantsColumn),
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,544 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package oauthclient
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/cloudreve/Cloudreve/v4/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// GUID applies equality check predicate on the "guid" field. It's identical to GUIDEQ.
|
||||
func GUID(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldGUID, v))
|
||||
}
|
||||
|
||||
// Secret applies equality check predicate on the "secret" field. It's identical to SecretEQ.
|
||||
func Secret(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldSecret, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// HomepageURL applies equality check predicate on the "homepage_url" field. It's identical to HomepageURLEQ.
|
||||
func HomepageURL(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// IsEnabled applies equality check predicate on the "is_enabled" field. It's identical to IsEnabledEQ.
|
||||
func IsEnabled(v bool) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldIsEnabled, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// GUIDEQ applies the EQ predicate on the "guid" field.
|
||||
func GUIDEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDNEQ applies the NEQ predicate on the "guid" field.
|
||||
func GUIDNEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDIn applies the In predicate on the "guid" field.
|
||||
func GUIDIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldGUID, vs...))
|
||||
}
|
||||
|
||||
// GUIDNotIn applies the NotIn predicate on the "guid" field.
|
||||
func GUIDNotIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldGUID, vs...))
|
||||
}
|
||||
|
||||
// GUIDGT applies the GT predicate on the "guid" field.
|
||||
func GUIDGT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDGTE applies the GTE predicate on the "guid" field.
|
||||
func GUIDGTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDLT applies the LT predicate on the "guid" field.
|
||||
func GUIDLT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDLTE applies the LTE predicate on the "guid" field.
|
||||
func GUIDLTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDContains applies the Contains predicate on the "guid" field.
|
||||
func GUIDContains(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContains(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDHasPrefix applies the HasPrefix predicate on the "guid" field.
|
||||
func GUIDHasPrefix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasPrefix(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDHasSuffix applies the HasSuffix predicate on the "guid" field.
|
||||
func GUIDHasSuffix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasSuffix(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDEqualFold applies the EqualFold predicate on the "guid" field.
|
||||
func GUIDEqualFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEqualFold(FieldGUID, v))
|
||||
}
|
||||
|
||||
// GUIDContainsFold applies the ContainsFold predicate on the "guid" field.
|
||||
func GUIDContainsFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContainsFold(FieldGUID, v))
|
||||
}
|
||||
|
||||
// SecretEQ applies the EQ predicate on the "secret" field.
|
||||
func SecretEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretNEQ applies the NEQ predicate on the "secret" field.
|
||||
func SecretNEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretIn applies the In predicate on the "secret" field.
|
||||
func SecretIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldSecret, vs...))
|
||||
}
|
||||
|
||||
// SecretNotIn applies the NotIn predicate on the "secret" field.
|
||||
func SecretNotIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldSecret, vs...))
|
||||
}
|
||||
|
||||
// SecretGT applies the GT predicate on the "secret" field.
|
||||
func SecretGT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretGTE applies the GTE predicate on the "secret" field.
|
||||
func SecretGTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretLT applies the LT predicate on the "secret" field.
|
||||
func SecretLT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretLTE applies the LTE predicate on the "secret" field.
|
||||
func SecretLTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretContains applies the Contains predicate on the "secret" field.
|
||||
func SecretContains(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContains(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretHasPrefix applies the HasPrefix predicate on the "secret" field.
|
||||
func SecretHasPrefix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasPrefix(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretHasSuffix applies the HasSuffix predicate on the "secret" field.
|
||||
func SecretHasSuffix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasSuffix(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretEqualFold applies the EqualFold predicate on the "secret" field.
|
||||
func SecretEqualFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEqualFold(FieldSecret, v))
|
||||
}
|
||||
|
||||
// SecretContainsFold applies the ContainsFold predicate on the "secret" field.
|
||||
func SecretContainsFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContainsFold(FieldSecret, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// HomepageURLEQ applies the EQ predicate on the "homepage_url" field.
|
||||
func HomepageURLEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLNEQ applies the NEQ predicate on the "homepage_url" field.
|
||||
func HomepageURLNEQ(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLIn applies the In predicate on the "homepage_url" field.
|
||||
func HomepageURLIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIn(FieldHomepageURL, vs...))
|
||||
}
|
||||
|
||||
// HomepageURLNotIn applies the NotIn predicate on the "homepage_url" field.
|
||||
func HomepageURLNotIn(vs ...string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotIn(FieldHomepageURL, vs...))
|
||||
}
|
||||
|
||||
// HomepageURLGT applies the GT predicate on the "homepage_url" field.
|
||||
func HomepageURLGT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGT(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLGTE applies the GTE predicate on the "homepage_url" field.
|
||||
func HomepageURLGTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldGTE(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLLT applies the LT predicate on the "homepage_url" field.
|
||||
func HomepageURLLT(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLT(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLLTE applies the LTE predicate on the "homepage_url" field.
|
||||
func HomepageURLLTE(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldLTE(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLContains applies the Contains predicate on the "homepage_url" field.
|
||||
func HomepageURLContains(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContains(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLHasPrefix applies the HasPrefix predicate on the "homepage_url" field.
|
||||
func HomepageURLHasPrefix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasPrefix(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLHasSuffix applies the HasSuffix predicate on the "homepage_url" field.
|
||||
func HomepageURLHasSuffix(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldHasSuffix(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLIsNil applies the IsNil predicate on the "homepage_url" field.
|
||||
func HomepageURLIsNil() predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldIsNull(FieldHomepageURL))
|
||||
}
|
||||
|
||||
// HomepageURLNotNil applies the NotNil predicate on the "homepage_url" field.
|
||||
func HomepageURLNotNil() predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNotNull(FieldHomepageURL))
|
||||
}
|
||||
|
||||
// HomepageURLEqualFold applies the EqualFold predicate on the "homepage_url" field.
|
||||
func HomepageURLEqualFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEqualFold(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// HomepageURLContainsFold applies the ContainsFold predicate on the "homepage_url" field.
|
||||
func HomepageURLContainsFold(v string) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldContainsFold(FieldHomepageURL, v))
|
||||
}
|
||||
|
||||
// IsEnabledEQ applies the EQ predicate on the "is_enabled" field.
|
||||
func IsEnabledEQ(v bool) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldEQ(FieldIsEnabled, v))
|
||||
}
|
||||
|
||||
// IsEnabledNEQ applies the NEQ predicate on the "is_enabled" field.
|
||||
func IsEnabledNEQ(v bool) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.FieldNEQ(FieldIsEnabled, v))
|
||||
}
|
||||
|
||||
// HasGrants applies the HasEdge predicate on the "grants" edge.
|
||||
func HasGrants() predicate.OAuthClient {
|
||||
return predicate.OAuthClient(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, GrantsTable, GrantsColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasGrantsWith applies the HasEdge predicate on the "grants" edge with a given conditions (other predicates).
|
||||
func HasGrantsWith(preds ...predicate.OAuthGrant) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(func(s *sql.Selector) {
|
||||
step := newGrantsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.OAuthClient) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.OAuthClient) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.OAuthClient) predicate.OAuthClient {
|
||||
return predicate.OAuthClient(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user