mirror of
https://github.com/netbirdio/dex.git
synced 2026-05-22 18:43:53 -07:00
101 lines
3.5 KiB
Go
101 lines
3.5 KiB
Go
// 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"
|
|
// FieldAllowedConnectors holds the string denoting the allowed_connectors field in the database.
|
|
FieldAllowedConnectors = "allowed_connectors"
|
|
// FieldMfaChain holds the string denoting the mfa_chain field in the database.
|
|
FieldMfaChain = "mfa_chain"
|
|
// FieldPostLogoutRedirectUris holds the string denoting the post_logout_redirect_uris field in the database.
|
|
FieldPostLogoutRedirectUris = "post_logout_redirect_uris"
|
|
// FieldSSOSharedWith holds the string denoting the sso_shared_with field in the database.
|
|
FieldSSOSharedWith = "sso_shared_with"
|
|
// 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,
|
|
FieldAllowedConnectors,
|
|
FieldMfaChain,
|
|
FieldPostLogoutRedirectUris,
|
|
FieldSSOSharedWith,
|
|
}
|
|
|
|
// 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()
|
|
}
|