mirror of https://github.com/dexidp/dex.git
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.
88 lines
2.9 KiB
88 lines
2.9 KiB
// Code generated by ent, DO NOT EDIT. |
|
|
|
package oauth2client |
|
|
|
import ( |
|
"entgo.io/ent/dialect/sql" |
|
) |
|
|
|
const ( |
|
// Label holds the string label denoting the oauth2client type in the database. |
|
Label = "oauth2client" |
|
// FieldID holds the string denoting the id field in the database. |
|
FieldID = "id" |
|
// FieldSecret holds the string denoting the secret field in the database. |
|
FieldSecret = "secret" |
|
// FieldRedirectUris holds the string denoting the redirect_uris field in the database. |
|
FieldRedirectUris = "redirect_uris" |
|
// FieldTrustedPeers holds the string denoting the trusted_peers field in the database. |
|
FieldTrustedPeers = "trusted_peers" |
|
// FieldPublic holds the string denoting the public field in the database. |
|
FieldPublic = "public" |
|
// FieldName holds the string denoting the name field in the database. |
|
FieldName = "name" |
|
// FieldLogoURL holds the string denoting the logo_url field in the database. |
|
FieldLogoURL = "logo_url" |
|
// Table holds the table name of the oauth2client in the database. |
|
Table = "oauth2clients" |
|
) |
|
|
|
// Columns holds all SQL columns for oauth2client fields. |
|
var Columns = []string{ |
|
FieldID, |
|
FieldSecret, |
|
FieldRedirectUris, |
|
FieldTrustedPeers, |
|
FieldPublic, |
|
FieldName, |
|
FieldLogoURL, |
|
} |
|
|
|
// 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 ( |
|
// 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 |
|
// LogoURLValidator is a validator for the "logo_url" field. It is called by the builders before save. |
|
LogoURLValidator func(string) error |
|
// 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 OAuth2Client 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() |
|
} |
|
|
|
// BySecret orders the results by the secret field. |
|
func BySecret(opts ...sql.OrderTermOption) OrderOption { |
|
return sql.OrderByField(FieldSecret, opts...).ToFunc() |
|
} |
|
|
|
// ByPublic orders the results by the public field. |
|
func ByPublic(opts ...sql.OrderTermOption) OrderOption { |
|
return sql.OrderByField(FieldPublic, opts...).ToFunc() |
|
} |
|
|
|
// ByName orders the results by the name field. |
|
func ByName(opts ...sql.OrderTermOption) OrderOption { |
|
return sql.OrderByField(FieldName, opts...).ToFunc() |
|
} |
|
|
|
// ByLogoURL orders the results by the logo_url field. |
|
func ByLogoURL(opts ...sql.OrderTermOption) OrderOption { |
|
return sql.OrderByField(FieldLogoURL, opts...).ToFunc() |
|
}
|
|
|