crowdsec/pkg/database/ent/bouncer/bouncer.go
AlteredCoder b95a67751e
Update ent and grokky package (#1772)
* Update ent and grokky package
2022-10-06 14:55:42 +02:00

84 lines
2.8 KiB
Go

// Code generated by ent, DO NOT EDIT.
package bouncer
import (
"time"
)
const (
// Label holds the string label denoting the bouncer type in the database.
Label = "bouncer"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldAPIKey holds the string denoting the api_key field in the database.
FieldAPIKey = "api_key"
// FieldRevoked holds the string denoting the revoked field in the database.
FieldRevoked = "revoked"
// FieldIPAddress holds the string denoting the ip_address field in the database.
FieldIPAddress = "ip_address"
// FieldType holds the string denoting the type field in the database.
FieldType = "type"
// FieldVersion holds the string denoting the version field in the database.
FieldVersion = "version"
// FieldUntil holds the string denoting the until field in the database.
FieldUntil = "until"
// FieldLastPull holds the string denoting the last_pull field in the database.
FieldLastPull = "last_pull"
// FieldAuthType holds the string denoting the auth_type field in the database.
FieldAuthType = "auth_type"
// Table holds the table name of the bouncer in the database.
Table = "bouncers"
)
// Columns holds all SQL columns for bouncer fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldName,
FieldAPIKey,
FieldRevoked,
FieldIPAddress,
FieldType,
FieldVersion,
FieldUntil,
FieldLastPull,
FieldAuthType,
}
// 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 (
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// UpdateDefaultCreatedAt holds the default value on update for the "created_at" field.
UpdateDefaultCreatedAt func() time.Time
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() time.Time
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
UpdateDefaultUpdatedAt func() time.Time
// DefaultIPAddress holds the default value on creation for the "ip_address" field.
DefaultIPAddress string
// DefaultUntil holds the default value on creation for the "until" field.
DefaultUntil func() time.Time
// DefaultLastPull holds the default value on creation for the "last_pull" field.
DefaultLastPull func() time.Time
// DefaultAuthType holds the default value on creation for the "auth_type" field.
DefaultAuthType string
)