beacon

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the beacon type in the database.
	Label = "beacon"
	// 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"
	// FieldLastModifiedAt holds the string denoting the last_modified_at field in the database.
	FieldLastModifiedAt = "last_modified_at"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldPrincipal holds the string denoting the principal field in the database.
	FieldPrincipal = "principal"
	// FieldIdentifier holds the string denoting the identifier field in the database.
	FieldIdentifier = "identifier"
	// FieldAgentIdentifier holds the string denoting the agent_identifier field in the database.
	FieldAgentIdentifier = "agent_identifier"
	// FieldLastSeenAt holds the string denoting the last_seen_at field in the database.
	FieldLastSeenAt = "last_seen_at"
	// FieldInterval holds the string denoting the interval field in the database.
	FieldInterval = "interval"
	// EdgeHost holds the string denoting the host edge name in mutations.
	EdgeHost = "host"
	// EdgeTasks holds the string denoting the tasks edge name in mutations.
	EdgeTasks = "tasks"
	// Table holds the table name of the beacon in the database.
	Table = "beacons"
	// HostTable is the table that holds the host relation/edge.
	HostTable = "beacons"
	// HostInverseTable is the table name for the Host entity.
	// It exists in this package in order to avoid circular dependency with the "host" package.
	HostInverseTable = "hosts"
	// HostColumn is the table column denoting the host relation/edge.
	HostColumn = "beacon_host"
	// TasksTable is the table that holds the tasks relation/edge.
	TasksTable = "tasks"
	// TasksInverseTable is the table name for the Task entity.
	// It exists in this package in order to avoid circular dependency with the "task" package.
	TasksInverseTable = "tasks"
	// TasksColumn is the table column denoting the tasks relation/edge.
	TasksColumn = "task_beacon"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultLastModifiedAt holds the default value on creation for the "last_modified_at" field.
	DefaultLastModifiedAt func() time.Time
	// UpdateDefaultLastModifiedAt holds the default value on update for the "last_modified_at" field.
	UpdateDefaultLastModifiedAt func() time.Time
	// DefaultName holds the default value on creation for the "name" field.
	DefaultName func() string
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// PrincipalValidator is a validator for the "principal" field. It is called by the builders before save.
	PrincipalValidator func(string) error
	// DefaultIdentifier holds the default value on creation for the "identifier" field.
	DefaultIdentifier func() string
	// IdentifierValidator is a validator for the "identifier" field. It is called by the builders before save.
	IdentifierValidator func(string) error
	// AgentIdentifierValidator is a validator for the "agent_identifier" field. It is called by the builders before save.
	AgentIdentifierValidator func(string) error
)

Columns holds all SQL columns for beacon fields.

View Source
var ForeignKeys = []string{
	"beacon_host",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "beacons" table and are not defined as standalone fields in the schema.

Functions

func AgentIdentifier

func AgentIdentifier(v string) predicate.Beacon

AgentIdentifier applies equality check predicate on the "agent_identifier" field. It's identical to AgentIdentifierEQ.

func AgentIdentifierContains

func AgentIdentifierContains(v string) predicate.Beacon

AgentIdentifierContains applies the Contains predicate on the "agent_identifier" field.

func AgentIdentifierContainsFold

func AgentIdentifierContainsFold(v string) predicate.Beacon

AgentIdentifierContainsFold applies the ContainsFold predicate on the "agent_identifier" field.

func AgentIdentifierEQ

func AgentIdentifierEQ(v string) predicate.Beacon

AgentIdentifierEQ applies the EQ predicate on the "agent_identifier" field.

func AgentIdentifierEqualFold

func AgentIdentifierEqualFold(v string) predicate.Beacon

AgentIdentifierEqualFold applies the EqualFold predicate on the "agent_identifier" field.

func AgentIdentifierGT

func AgentIdentifierGT(v string) predicate.Beacon

AgentIdentifierGT applies the GT predicate on the "agent_identifier" field.

func AgentIdentifierGTE

func AgentIdentifierGTE(v string) predicate.Beacon

AgentIdentifierGTE applies the GTE predicate on the "agent_identifier" field.

func AgentIdentifierHasPrefix

func AgentIdentifierHasPrefix(v string) predicate.Beacon

AgentIdentifierHasPrefix applies the HasPrefix predicate on the "agent_identifier" field.

func AgentIdentifierHasSuffix

func AgentIdentifierHasSuffix(v string) predicate.Beacon

AgentIdentifierHasSuffix applies the HasSuffix predicate on the "agent_identifier" field.

func AgentIdentifierIn

func AgentIdentifierIn(vs ...string) predicate.Beacon

AgentIdentifierIn applies the In predicate on the "agent_identifier" field.

func AgentIdentifierIsNil

func AgentIdentifierIsNil() predicate.Beacon

AgentIdentifierIsNil applies the IsNil predicate on the "agent_identifier" field.

func AgentIdentifierLT

func AgentIdentifierLT(v string) predicate.Beacon

AgentIdentifierLT applies the LT predicate on the "agent_identifier" field.

func AgentIdentifierLTE

func AgentIdentifierLTE(v string) predicate.Beacon

AgentIdentifierLTE applies the LTE predicate on the "agent_identifier" field.

func AgentIdentifierNEQ

func AgentIdentifierNEQ(v string) predicate.Beacon

AgentIdentifierNEQ applies the NEQ predicate on the "agent_identifier" field.

func AgentIdentifierNotIn

func AgentIdentifierNotIn(vs ...string) predicate.Beacon

AgentIdentifierNotIn applies the NotIn predicate on the "agent_identifier" field.

func AgentIdentifierNotNil

func AgentIdentifierNotNil() predicate.Beacon

AgentIdentifierNotNil applies the NotNil predicate on the "agent_identifier" field.

func And

func And(predicates ...predicate.Beacon) predicate.Beacon

And groups predicates with the AND operator between them.

func CreatedAt added in v0.0.5

func CreatedAt(v time.Time) predicate.Beacon

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

func CreatedAtEQ added in v0.0.5

func CreatedAtEQ(v time.Time) predicate.Beacon

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

func CreatedAtGT added in v0.0.5

func CreatedAtGT(v time.Time) predicate.Beacon

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

func CreatedAtGTE added in v0.0.5

func CreatedAtGTE(v time.Time) predicate.Beacon

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

func CreatedAtIn added in v0.0.5

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

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

func CreatedAtLT added in v0.0.5

func CreatedAtLT(v time.Time) predicate.Beacon

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

func CreatedAtLTE added in v0.0.5

func CreatedAtLTE(v time.Time) predicate.Beacon

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

func CreatedAtNEQ added in v0.0.5

func CreatedAtNEQ(v time.Time) predicate.Beacon

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

func CreatedAtNotIn added in v0.0.5

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

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

func HasHost

func HasHost() predicate.Beacon

HasHost applies the HasEdge predicate on the "host" edge.

func HasHostWith

func HasHostWith(preds ...predicate.Host) predicate.Beacon

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

func HasTasks

func HasTasks() predicate.Beacon

HasTasks applies the HasEdge predicate on the "tasks" edge.

func HasTasksWith

func HasTasksWith(preds ...predicate.Task) predicate.Beacon

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

func ID

func ID(id int) predicate.Beacon

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Beacon

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Beacon

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Beacon

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Beacon

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Beacon

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Beacon

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Identifier

func Identifier(v string) predicate.Beacon

Identifier applies equality check predicate on the "identifier" field. It's identical to IdentifierEQ.

func IdentifierContains

func IdentifierContains(v string) predicate.Beacon

IdentifierContains applies the Contains predicate on the "identifier" field.

func IdentifierContainsFold

func IdentifierContainsFold(v string) predicate.Beacon

IdentifierContainsFold applies the ContainsFold predicate on the "identifier" field.

func IdentifierEQ

func IdentifierEQ(v string) predicate.Beacon

IdentifierEQ applies the EQ predicate on the "identifier" field.

func IdentifierEqualFold

func IdentifierEqualFold(v string) predicate.Beacon

IdentifierEqualFold applies the EqualFold predicate on the "identifier" field.

func IdentifierGT

func IdentifierGT(v string) predicate.Beacon

IdentifierGT applies the GT predicate on the "identifier" field.

func IdentifierGTE

func IdentifierGTE(v string) predicate.Beacon

IdentifierGTE applies the GTE predicate on the "identifier" field.

func IdentifierHasPrefix

func IdentifierHasPrefix(v string) predicate.Beacon

IdentifierHasPrefix applies the HasPrefix predicate on the "identifier" field.

func IdentifierHasSuffix

func IdentifierHasSuffix(v string) predicate.Beacon

IdentifierHasSuffix applies the HasSuffix predicate on the "identifier" field.

func IdentifierIn

func IdentifierIn(vs ...string) predicate.Beacon

IdentifierIn applies the In predicate on the "identifier" field.

func IdentifierLT

func IdentifierLT(v string) predicate.Beacon

IdentifierLT applies the LT predicate on the "identifier" field.

func IdentifierLTE

func IdentifierLTE(v string) predicate.Beacon

IdentifierLTE applies the LTE predicate on the "identifier" field.

func IdentifierNEQ

func IdentifierNEQ(v string) predicate.Beacon

IdentifierNEQ applies the NEQ predicate on the "identifier" field.

func IdentifierNotIn

func IdentifierNotIn(vs ...string) predicate.Beacon

IdentifierNotIn applies the NotIn predicate on the "identifier" field.

func Interval

func Interval(v uint64) predicate.Beacon

Interval applies equality check predicate on the "interval" field. It's identical to IntervalEQ.

func IntervalEQ

func IntervalEQ(v uint64) predicate.Beacon

IntervalEQ applies the EQ predicate on the "interval" field.

func IntervalGT

func IntervalGT(v uint64) predicate.Beacon

IntervalGT applies the GT predicate on the "interval" field.

func IntervalGTE

func IntervalGTE(v uint64) predicate.Beacon

IntervalGTE applies the GTE predicate on the "interval" field.

func IntervalIn

func IntervalIn(vs ...uint64) predicate.Beacon

IntervalIn applies the In predicate on the "interval" field.

func IntervalIsNil

func IntervalIsNil() predicate.Beacon

IntervalIsNil applies the IsNil predicate on the "interval" field.

func IntervalLT

func IntervalLT(v uint64) predicate.Beacon

IntervalLT applies the LT predicate on the "interval" field.

func IntervalLTE

func IntervalLTE(v uint64) predicate.Beacon

IntervalLTE applies the LTE predicate on the "interval" field.

func IntervalNEQ

func IntervalNEQ(v uint64) predicate.Beacon

IntervalNEQ applies the NEQ predicate on the "interval" field.

func IntervalNotIn

func IntervalNotIn(vs ...uint64) predicate.Beacon

IntervalNotIn applies the NotIn predicate on the "interval" field.

func IntervalNotNil

func IntervalNotNil() predicate.Beacon

IntervalNotNil applies the NotNil predicate on the "interval" field.

func LastModifiedAt added in v0.0.5

func LastModifiedAt(v time.Time) predicate.Beacon

LastModifiedAt applies equality check predicate on the "last_modified_at" field. It's identical to LastModifiedAtEQ.

func LastModifiedAtEQ added in v0.0.5

func LastModifiedAtEQ(v time.Time) predicate.Beacon

LastModifiedAtEQ applies the EQ predicate on the "last_modified_at" field.

func LastModifiedAtGT added in v0.0.5

func LastModifiedAtGT(v time.Time) predicate.Beacon

LastModifiedAtGT applies the GT predicate on the "last_modified_at" field.

func LastModifiedAtGTE added in v0.0.5

func LastModifiedAtGTE(v time.Time) predicate.Beacon

LastModifiedAtGTE applies the GTE predicate on the "last_modified_at" field.

func LastModifiedAtIn added in v0.0.5

func LastModifiedAtIn(vs ...time.Time) predicate.Beacon

LastModifiedAtIn applies the In predicate on the "last_modified_at" field.

func LastModifiedAtLT added in v0.0.5

func LastModifiedAtLT(v time.Time) predicate.Beacon

LastModifiedAtLT applies the LT predicate on the "last_modified_at" field.

func LastModifiedAtLTE added in v0.0.5

func LastModifiedAtLTE(v time.Time) predicate.Beacon

LastModifiedAtLTE applies the LTE predicate on the "last_modified_at" field.

func LastModifiedAtNEQ added in v0.0.5

func LastModifiedAtNEQ(v time.Time) predicate.Beacon

LastModifiedAtNEQ applies the NEQ predicate on the "last_modified_at" field.

func LastModifiedAtNotIn added in v0.0.5

func LastModifiedAtNotIn(vs ...time.Time) predicate.Beacon

LastModifiedAtNotIn applies the NotIn predicate on the "last_modified_at" field.

func LastSeenAt

func LastSeenAt(v time.Time) predicate.Beacon

LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ.

func LastSeenAtEQ

func LastSeenAtEQ(v time.Time) predicate.Beacon

LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field.

func LastSeenAtGT

func LastSeenAtGT(v time.Time) predicate.Beacon

LastSeenAtGT applies the GT predicate on the "last_seen_at" field.

func LastSeenAtGTE

func LastSeenAtGTE(v time.Time) predicate.Beacon

LastSeenAtGTE applies the GTE predicate on the "last_seen_at" field.

func LastSeenAtIn

func LastSeenAtIn(vs ...time.Time) predicate.Beacon

LastSeenAtIn applies the In predicate on the "last_seen_at" field.

func LastSeenAtIsNil

func LastSeenAtIsNil() predicate.Beacon

LastSeenAtIsNil applies the IsNil predicate on the "last_seen_at" field.

func LastSeenAtLT

func LastSeenAtLT(v time.Time) predicate.Beacon

LastSeenAtLT applies the LT predicate on the "last_seen_at" field.

func LastSeenAtLTE

func LastSeenAtLTE(v time.Time) predicate.Beacon

LastSeenAtLTE applies the LTE predicate on the "last_seen_at" field.

func LastSeenAtNEQ

func LastSeenAtNEQ(v time.Time) predicate.Beacon

LastSeenAtNEQ applies the NEQ predicate on the "last_seen_at" field.

func LastSeenAtNotIn

func LastSeenAtNotIn(vs ...time.Time) predicate.Beacon

LastSeenAtNotIn applies the NotIn predicate on the "last_seen_at" field.

func LastSeenAtNotNil

func LastSeenAtNotNil() predicate.Beacon

LastSeenAtNotNil applies the NotNil predicate on the "last_seen_at" field.

func Name

func Name(v string) predicate.Beacon

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Beacon

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Beacon

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Beacon

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Beacon

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Beacon

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Beacon

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Beacon

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Beacon

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Beacon

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Beacon

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Beacon

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Beacon

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Beacon

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Beacon) predicate.Beacon

Or groups predicates with the OR operator between them.

func Principal

func Principal(v string) predicate.Beacon

Principal applies equality check predicate on the "principal" field. It's identical to PrincipalEQ.

func PrincipalContains

func PrincipalContains(v string) predicate.Beacon

PrincipalContains applies the Contains predicate on the "principal" field.

func PrincipalContainsFold

func PrincipalContainsFold(v string) predicate.Beacon

PrincipalContainsFold applies the ContainsFold predicate on the "principal" field.

func PrincipalEQ

func PrincipalEQ(v string) predicate.Beacon

PrincipalEQ applies the EQ predicate on the "principal" field.

func PrincipalEqualFold

func PrincipalEqualFold(v string) predicate.Beacon

PrincipalEqualFold applies the EqualFold predicate on the "principal" field.

func PrincipalGT

func PrincipalGT(v string) predicate.Beacon

PrincipalGT applies the GT predicate on the "principal" field.

func PrincipalGTE

func PrincipalGTE(v string) predicate.Beacon

PrincipalGTE applies the GTE predicate on the "principal" field.

func PrincipalHasPrefix

func PrincipalHasPrefix(v string) predicate.Beacon

PrincipalHasPrefix applies the HasPrefix predicate on the "principal" field.

func PrincipalHasSuffix

func PrincipalHasSuffix(v string) predicate.Beacon

PrincipalHasSuffix applies the HasSuffix predicate on the "principal" field.

func PrincipalIn

func PrincipalIn(vs ...string) predicate.Beacon

PrincipalIn applies the In predicate on the "principal" field.

func PrincipalIsNil

func PrincipalIsNil() predicate.Beacon

PrincipalIsNil applies the IsNil predicate on the "principal" field.

func PrincipalLT

func PrincipalLT(v string) predicate.Beacon

PrincipalLT applies the LT predicate on the "principal" field.

func PrincipalLTE

func PrincipalLTE(v string) predicate.Beacon

PrincipalLTE applies the LTE predicate on the "principal" field.

func PrincipalNEQ

func PrincipalNEQ(v string) predicate.Beacon

PrincipalNEQ applies the NEQ predicate on the "principal" field.

func PrincipalNotIn

func PrincipalNotIn(vs ...string) predicate.Beacon

PrincipalNotIn applies the NotIn predicate on the "principal" field.

func PrincipalNotNil

func PrincipalNotNil() predicate.Beacon

PrincipalNotNil applies the NotNil predicate on the "principal" field.

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 Beacon queries.

func ByAgentIdentifier

func ByAgentIdentifier(opts ...sql.OrderTermOption) OrderOption

ByAgentIdentifier orders the results by the agent_identifier field.

func ByCreatedAt added in v0.0.5

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByHostField

func ByHostField(field string, opts ...sql.OrderTermOption) OrderOption

ByHostField orders the results by host field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIdentifier

func ByIdentifier(opts ...sql.OrderTermOption) OrderOption

ByIdentifier orders the results by the identifier field.

func ByInterval

func ByInterval(opts ...sql.OrderTermOption) OrderOption

ByInterval orders the results by the interval field.

func ByLastModifiedAt added in v0.0.5

func ByLastModifiedAt(opts ...sql.OrderTermOption) OrderOption

ByLastModifiedAt orders the results by the last_modified_at field.

func ByLastSeenAt

func ByLastSeenAt(opts ...sql.OrderTermOption) OrderOption

ByLastSeenAt orders the results by the last_seen_at field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByPrincipal

func ByPrincipal(opts ...sql.OrderTermOption) OrderOption

ByPrincipal orders the results by the principal field.

func ByTasks

func ByTasks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByTasks orders the results by tasks terms.

func ByTasksCount

func ByTasksCount(opts ...sql.OrderTermOption) OrderOption

ByTasksCount orders the results by tasks count.

Jump to

Keyboard shortcuts

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