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.
 
 
 
 
 
 

75 lines
2.3 KiB

// Code generated by ent, DO NOT EDIT.
package password
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the password type in the database.
Label = "password"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldEmail holds the string denoting the email field in the database.
FieldEmail = "email"
// FieldHash holds the string denoting the hash field in the database.
FieldHash = "hash"
// FieldUsername holds the string denoting the username field in the database.
FieldUsername = "username"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// Table holds the table name of the password in the database.
Table = "passwords"
)
// Columns holds all SQL columns for password fields.
var Columns = []string{
FieldID,
FieldEmail,
FieldHash,
FieldUsername,
FieldUserID,
}
// 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 (
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
EmailValidator func(string) error
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
UsernameValidator func(string) error
// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
UserIDValidator func(string) error
)
// OrderOption defines the ordering options for the Password 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()
}
// ByEmail orders the results by the email field.
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEmail, opts...).ToFunc()
}
// ByUsername orders the results by the username field.
func ByUsername(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUsername, opts...).ToFunc()
}
// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}