Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Host) predicate.Host
- func CreatedAt(v time.Time) predicate.Host
- func CreatedAtEQ(v time.Time) predicate.Host
- func CreatedAtGT(v time.Time) predicate.Host
- func CreatedAtGTE(v time.Time) predicate.Host
- func CreatedAtIn(vs ...time.Time) predicate.Host
- func CreatedAtLT(v time.Time) predicate.Host
- func CreatedAtLTE(v time.Time) predicate.Host
- func CreatedAtNEQ(v time.Time) predicate.Host
- func CreatedAtNotIn(vs ...time.Time) predicate.Host
- func HasBeacons() predicate.Host
- func HasBeaconsWith(preds ...predicate.Beacon) predicate.Host
- func HasCredentials() predicate.Host
- func HasCredentialsWith(preds ...predicate.HostCredential) predicate.Host
- func HasFiles() predicate.Host
- func HasFilesWith(preds ...predicate.HostFile) predicate.Host
- func HasProcesses() predicate.Host
- func HasProcessesWith(preds ...predicate.HostProcess) predicate.Host
- func HasTags() predicate.Host
- func HasTagsWith(preds ...predicate.Tag) predicate.Host
- func ID(id int) predicate.Host
- func IDEQ(id int) predicate.Host
- func IDGT(id int) predicate.Host
- func IDGTE(id int) predicate.Host
- func IDIn(ids ...int) predicate.Host
- func IDLT(id int) predicate.Host
- func IDLTE(id int) predicate.Host
- func IDNEQ(id int) predicate.Host
- func IDNotIn(ids ...int) predicate.Host
- func Identifier(v string) predicate.Host
- func IdentifierContains(v string) predicate.Host
- func IdentifierContainsFold(v string) predicate.Host
- func IdentifierEQ(v string) predicate.Host
- func IdentifierEqualFold(v string) predicate.Host
- func IdentifierGT(v string) predicate.Host
- func IdentifierGTE(v string) predicate.Host
- func IdentifierHasPrefix(v string) predicate.Host
- func IdentifierHasSuffix(v string) predicate.Host
- func IdentifierIn(vs ...string) predicate.Host
- func IdentifierLT(v string) predicate.Host
- func IdentifierLTE(v string) predicate.Host
- func IdentifierNEQ(v string) predicate.Host
- func IdentifierNotIn(vs ...string) predicate.Host
- func LastModifiedAt(v time.Time) predicate.Host
- func LastModifiedAtEQ(v time.Time) predicate.Host
- func LastModifiedAtGT(v time.Time) predicate.Host
- func LastModifiedAtGTE(v time.Time) predicate.Host
- func LastModifiedAtIn(vs ...time.Time) predicate.Host
- func LastModifiedAtLT(v time.Time) predicate.Host
- func LastModifiedAtLTE(v time.Time) predicate.Host
- func LastModifiedAtNEQ(v time.Time) predicate.Host
- func LastModifiedAtNotIn(vs ...time.Time) predicate.Host
- func LastSeenAt(v time.Time) predicate.Host
- func LastSeenAtEQ(v time.Time) predicate.Host
- func LastSeenAtGT(v time.Time) predicate.Host
- func LastSeenAtGTE(v time.Time) predicate.Host
- func LastSeenAtIn(vs ...time.Time) predicate.Host
- func LastSeenAtIsNil() predicate.Host
- func LastSeenAtLT(v time.Time) predicate.Host
- func LastSeenAtLTE(v time.Time) predicate.Host
- func LastSeenAtNEQ(v time.Time) predicate.Host
- func LastSeenAtNotIn(vs ...time.Time) predicate.Host
- func LastSeenAtNotNil() predicate.Host
- func Name(v string) predicate.Host
- func NameContains(v string) predicate.Host
- func NameContainsFold(v string) predicate.Host
- func NameEQ(v string) predicate.Host
- func NameEqualFold(v string) predicate.Host
- func NameGT(v string) predicate.Host
- func NameGTE(v string) predicate.Host
- func NameHasPrefix(v string) predicate.Host
- func NameHasSuffix(v string) predicate.Host
- func NameIn(vs ...string) predicate.Host
- func NameIsNil() predicate.Host
- func NameLT(v string) predicate.Host
- func NameLTE(v string) predicate.Host
- func NameNEQ(v string) predicate.Host
- func NameNotIn(vs ...string) predicate.Host
- func NameNotNil() predicate.Host
- func Not(p predicate.Host) predicate.Host
- func Or(predicates ...predicate.Host) predicate.Host
- func PlatformEQ(v c2pb.Host_Platform) predicate.Host
- func PlatformIn(vs ...c2pb.Host_Platform) predicate.Host
- func PlatformNEQ(v c2pb.Host_Platform) predicate.Host
- func PlatformNotIn(vs ...c2pb.Host_Platform) predicate.Host
- func PlatformValidator(pl c2pb.Host_Platform) error
- func PrimaryIP(v string) predicate.Host
- func PrimaryIPContains(v string) predicate.Host
- func PrimaryIPContainsFold(v string) predicate.Host
- func PrimaryIPEQ(v string) predicate.Host
- func PrimaryIPEqualFold(v string) predicate.Host
- func PrimaryIPGT(v string) predicate.Host
- func PrimaryIPGTE(v string) predicate.Host
- func PrimaryIPHasPrefix(v string) predicate.Host
- func PrimaryIPHasSuffix(v string) predicate.Host
- func PrimaryIPIn(vs ...string) predicate.Host
- func PrimaryIPIsNil() predicate.Host
- func PrimaryIPLT(v string) predicate.Host
- func PrimaryIPLTE(v string) predicate.Host
- func PrimaryIPNEQ(v string) predicate.Host
- func PrimaryIPNotIn(vs ...string) predicate.Host
- func PrimaryIPNotNil() predicate.Host
- func ValidColumn(column string) bool
- type OrderOption
- func ByBeacons(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByBeaconsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCredentials(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCredentialsCount(opts ...sql.OrderTermOption) OrderOption
- func ByFiles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByFilesCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIdentifier(opts ...sql.OrderTermOption) OrderOption
- func ByLastModifiedAt(opts ...sql.OrderTermOption) OrderOption
- func ByLastSeenAt(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPlatform(opts ...sql.OrderTermOption) OrderOption
- func ByPrimaryIP(opts ...sql.OrderTermOption) OrderOption
- func ByProcesses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByProcessesCount(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldLastModifiedAt, FieldIdentifier, FieldName, FieldPrimaryIP, FieldPlatform, FieldLastSeenAt, }
Columns holds all SQL columns for host fields.
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 CreatedAt ¶ added in v0.0.5
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶ added in v0.0.5
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶ added in v0.0.5
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶ added in v0.0.5
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶ added in v0.0.5
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶ added in v0.0.5
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶ added in v0.0.5
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶ added in v0.0.5
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶ added in v0.0.5
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasBeacons ¶
HasBeacons applies the HasEdge predicate on the "beacons" edge.
func HasBeaconsWith ¶
HasBeaconsWith applies the HasEdge predicate on the "beacons" edge with a given conditions (other predicates).
func HasCredentials ¶ added in v0.0.7
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 HasFilesWith ¶ added in v0.0.5
HasFilesWith applies the HasEdge predicate on the "files" edge with a given conditions (other predicates).
func HasProcesses ¶ added in v0.0.5
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 HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func Identifier ¶
Identifier applies equality check predicate on the "identifier" field. It's identical to IdentifierEQ.
func IdentifierContains ¶
IdentifierContains applies the Contains predicate on the "identifier" field.
func IdentifierContainsFold ¶
IdentifierContainsFold applies the ContainsFold predicate on the "identifier" field.
func IdentifierEQ ¶
IdentifierEQ applies the EQ predicate on the "identifier" field.
func IdentifierEqualFold ¶
IdentifierEqualFold applies the EqualFold predicate on the "identifier" field.
func IdentifierGT ¶
IdentifierGT applies the GT predicate on the "identifier" field.
func IdentifierGTE ¶
IdentifierGTE applies the GTE predicate on the "identifier" field.
func IdentifierHasPrefix ¶
IdentifierHasPrefix applies the HasPrefix predicate on the "identifier" field.
func IdentifierHasSuffix ¶
IdentifierHasSuffix applies the HasSuffix predicate on the "identifier" field.
func IdentifierIn ¶
IdentifierIn applies the In predicate on the "identifier" field.
func IdentifierLT ¶
IdentifierLT applies the LT predicate on the "identifier" field.
func IdentifierLTE ¶
IdentifierLTE applies the LTE predicate on the "identifier" field.
func IdentifierNEQ ¶
IdentifierNEQ applies the NEQ predicate on the "identifier" field.
func IdentifierNotIn ¶
IdentifierNotIn applies the NotIn predicate on the "identifier" field.
func LastModifiedAt ¶ added in v0.0.5
LastModifiedAt applies equality check predicate on the "last_modified_at" field. It's identical to LastModifiedAtEQ.
func LastModifiedAtEQ ¶ added in v0.0.5
LastModifiedAtEQ applies the EQ predicate on the "last_modified_at" field.
func LastModifiedAtGT ¶ added in v0.0.5
LastModifiedAtGT applies the GT predicate on the "last_modified_at" field.
func LastModifiedAtGTE ¶ added in v0.0.5
LastModifiedAtGTE applies the GTE predicate on the "last_modified_at" field.
func LastModifiedAtIn ¶ added in v0.0.5
LastModifiedAtIn applies the In predicate on the "last_modified_at" field.
func LastModifiedAtLT ¶ added in v0.0.5
LastModifiedAtLT applies the LT predicate on the "last_modified_at" field.
func LastModifiedAtLTE ¶ added in v0.0.5
LastModifiedAtLTE applies the LTE predicate on the "last_modified_at" field.
func LastModifiedAtNEQ ¶ added in v0.0.5
LastModifiedAtNEQ applies the NEQ predicate on the "last_modified_at" field.
func LastModifiedAtNotIn ¶ added in v0.0.5
LastModifiedAtNotIn applies the NotIn predicate on the "last_modified_at" field.
func LastSeenAt ¶
LastSeenAt applies equality check predicate on the "last_seen_at" field. It's identical to LastSeenAtEQ.
func LastSeenAtEQ ¶
LastSeenAtEQ applies the EQ predicate on the "last_seen_at" field.
func LastSeenAtGT ¶
LastSeenAtGT applies the GT predicate on the "last_seen_at" field.
func LastSeenAtGTE ¶
LastSeenAtGTE applies the GTE predicate on the "last_seen_at" field.
func LastSeenAtIn ¶
LastSeenAtIn applies the In predicate on the "last_seen_at" field.
func LastSeenAtIsNil ¶
LastSeenAtIsNil applies the IsNil predicate on the "last_seen_at" field.
func LastSeenAtLT ¶
LastSeenAtLT applies the LT predicate on the "last_seen_at" field.
func LastSeenAtLTE ¶
LastSeenAtLTE applies the LTE predicate on the "last_seen_at" field.
func LastSeenAtNEQ ¶
LastSeenAtNEQ applies the NEQ predicate on the "last_seen_at" field.
func LastSeenAtNotIn ¶
LastSeenAtNotIn applies the NotIn predicate on the "last_seen_at" field.
func LastSeenAtNotNil ¶
LastSeenAtNotNil applies the NotNil predicate on the "last_seen_at" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameNotNil ¶
NameNotNil applies the NotNil predicate on the "name" field.
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 ¶
PrimaryIP applies equality check predicate on the "primary_ip" field. It's identical to PrimaryIPEQ.
func PrimaryIPContains ¶
PrimaryIPContains applies the Contains predicate on the "primary_ip" field.
func PrimaryIPContainsFold ¶
PrimaryIPContainsFold applies the ContainsFold predicate on the "primary_ip" field.
func PrimaryIPEQ ¶
PrimaryIPEQ applies the EQ predicate on the "primary_ip" field.
func PrimaryIPEqualFold ¶
PrimaryIPEqualFold applies the EqualFold predicate on the "primary_ip" field.
func PrimaryIPGT ¶
PrimaryIPGT applies the GT predicate on the "primary_ip" field.
func PrimaryIPGTE ¶
PrimaryIPGTE applies the GTE predicate on the "primary_ip" field.
func PrimaryIPHasPrefix ¶
PrimaryIPHasPrefix applies the HasPrefix predicate on the "primary_ip" field.
func PrimaryIPHasSuffix ¶
PrimaryIPHasSuffix applies the HasSuffix predicate on the "primary_ip" field.
func PrimaryIPIn ¶
PrimaryIPIn applies the In predicate on the "primary_ip" field.
func PrimaryIPIsNil ¶
PrimaryIPIsNil applies the IsNil predicate on the "primary_ip" field.
func PrimaryIPLT ¶
PrimaryIPLT applies the LT predicate on the "primary_ip" field.
func PrimaryIPLTE ¶
PrimaryIPLTE applies the LTE predicate on the "primary_ip" field.
func PrimaryIPNEQ ¶
PrimaryIPNEQ applies the NEQ predicate on the "primary_ip" field.
func PrimaryIPNotIn ¶
PrimaryIPNotIn applies the NotIn predicate on the "primary_ip" field.
func PrimaryIPNotNil ¶
PrimaryIPNotNil applies the NotNil predicate on the "primary_ip" 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 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.