OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

144 lines
5.6 KiB

// Code generated by ent, DO NOT EDIT.
package useridentity
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the useridentity type in the database.
Label = "user_identity"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// FieldConnectorID holds the string denoting the connector_id field in the database.
FieldConnectorID = "connector_id"
// FieldClaimsUserID holds the string denoting the claims_user_id field in the database.
FieldClaimsUserID = "claims_user_id"
// FieldClaimsUsername holds the string denoting the claims_username field in the database.
FieldClaimsUsername = "claims_username"
// FieldClaimsPreferredUsername holds the string denoting the claims_preferred_username field in the database.
FieldClaimsPreferredUsername = "claims_preferred_username"
// FieldClaimsEmail holds the string denoting the claims_email field in the database.
FieldClaimsEmail = "claims_email"
// FieldClaimsEmailVerified holds the string denoting the claims_email_verified field in the database.
FieldClaimsEmailVerified = "claims_email_verified"
// FieldClaimsGroups holds the string denoting the claims_groups field in the database.
FieldClaimsGroups = "claims_groups"
// FieldConsents holds the string denoting the consents field in the database.
FieldConsents = "consents"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldLastLogin holds the string denoting the last_login field in the database.
FieldLastLogin = "last_login"
// FieldBlockedUntil holds the string denoting the blocked_until field in the database.
FieldBlockedUntil = "blocked_until"
// Table holds the table name of the useridentity in the database.
Table = "user_identities"
)
// Columns holds all SQL columns for useridentity fields.
var Columns = []string{
FieldID,
FieldUserID,
FieldConnectorID,
FieldClaimsUserID,
FieldClaimsUsername,
FieldClaimsPreferredUsername,
FieldClaimsEmail,
FieldClaimsEmailVerified,
FieldClaimsGroups,
FieldConsents,
FieldCreatedAt,
FieldLastLogin,
FieldBlockedUntil,
}
// 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
}
var (
// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
UserIDValidator func(string) error
// ConnectorIDValidator is a validator for the "connector_id" field. It is called by the builders before save.
ConnectorIDValidator func(string) error
// DefaultClaimsUserID holds the default value on creation for the "claims_user_id" field.
DefaultClaimsUserID string
// DefaultClaimsUsername holds the default value on creation for the "claims_username" field.
DefaultClaimsUsername string
// DefaultClaimsPreferredUsername holds the default value on creation for the "claims_preferred_username" field.
DefaultClaimsPreferredUsername string
// DefaultClaimsEmail holds the default value on creation for the "claims_email" field.
DefaultClaimsEmail string
// DefaultClaimsEmailVerified holds the default value on creation for the "claims_email_verified" field.
DefaultClaimsEmailVerified bool
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(string) error
)
// OrderOption defines the ordering options for the UserIdentity 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()
}
// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}
// ByConnectorID orders the results by the connector_id field.
func ByConnectorID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldConnectorID, opts...).ToFunc()
}
// ByClaimsUserID orders the results by the claims_user_id field.
func ByClaimsUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsUserID, opts...).ToFunc()
}
// ByClaimsUsername orders the results by the claims_username field.
func ByClaimsUsername(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsUsername, opts...).ToFunc()
}
// ByClaimsPreferredUsername orders the results by the claims_preferred_username field.
func ByClaimsPreferredUsername(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsPreferredUsername, opts...).ToFunc()
}
// ByClaimsEmail orders the results by the claims_email field.
func ByClaimsEmail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsEmail, opts...).ToFunc()
}
// ByClaimsEmailVerified orders the results by the claims_email_verified field.
func ByClaimsEmailVerified(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldClaimsEmailVerified, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByLastLogin orders the results by the last_login field.
func ByLastLogin(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLastLogin, opts...).ToFunc()
}
// ByBlockedUntil orders the results by the blocked_until field.
func ByBlockedUntil(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBlockedUntil, opts...).ToFunc()
}