target

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the target type in the database.
	Label = "target"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name vertex property in the database.
	FieldName = "name"
	// FieldOS holds the string denoting the os vertex property in the database.
	FieldOS = "os"
	// FieldPrimaryIP holds the string denoting the primaryip vertex property in the database.
	FieldPrimaryIP = "primary_ip"
	// FieldMachineUUID holds the string denoting the machineuuid vertex property in the database.
	FieldMachineUUID = "machine_uuid"
	// FieldPublicIP holds the string denoting the publicip vertex property in the database.
	FieldPublicIP = "public_ip"
	// FieldPrimaryMAC holds the string denoting the primarymac vertex property in the database.
	FieldPrimaryMAC = "primary_mac"
	// FieldHostname holds the string denoting the hostname vertex property in the database.
	FieldHostname = "hostname"
	// FieldLastSeen holds the string denoting the lastseen vertex property in the database.
	FieldLastSeen = "last_seen"

	// Table holds the table name of the target in the database.
	Table = "targets"
	// TasksTable is the table the 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 = "target_id"
	// TagsTable is the table the holds the tags relation/edge. The primary key declared below.
	TagsTable = "target_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"
	// CredentialsTable is the table the holds the credentials relation/edge.
	CredentialsTable = "credentials"
	// CredentialsInverseTable is the table name for the Credential entity.
	// It exists in this package in order to avoid circular dependency with the "credential" package.
	CredentialsInverseTable = "credentials"
	// CredentialsColumn is the table column denoting the credentials relation/edge.
	CredentialsColumn = "target_id"
)

Variables

Columns holds all SQL columns for target fields.

View Source
var (

	// MachineUUIDValidator is a validator for the "MachineUUID" field. It is called by the builders before save.
	MachineUUIDValidator = descMachineUUID.Validators[0].(func(string) error)
)
View Source
var (
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"target_id", "tag_id"}
)

Functions

func And

func And(predicates ...predicate.Target) predicate.Target

And groups list of predicates with the AND operator between them.

func HasCredentials

func HasCredentials() predicate.Target

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

func HasCredentialsWith

func HasCredentialsWith(preds ...predicate.Credential) predicate.Target

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

func HasTags

func HasTags() predicate.Target

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

func HasTagsWith

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

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

func HasTasks

func HasTasks() predicate.Target

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

func HasTasksWith

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

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

func Hostname

func Hostname(v string) predicate.Target

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

func HostnameContains

func HostnameContains(v string) predicate.Target

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

func HostnameContainsFold

func HostnameContainsFold(v string) predicate.Target

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

func HostnameEQ

func HostnameEQ(v string) predicate.Target

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

func HostnameEqualFold

func HostnameEqualFold(v string) predicate.Target

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

func HostnameGT

func HostnameGT(v string) predicate.Target

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

func HostnameGTE

func HostnameGTE(v string) predicate.Target

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

func HostnameHasPrefix

func HostnameHasPrefix(v string) predicate.Target

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

func HostnameHasSuffix

func HostnameHasSuffix(v string) predicate.Target

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

func HostnameIn

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

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

func HostnameIsNil

func HostnameIsNil() predicate.Target

HostnameIsNil applies the IsNil predicate on the "Hostname" field.

func HostnameLT

func HostnameLT(v string) predicate.Target

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

func HostnameLTE

func HostnameLTE(v string) predicate.Target

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

func HostnameNEQ

func HostnameNEQ(v string) predicate.Target

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

func HostnameNotIn

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

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

func HostnameNotNil

func HostnameNotNil() predicate.Target

HostnameNotNil applies the NotNil predicate on the "Hostname" field.

func ID

func ID(id int) predicate.Target

ID filters vertices based on their identifier.

func IDEQ

func IDEQ(id int) predicate.Target

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Target

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Target

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Target

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Target

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Target

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func LastSeen

func LastSeen(v time.Time) predicate.Target

LastSeen applies equality check predicate on the "LastSeen" field. It's identical to LastSeenEQ.

func LastSeenEQ

func LastSeenEQ(v time.Time) predicate.Target

LastSeenEQ applies the EQ predicate on the "LastSeen" field.

func LastSeenGT

func LastSeenGT(v time.Time) predicate.Target

LastSeenGT applies the GT predicate on the "LastSeen" field.

func LastSeenGTE

func LastSeenGTE(v time.Time) predicate.Target

LastSeenGTE applies the GTE predicate on the "LastSeen" field.

func LastSeenIn

func LastSeenIn(vs ...time.Time) predicate.Target

LastSeenIn applies the In predicate on the "LastSeen" field.

func LastSeenIsNil

func LastSeenIsNil() predicate.Target

LastSeenIsNil applies the IsNil predicate on the "LastSeen" field.

func LastSeenLT

func LastSeenLT(v time.Time) predicate.Target

LastSeenLT applies the LT predicate on the "LastSeen" field.

func LastSeenLTE

func LastSeenLTE(v time.Time) predicate.Target

LastSeenLTE applies the LTE predicate on the "LastSeen" field.

func LastSeenNEQ

func LastSeenNEQ(v time.Time) predicate.Target

LastSeenNEQ applies the NEQ predicate on the "LastSeen" field.

func LastSeenNotIn

func LastSeenNotIn(vs ...time.Time) predicate.Target

LastSeenNotIn applies the NotIn predicate on the "LastSeen" field.

func LastSeenNotNil

func LastSeenNotNil() predicate.Target

LastSeenNotNil applies the NotNil predicate on the "LastSeen" field.

func MachineUUID

func MachineUUID(v string) predicate.Target

MachineUUID applies equality check predicate on the "MachineUUID" field. It's identical to MachineUUIDEQ.

func MachineUUIDContains

func MachineUUIDContains(v string) predicate.Target

MachineUUIDContains applies the Contains predicate on the "MachineUUID" field.

func MachineUUIDContainsFold

func MachineUUIDContainsFold(v string) predicate.Target

MachineUUIDContainsFold applies the ContainsFold predicate on the "MachineUUID" field.

func MachineUUIDEQ

func MachineUUIDEQ(v string) predicate.Target

MachineUUIDEQ applies the EQ predicate on the "MachineUUID" field.

func MachineUUIDEqualFold

func MachineUUIDEqualFold(v string) predicate.Target

MachineUUIDEqualFold applies the EqualFold predicate on the "MachineUUID" field.

func MachineUUIDGT

func MachineUUIDGT(v string) predicate.Target

MachineUUIDGT applies the GT predicate on the "MachineUUID" field.

func MachineUUIDGTE

func MachineUUIDGTE(v string) predicate.Target

MachineUUIDGTE applies the GTE predicate on the "MachineUUID" field.

func MachineUUIDHasPrefix

func MachineUUIDHasPrefix(v string) predicate.Target

MachineUUIDHasPrefix applies the HasPrefix predicate on the "MachineUUID" field.

func MachineUUIDHasSuffix

func MachineUUIDHasSuffix(v string) predicate.Target

MachineUUIDHasSuffix applies the HasSuffix predicate on the "MachineUUID" field.

func MachineUUIDIn

func MachineUUIDIn(vs ...string) predicate.Target

MachineUUIDIn applies the In predicate on the "MachineUUID" field.

func MachineUUIDIsNil

func MachineUUIDIsNil() predicate.Target

MachineUUIDIsNil applies the IsNil predicate on the "MachineUUID" field.

func MachineUUIDLT

func MachineUUIDLT(v string) predicate.Target

MachineUUIDLT applies the LT predicate on the "MachineUUID" field.

func MachineUUIDLTE

func MachineUUIDLTE(v string) predicate.Target

MachineUUIDLTE applies the LTE predicate on the "MachineUUID" field.

func MachineUUIDNEQ

func MachineUUIDNEQ(v string) predicate.Target

MachineUUIDNEQ applies the NEQ predicate on the "MachineUUID" field.

func MachineUUIDNotIn

func MachineUUIDNotIn(vs ...string) predicate.Target

MachineUUIDNotIn applies the NotIn predicate on the "MachineUUID" field.

func MachineUUIDNotNil

func MachineUUIDNotNil() predicate.Target

MachineUUIDNotNil applies the NotNil predicate on the "MachineUUID" field.

func Name

func Name(v string) predicate.Target

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

func NameContains

func NameContains(v string) predicate.Target

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

func NameContainsFold

func NameContainsFold(v string) predicate.Target

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

func NameEQ

func NameEQ(v string) predicate.Target

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

func NameEqualFold

func NameEqualFold(v string) predicate.Target

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

func NameGT

func NameGT(v string) predicate.Target

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

func NameGTE

func NameGTE(v string) predicate.Target

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Target

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Target

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Target

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

func NameLTE

func NameLTE(v string) predicate.Target

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

func NameNEQ

func NameNEQ(v string) predicate.Target

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func OSEQ added in v0.4.0

func OSEQ(v OS) predicate.Target

OSEQ applies the EQ predicate on the "OS" field.

func OSIn added in v0.4.0

func OSIn(vs ...OS) predicate.Target

OSIn applies the In predicate on the "OS" field.

func OSNEQ added in v0.4.0

func OSNEQ(v OS) predicate.Target

OSNEQ applies the NEQ predicate on the "OS" field.

func OSNotIn added in v0.4.0

func OSNotIn(vs ...OS) predicate.Target

OSNotIn applies the NotIn predicate on the "OS" field.

func OSValidator added in v0.4.0

func OSValidator(o OS) error

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

func Or

func Or(predicates ...predicate.Target) predicate.Target

Or groups list of predicates with the OR operator between them.

func PrimaryIP

func PrimaryIP(v string) predicate.Target

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

func PrimaryIPContains

func PrimaryIPContains(v string) predicate.Target

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

func PrimaryIPContainsFold

func PrimaryIPContainsFold(v string) predicate.Target

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

func PrimaryIPEQ

func PrimaryIPEQ(v string) predicate.Target

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

func PrimaryIPEqualFold

func PrimaryIPEqualFold(v string) predicate.Target

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

func PrimaryIPGT

func PrimaryIPGT(v string) predicate.Target

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

func PrimaryIPGTE

func PrimaryIPGTE(v string) predicate.Target

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

func PrimaryIPHasPrefix

func PrimaryIPHasPrefix(v string) predicate.Target

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

func PrimaryIPHasSuffix

func PrimaryIPHasSuffix(v string) predicate.Target

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

func PrimaryIPIn

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

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

func PrimaryIPLT

func PrimaryIPLT(v string) predicate.Target

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

func PrimaryIPLTE

func PrimaryIPLTE(v string) predicate.Target

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

func PrimaryIPNEQ

func PrimaryIPNEQ(v string) predicate.Target

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

func PrimaryIPNotIn

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

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

func PrimaryMAC

func PrimaryMAC(v string) predicate.Target

PrimaryMAC applies equality check predicate on the "PrimaryMAC" field. It's identical to PrimaryMACEQ.

func PrimaryMACContains

func PrimaryMACContains(v string) predicate.Target

PrimaryMACContains applies the Contains predicate on the "PrimaryMAC" field.

func PrimaryMACContainsFold

func PrimaryMACContainsFold(v string) predicate.Target

PrimaryMACContainsFold applies the ContainsFold predicate on the "PrimaryMAC" field.

func PrimaryMACEQ

func PrimaryMACEQ(v string) predicate.Target

PrimaryMACEQ applies the EQ predicate on the "PrimaryMAC" field.

func PrimaryMACEqualFold

func PrimaryMACEqualFold(v string) predicate.Target

PrimaryMACEqualFold applies the EqualFold predicate on the "PrimaryMAC" field.

func PrimaryMACGT

func PrimaryMACGT(v string) predicate.Target

PrimaryMACGT applies the GT predicate on the "PrimaryMAC" field.

func PrimaryMACGTE

func PrimaryMACGTE(v string) predicate.Target

PrimaryMACGTE applies the GTE predicate on the "PrimaryMAC" field.

func PrimaryMACHasPrefix

func PrimaryMACHasPrefix(v string) predicate.Target

PrimaryMACHasPrefix applies the HasPrefix predicate on the "PrimaryMAC" field.

func PrimaryMACHasSuffix

func PrimaryMACHasSuffix(v string) predicate.Target

PrimaryMACHasSuffix applies the HasSuffix predicate on the "PrimaryMAC" field.

func PrimaryMACIn

func PrimaryMACIn(vs ...string) predicate.Target

PrimaryMACIn applies the In predicate on the "PrimaryMAC" field.

func PrimaryMACIsNil

func PrimaryMACIsNil() predicate.Target

PrimaryMACIsNil applies the IsNil predicate on the "PrimaryMAC" field.

func PrimaryMACLT

func PrimaryMACLT(v string) predicate.Target

PrimaryMACLT applies the LT predicate on the "PrimaryMAC" field.

func PrimaryMACLTE

func PrimaryMACLTE(v string) predicate.Target

PrimaryMACLTE applies the LTE predicate on the "PrimaryMAC" field.

func PrimaryMACNEQ

func PrimaryMACNEQ(v string) predicate.Target

PrimaryMACNEQ applies the NEQ predicate on the "PrimaryMAC" field.

func PrimaryMACNotIn

func PrimaryMACNotIn(vs ...string) predicate.Target

PrimaryMACNotIn applies the NotIn predicate on the "PrimaryMAC" field.

func PrimaryMACNotNil

func PrimaryMACNotNil() predicate.Target

PrimaryMACNotNil applies the NotNil predicate on the "PrimaryMAC" field.

func PublicIP

func PublicIP(v string) predicate.Target

PublicIP applies equality check predicate on the "PublicIP" field. It's identical to PublicIPEQ.

func PublicIPContains

func PublicIPContains(v string) predicate.Target

PublicIPContains applies the Contains predicate on the "PublicIP" field.

func PublicIPContainsFold

func PublicIPContainsFold(v string) predicate.Target

PublicIPContainsFold applies the ContainsFold predicate on the "PublicIP" field.

func PublicIPEQ

func PublicIPEQ(v string) predicate.Target

PublicIPEQ applies the EQ predicate on the "PublicIP" field.

func PublicIPEqualFold

func PublicIPEqualFold(v string) predicate.Target

PublicIPEqualFold applies the EqualFold predicate on the "PublicIP" field.

func PublicIPGT

func PublicIPGT(v string) predicate.Target

PublicIPGT applies the GT predicate on the "PublicIP" field.

func PublicIPGTE

func PublicIPGTE(v string) predicate.Target

PublicIPGTE applies the GTE predicate on the "PublicIP" field.

func PublicIPHasPrefix

func PublicIPHasPrefix(v string) predicate.Target

PublicIPHasPrefix applies the HasPrefix predicate on the "PublicIP" field.

func PublicIPHasSuffix

func PublicIPHasSuffix(v string) predicate.Target

PublicIPHasSuffix applies the HasSuffix predicate on the "PublicIP" field.

func PublicIPIn

func PublicIPIn(vs ...string) predicate.Target

PublicIPIn applies the In predicate on the "PublicIP" field.

func PublicIPIsNil

func PublicIPIsNil() predicate.Target

PublicIPIsNil applies the IsNil predicate on the "PublicIP" field.

func PublicIPLT

func PublicIPLT(v string) predicate.Target

PublicIPLT applies the LT predicate on the "PublicIP" field.

func PublicIPLTE

func PublicIPLTE(v string) predicate.Target

PublicIPLTE applies the LTE predicate on the "PublicIP" field.

func PublicIPNEQ

func PublicIPNEQ(v string) predicate.Target

PublicIPNEQ applies the NEQ predicate on the "PublicIP" field.

func PublicIPNotIn

func PublicIPNotIn(vs ...string) predicate.Target

PublicIPNotIn applies the NotIn predicate on the "PublicIP" field.

func PublicIPNotNil

func PublicIPNotNil() predicate.Target

PublicIPNotNil applies the NotNil predicate on the "PublicIP" field.

Types

type OS added in v0.4.0

type OS string

OS defines the type for the OS enum field.

const (
	OSLINUX   OS = "LINUX"
	OSWINDOWS OS = "WINDOWS"
	OSBSD     OS = "BSD"
	OSMACOS   OS = "MACOS"
)

OS values.

func (OS) String added in v0.4.0

func (s OS) String() string

Jump to

Keyboard shortcuts

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