host

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 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"
	// 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"
	// 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"
)
View Source
const DefaultPlatform = PlatformUnknown

PlatformUnknown is the default value of the Platform enum.

Variables

View Source
var (
	// 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 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 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 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 Platform) predicate.Host

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

func PlatformIn

func PlatformIn(vs ...Platform) predicate.Host

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

func PlatformNEQ

func PlatformNEQ(v Platform) predicate.Host

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

func PlatformNotIn

func PlatformNotIn(vs ...Platform) predicate.Host

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

func PlatformValidator

func PlatformValidator(pl 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 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 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 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.

type Platform

type Platform string

Platform defines the type for the "platform" enum field.

const (
	PlatformWindows Platform = "Windows"
	PlatformLinux   Platform = "Linux"
	PlatformMacOS   Platform = "MacOS"
	PlatformBSD     Platform = "BSD"
	PlatformUnknown Platform = "Unknown"
)

Platform values.

func (Platform) MarshalGQL

func (e Platform) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Platform) String

func (pl Platform) String() string

func (*Platform) UnmarshalGQL

func (e *Platform) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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