pcmt/ent/hibp/hibp.go
surtur 50e7596672
All checks were successful
continuous-integration/drone/push Build is passing
chore(ent): re-run go generate
2023-08-07 21:31:46 +02:00

170 lines
5.9 KiB
Go

// Code generated by ent, DO NOT EDIT.
package hibp
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the hibp type in the database.
Label = "hibp"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldDomain holds the string denoting the domain field in the database.
FieldDomain = "domain"
// FieldBreachDate holds the string denoting the breach_date field in the database.
FieldBreachDate = "breach_date"
// FieldAddedDate holds the string denoting the added_date field in the database.
FieldAddedDate = "added_date"
// FieldModifiedDate holds the string denoting the modified_date field in the database.
FieldModifiedDate = "modified_date"
// FieldPwnCount holds the string denoting the pwn_count field in the database.
FieldPwnCount = "pwn_count"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldDataclasses holds the string denoting the dataclasses field in the database.
FieldDataclasses = "dataclasses"
// FieldIsVerified holds the string denoting the is_verified field in the database.
FieldIsVerified = "is_verified"
// FieldIsFabricated holds the string denoting the is_fabricated field in the database.
FieldIsFabricated = "is_fabricated"
// FieldIsSensitive holds the string denoting the is_sensitive field in the database.
FieldIsSensitive = "is_sensitive"
// FieldIsRetired holds the string denoting the is_retired field in the database.
FieldIsRetired = "is_retired"
// FieldIsSpamList holds the string denoting the is_spamlist field in the database.
FieldIsSpamList = "is_spam_list"
// FieldIsMalware holds the string denoting the is_malware field in the database.
FieldIsMalware = "is_malware"
// FieldLogo holds the string denoting the logo field in the database.
FieldLogo = "logo"
// Table holds the table name of the hibp in the database.
Table = "hib_ps"
)
// Columns holds all SQL columns for hibp fields.
var Columns = []string{
FieldID,
FieldName,
FieldDomain,
FieldBreachDate,
FieldAddedDate,
FieldModifiedDate,
FieldPwnCount,
FieldDescription,
FieldDataclasses,
FieldIsVerified,
FieldIsFabricated,
FieldIsSensitive,
FieldIsRetired,
FieldIsSpamList,
FieldIsMalware,
FieldLogo,
}
// 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 (
// DefaultIsVerified holds the default value on creation for the "is_verified" field.
DefaultIsVerified bool
// DefaultIsFabricated holds the default value on creation for the "is_fabricated" field.
DefaultIsFabricated bool
// DefaultIsSensitive holds the default value on creation for the "is_sensitive" field.
DefaultIsSensitive bool
// DefaultIsRetired holds the default value on creation for the "is_retired" field.
DefaultIsRetired bool
// DefaultIsSpamList holds the default value on creation for the "is_spamList" field.
DefaultIsSpamList bool
// DefaultIsMalware holds the default value on creation for the "is_malware" field.
DefaultIsMalware bool
)
// OrderOption defines the ordering options for the HIBP 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()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByDomain orders the results by the domain field.
func ByDomain(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDomain, opts...).ToFunc()
}
// ByBreachDate orders the results by the breach_date field.
func ByBreachDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBreachDate, opts...).ToFunc()
}
// ByAddedDate orders the results by the added_date field.
func ByAddedDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAddedDate, opts...).ToFunc()
}
// ByModifiedDate orders the results by the modified_date field.
func ByModifiedDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldModifiedDate, opts...).ToFunc()
}
// ByPwnCount orders the results by the pwn_count field.
func ByPwnCount(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPwnCount, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByIsVerified orders the results by the is_verified field.
func ByIsVerified(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsVerified, opts...).ToFunc()
}
// ByIsFabricated orders the results by the is_fabricated field.
func ByIsFabricated(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsFabricated, opts...).ToFunc()
}
// ByIsSensitive orders the results by the is_sensitive field.
func ByIsSensitive(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsSensitive, opts...).ToFunc()
}
// ByIsRetired orders the results by the is_retired field.
func ByIsRetired(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsRetired, opts...).ToFunc()
}
// ByIsSpamList orders the results by the is_spamList field.
func ByIsSpamList(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsSpamList, opts...).ToFunc()
}
// ByIsMalware orders the results by the is_malware field.
func ByIsMalware(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsMalware, opts...).ToFunc()
}
// ByLogo orders the results by the logo field.
func ByLogo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLogo, opts...).ToFunc()
}