agent

package
v0.0.0-...-3be0946 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for agent fields.

View Source
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 And

func And(predicates ...predicate.Agent) predicate.Agent

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Agent

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Agent

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Agent

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Agent

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Agent

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Agent

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Agent

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Agent

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Agent

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasTags

func HasTags() predicate.Agent

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Agent

HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).

func Hostname

func Hostname(v string) predicate.Agent

Hostname applies equality check predicate on the "hostname" field. It's identical to HostnameEQ.

func HostnameContains

func HostnameContains(v string) predicate.Agent

HostnameContains applies the Contains predicate on the "hostname" field.

func HostnameContainsFold

func HostnameContainsFold(v string) predicate.Agent

HostnameContainsFold applies the ContainsFold predicate on the "hostname" field.

func HostnameEQ

func HostnameEQ(v string) predicate.Agent

HostnameEQ applies the EQ predicate on the "hostname" field.

func HostnameEqualFold

func HostnameEqualFold(v string) predicate.Agent

HostnameEqualFold applies the EqualFold predicate on the "hostname" field.

func HostnameGT

func HostnameGT(v string) predicate.Agent

HostnameGT applies the GT predicate on the "hostname" field.

func HostnameGTE

func HostnameGTE(v string) predicate.Agent

HostnameGTE applies the GTE predicate on the "hostname" field.

func HostnameHasPrefix

func HostnameHasPrefix(v string) predicate.Agent

HostnameHasPrefix applies the HasPrefix predicate on the "hostname" field.

func HostnameHasSuffix

func HostnameHasSuffix(v string) predicate.Agent

HostnameHasSuffix applies the HasSuffix predicate on the "hostname" field.

func HostnameIn

func HostnameIn(vs ...string) predicate.Agent

HostnameIn applies the In predicate on the "hostname" field.

func HostnameLT

func HostnameLT(v string) predicate.Agent

HostnameLT applies the LT predicate on the "hostname" field.

func HostnameLTE

func HostnameLTE(v string) predicate.Agent

HostnameLTE applies the LTE predicate on the "hostname" field.

func HostnameNEQ

func HostnameNEQ(v string) predicate.Agent

HostnameNEQ applies the NEQ predicate on the "hostname" field.

func HostnameNotIn

func HostnameNotIn(vs ...string) predicate.Agent

HostnameNotIn applies the NotIn predicate on the "hostname" field.

func ID

func ID(id int) predicate.Agent

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Agent

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Agent

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Agent

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Agent

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Agent

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Agent

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Agent

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Agent

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Agent) predicate.Agent

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL