crowdsec/pkg/database/ent/bouncer/bouncer.go

84 lines
2.8 KiB
Go
Raw Normal View History

// Code generated by entc, 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 (
2021-01-14 15:27:45 +00:00
// 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
2021-01-14 15:27:45 +00:00
// 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
2021-01-14 15:27:45 +00:00
// DefaultIPAddress holds the default value on creation for the "ip_address" field.
DefaultIPAddress string
2021-01-14 15:27:45 +00:00
// DefaultUntil holds the default value on creation for the "until" field.
DefaultUntil func() time.Time
2021-01-14 15:27:45 +00:00
// 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
)