Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Agent) predicate.Agent
- func CreatedAt(v time.Time) predicate.Agent
- func CreatedAtEQ(v time.Time) predicate.Agent
- func CreatedAtGT(v time.Time) predicate.Agent
- func CreatedAtGTE(v time.Time) predicate.Agent
- func CreatedAtIn(vs ...time.Time) predicate.Agent
- func CreatedAtLT(v time.Time) predicate.Agent
- func CreatedAtLTE(v time.Time) predicate.Agent
- func CreatedAtNEQ(v time.Time) predicate.Agent
- func CreatedAtNotIn(vs ...time.Time) predicate.Agent
- func HasTags() predicate.Agent
- func HasTagsWith(preds ...predicate.Tag) predicate.Agent
- func Hostname(v string) predicate.Agent
- func HostnameContains(v string) predicate.Agent
- func HostnameContainsFold(v string) predicate.Agent
- func HostnameEQ(v string) predicate.Agent
- func HostnameEqualFold(v string) predicate.Agent
- func HostnameGT(v string) predicate.Agent
- func HostnameGTE(v string) predicate.Agent
- func HostnameHasPrefix(v string) predicate.Agent
- func HostnameHasSuffix(v string) predicate.Agent
- func HostnameIn(vs ...string) predicate.Agent
- func HostnameLT(v string) predicate.Agent
- func HostnameLTE(v string) predicate.Agent
- func HostnameNEQ(v string) predicate.Agent
- func HostnameNotIn(vs ...string) predicate.Agent
- func ID(id int) predicate.Agent
- func IDEQ(id int) predicate.Agent
- func IDGT(id int) predicate.Agent
- func IDGTE(id int) predicate.Agent
- func IDIn(ids ...int) predicate.Agent
- func IDLT(id int) predicate.Agent
- func IDLTE(id int) predicate.Agent
- func IDNEQ(id int) predicate.Agent
- func IDNotIn(ids ...int) predicate.Agent
- func Not(p predicate.Agent) predicate.Agent
- func Or(predicates ...predicate.Agent) predicate.Agent
- func ValidColumn(column string) bool
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the agent type in the database. Label = "agent" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldHostname holds the string denoting the hostname field in the database. FieldHostname = "hostname" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeTags holds the string denoting the tags edge name in mutations. EdgeTags = "tags" // Table holds the table name of the agent in the database. Table = "agents" // TagsTable is the table that holds the tags relation/edge. The primary key declared below. TagsTable = "agent_tags" // TagsInverseTable is the table name for the Tag entity. // It exists in this package in order to avoid circular dependency with the "tag" package. TagsInverseTable = "tags" )
Variables ¶
var ( // HostnameValidator is a validator for the "hostname" field. It is called by the builders before save. HostnameValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldHostname, FieldCreatedAt, }
Columns holds all SQL columns for agent fields.
var ( // TagsPrimaryKey and TagsColumn2 are the table columns denoting the // primary key for the tags relation (M2M). TagsPrimaryKey = []string{"agent_id", "tag_id"} )
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func Hostname ¶
Hostname applies equality check predicate on the "hostname" field. It's identical to HostnameEQ.
func HostnameContains ¶
HostnameContains applies the Contains predicate on the "hostname" field.
func HostnameContainsFold ¶
HostnameContainsFold applies the ContainsFold predicate on the "hostname" field.
func HostnameEQ ¶
HostnameEQ applies the EQ predicate on the "hostname" field.
func HostnameEqualFold ¶
HostnameEqualFold applies the EqualFold predicate on the "hostname" field.
func HostnameGT ¶
HostnameGT applies the GT predicate on the "hostname" field.
func HostnameGTE ¶
HostnameGTE applies the GTE predicate on the "hostname" field.
func HostnameHasPrefix ¶
HostnameHasPrefix applies the HasPrefix predicate on the "hostname" field.
func HostnameHasSuffix ¶
HostnameHasSuffix applies the HasSuffix predicate on the "hostname" field.
func HostnameIn ¶
HostnameIn applies the In predicate on the "hostname" field.
func HostnameLT ¶
HostnameLT applies the LT predicate on the "hostname" field.
func HostnameLTE ¶
HostnameLTE applies the LTE predicate on the "hostname" field.
func HostnameNEQ ¶
HostnameNEQ applies the NEQ predicate on the "hostname" field.
func HostnameNotIn ¶
HostnameNotIn applies the NotIn predicate on the "hostname" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Agent queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByHostname ¶
func ByHostname(opts ...sql.OrderTermOption) OrderOption
ByHostname orders the results by the hostname field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByTags ¶
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTags orders the results by tags terms.
func ByTagsCount ¶
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
ByTagsCount orders the results by tags count.