host

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the host type in the database.
	Label = "host"
	// 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"
	// FieldIdentifier holds the string denoting the identifier field in the database.
	FieldIdentifier = "identifier"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldPrimaryIP holds the string denoting the primary_ip field in the database.
	FieldPrimaryIP = "primary_ip"
	// FieldPlatform holds the string denoting the platform field in the database.
	FieldPlatform = "platform"
	// FieldLastSeenAt holds the string denoting the last_seen_at field in the database.
	FieldLastSeenAt = "last_seen_at"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// EdgeBeacons holds the string denoting the beacons edge name in mutations.
	EdgeBeacons = "beacons"
	// EdgeFiles holds the string denoting the files edge name in mutations.
	EdgeFiles = "files"
	// EdgeProcesses holds the string denoting the processes edge name in mutations.
	EdgeProcesses = "processes"
	// EdgeCredentials holds the string denoting the credentials edge name in mutations.
	EdgeCredentials = "credentials"
	// Table holds the table name of the host in the database.
	Table = "hosts"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "host_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"
	// BeaconsTable is the table that holds the beacons relation/edge.
	BeaconsTable = "beacons"
	// BeaconsInverseTable is the table name for the Beacon entity.
	// It exists in this package in order to avoid circular dependency with the "beacon" package.
	BeaconsInverseTable = "beacons"
	// BeaconsColumn is the table column denoting the beacons relation/edge.
	BeaconsColumn = "beacon_host"
	// FilesTable is the table that holds the files relation/edge.
	FilesTable = "host_files"
	// FilesInverseTable is the table name for the HostFile entity.
	// It exists in this package in order to avoid circular dependency with the "hostfile" package.
	FilesInverseTable = "host_files"
	// FilesColumn is the table column denoting the files relation/edge.
	FilesColumn = "host_files"
	// ProcessesTable is the table that holds the processes relation/edge.
	ProcessesTable = "host_processes"
	// ProcessesInverseTable is the table name for the HostProcess entity.
	// It exists in this package in order to avoid circular dependency with the "hostprocess" package.
	ProcessesInverseTable = "host_processes"
	// ProcessesColumn is the table column denoting the processes relation/edge.
	ProcessesColumn = "host_processes"
	// CredentialsTable is the table that holds the credentials relation/edge.
	CredentialsTable = "host_credentials"
	// CredentialsInverseTable is the table name for the HostCredential entity.
	// It exists in this package in order to avoid circular dependency with the "hostcredential" package.
	CredentialsInverseTable = "host_credentials"
	// CredentialsColumn is the table column denoting the credentials relation/edge.
	CredentialsColumn = "host_credential_host"
)

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
	// IdentifierValidator is a validator for the "identifier" field. It is called by the builders before save.
	IdentifierValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

Columns holds all SQL columns for host fields.

View Source
var (
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"host_id", "tag_id"}
)

Functions

func And

func And(predicates ...predicate.Host) predicate.Host

And groups predicates with the AND operator between them.

func CreatedAt added in v0.0.5

func CreatedAt(v time.Time) predicate.Host

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.Host

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

func CreatedAtGT added in v0.0.5

func CreatedAtGT(v time.Time) predicate.Host

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

func CreatedAtGTE added in v0.0.5

func CreatedAtGTE(v time.Time) predicate.Host

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

func CreatedAtIn added in v0.0.5

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

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

func CreatedAtLT added in v0.0.5

func CreatedAtLT(v time.Time) predicate.Host

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

func CreatedAtLTE added in v0.0.5

func CreatedAtLTE(v time.Time) predicate.Host

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

func CreatedAtNEQ added in v0.0.5

func CreatedAtNEQ(v time.Time) predicate.Host

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

func CreatedAtNotIn added in v0.0.5

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

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

func HasBeacons

func HasBeacons() predicate.Host

HasBeacons applies the HasEdge predicate on the "beacons" edge.

func HasBeaconsWith

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

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

func HasCredentials added in v0.0.7

func HasCredentials() predicate.Host

HasCredentials applies the HasEdge predicate on the "credentials" edge.

func HasCredentialsWith added in v0.0.7

func HasCredentialsWith(preds ...predicate.HostCredential) predicate.Host

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

func HasFiles added in v0.0.5

func HasFiles() predicate.Host

HasFiles applies the HasEdge predicate on the "files" edge.

func HasFilesWith added in v0.0.5

func HasFilesWith(preds ...predicate.HostFile) predicate.Host

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

func HasProcesses added in v0.0.5

func HasProcesses() predicate.Host

HasProcesses applies the HasEdge predicate on the "processes" edge.

func HasProcessesWith added in v0.0.5

func HasProcessesWith(preds ...predicate.HostProcess) predicate.Host

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

func HasTags

func HasTags() predicate.Host

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

func HasTagsWith

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

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

func ID

func ID(id int) predicate.Host

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Host

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Host

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Host

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Host

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Host

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Host

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Identifier

func Identifier(v string) predicate.Host

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

func IdentifierContains

func IdentifierContains(v string) predicate.Host

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

func IdentifierContainsFold

func IdentifierContainsFold(v string) predicate.Host

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

func IdentifierEQ

func IdentifierEQ(v string) predicate.Host

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

func IdentifierEqualFold

func IdentifierEqualFold(v string) predicate.Host

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

func IdentifierGT

func IdentifierGT(v string) predicate.Host

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

func IdentifierGTE

func IdentifierGTE(v string) predicate.Host

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

func IdentifierHasPrefix

func IdentifierHasPrefix(v string) predicate.Host

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

func IdentifierHasSuffix

func IdentifierHasSuffix(v string) predicate.Host

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

func IdentifierIn

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

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

func IdentifierLT

func IdentifierLT(v string) predicate.Host

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

func IdentifierLTE

func IdentifierLTE(v string) predicate.Host

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

func IdentifierNEQ

func IdentifierNEQ(v string) predicate.Host

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

func IdentifierNotIn

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

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

func LastModifiedAt added in v0.0.5

func LastModifiedAt(v time.Time) predicate.Host

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.Host

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

func LastModifiedAtGT added in v0.0.5

func LastModifiedAtGT(v time.Time) predicate.Host

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

func LastModifiedAtGTE added in v0.0.5

func LastModifiedAtGTE(v time.Time) predicate.Host

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

func LastModifiedAtIn added in v0.0.5

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

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

func LastModifiedAtLT added in v0.0.5

func LastModifiedAtLT(v time.Time) predicate.Host

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

func LastModifiedAtLTE added in v0.0.5

func LastModifiedAtLTE(v time.Time) predicate.Host

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

func LastModifiedAtNEQ added in v0.0.5

func LastModifiedAtNEQ(v time.Time) predicate.Host

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

func LastModifiedAtNotIn added in v0.0.5

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

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

func LastSeenAt

func LastSeenAt(v time.Time) predicate.Host

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

func LastSeenAtEQ

func LastSeenAtEQ(v time.Time) predicate.Host

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

func LastSeenAtGT

func LastSeenAtGT(v time.Time) predicate.Host

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

func LastSeenAtGTE

func LastSeenAtGTE(v time.Time) predicate.Host

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

func LastSeenAtIn

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

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

func LastSeenAtIsNil

func LastSeenAtIsNil() predicate.Host

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

func LastSeenAtLT

func LastSeenAtLT(v time.Time) predicate.Host

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

func LastSeenAtLTE

func LastSeenAtLTE(v time.Time) predicate.Host

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

func LastSeenAtNEQ

func LastSeenAtNEQ(v time.Time) predicate.Host

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

func LastSeenAtNotIn

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

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

func LastSeenAtNotNil

func LastSeenAtNotNil() predicate.Host

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

func Name

func Name(v string) predicate.Host

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

func NameContains

func NameContains(v string) predicate.Host

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

func NameContainsFold

func NameContainsFold(v string) predicate.Host

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

func NameEQ

func NameEQ(v string) predicate.Host

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

func NameEqualFold

func NameEqualFold(v string) predicate.Host

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

func NameGT

func NameGT(v string) predicate.Host

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

func NameGTE

func NameGTE(v string) predicate.Host

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Host

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Host

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

func NameIn

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

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

func NameIsNil

func NameIsNil() predicate.Host

NameIsNil applies the IsNil predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Host

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

func NameLTE

func NameLTE(v string) predicate.Host

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

func NameNEQ

func NameNEQ(v string) predicate.Host

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

func NameNotIn

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

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

func NameNotNil

func NameNotNil() predicate.Host

NameNotNil applies the NotNil predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Host) predicate.Host

Or groups predicates with the OR operator between them.

func PlatformEQ

func PlatformEQ(v c2pb.Host_Platform) predicate.Host

PlatformEQ applies the EQ predicate on the "platform" field.

func PlatformIn

func PlatformIn(vs ...c2pb.Host_Platform) predicate.Host

PlatformIn applies the In predicate on the "platform" field.

func PlatformNEQ

func PlatformNEQ(v c2pb.Host_Platform) predicate.Host

PlatformNEQ applies the NEQ predicate on the "platform" field.

func PlatformNotIn

func PlatformNotIn(vs ...c2pb.Host_Platform) predicate.Host

PlatformNotIn applies the NotIn predicate on the "platform" field.

func PlatformValidator

func PlatformValidator(pl c2pb.Host_Platform) error

PlatformValidator is a validator for the "platform" field enum values. It is called by the builders before save.

func PrimaryIP

func PrimaryIP(v string) predicate.Host

PrimaryIP applies equality check predicate on the "primary_ip" field. It's identical to PrimaryIPEQ.

func PrimaryIPContains

func PrimaryIPContains(v string) predicate.Host

PrimaryIPContains applies the Contains predicate on the "primary_ip" field.

func PrimaryIPContainsFold

func PrimaryIPContainsFold(v string) predicate.Host

PrimaryIPContainsFold applies the ContainsFold predicate on the "primary_ip" field.

func PrimaryIPEQ

func PrimaryIPEQ(v string) predicate.Host

PrimaryIPEQ applies the EQ predicate on the "primary_ip" field.

func PrimaryIPEqualFold

func PrimaryIPEqualFold(v string) predicate.Host

PrimaryIPEqualFold applies the EqualFold predicate on the "primary_ip" field.

func PrimaryIPGT

func PrimaryIPGT(v string) predicate.Host

PrimaryIPGT applies the GT predicate on the "primary_ip" field.

func PrimaryIPGTE

func PrimaryIPGTE(v string) predicate.Host

PrimaryIPGTE applies the GTE predicate on the "primary_ip" field.

func PrimaryIPHasPrefix

func PrimaryIPHasPrefix(v string) predicate.Host

PrimaryIPHasPrefix applies the HasPrefix predicate on the "primary_ip" field.

func PrimaryIPHasSuffix

func PrimaryIPHasSuffix(v string) predicate.Host

PrimaryIPHasSuffix applies the HasSuffix predicate on the "primary_ip" field.

func PrimaryIPIn

func PrimaryIPIn(vs ...string) predicate.Host

PrimaryIPIn applies the In predicate on the "primary_ip" field.

func PrimaryIPIsNil

func PrimaryIPIsNil() predicate.Host

PrimaryIPIsNil applies the IsNil predicate on the "primary_ip" field.

func PrimaryIPLT

func PrimaryIPLT(v string) predicate.Host

PrimaryIPLT applies the LT predicate on the "primary_ip" field.

func PrimaryIPLTE

func PrimaryIPLTE(v string) predicate.Host

PrimaryIPLTE applies the LTE predicate on the "primary_ip" field.

func PrimaryIPNEQ

func PrimaryIPNEQ(v string) predicate.Host

PrimaryIPNEQ applies the NEQ predicate on the "primary_ip" field.

func PrimaryIPNotIn

func PrimaryIPNotIn(vs ...string) predicate.Host

PrimaryIPNotIn applies the NotIn predicate on the "primary_ip" field.

func PrimaryIPNotNil

func PrimaryIPNotNil() predicate.Host

PrimaryIPNotNil applies the NotNil predicate on the "primary_ip" 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 Host queries.

func ByBeacons

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

ByBeacons orders the results by beacons terms.

func ByBeaconsCount

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

ByBeaconsCount orders the results by beacons count.

func ByCreatedAt added in v0.0.5

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

ByCreatedAt orders the results by the created_at field.

func ByCredentials added in v0.0.7

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

ByCredentials orders the results by credentials terms.

func ByCredentialsCount added in v0.0.7

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

ByCredentialsCount orders the results by credentials count.

func ByFiles added in v0.0.5

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

ByFiles orders the results by files terms.

func ByFilesCount added in v0.0.5

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

ByFilesCount orders the results by files count.

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 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 ByPlatform

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

ByPlatform orders the results by the platform field.

func ByPrimaryIP

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

ByPrimaryIP orders the results by the primary_ip field.

func ByProcesses added in v0.0.5

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

ByProcesses orders the results by processes terms.

func ByProcessesCount added in v0.0.5

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

ByProcessesCount orders the results by processes count.

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