Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Host) predicate.Host
- func HasBeacons() predicate.Host
- func HasBeaconsWith(preds ...predicate.Beacon) 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 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 Platform) predicate.Host
- func PlatformIn(vs ...Platform) predicate.Host
- func PlatformNEQ(v Platform) predicate.Host
- func PlatformNotIn(vs ...Platform) predicate.Host
- func PlatformValidator(pl 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 ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIdentifier(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 ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- type Platform
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" // 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" )
const DefaultPlatform = PlatformUnknown
PlatformUnknown is the default value of the Platform enum.
Variables ¶
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 )
var Columns = []string{ FieldID, 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 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 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 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 ¶
PlatformEQ applies the EQ predicate on the "platform" field.
func PlatformIn ¶
PlatformIn applies the In predicate on the "platform" field.
func PlatformNEQ ¶
PlatformNEQ applies the NEQ predicate on the "platform" field.
func PlatformNotIn ¶
PlatformNotIn applies the NotIn predicate on the "platform" field.
func PlatformValidator ¶
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 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 ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Platform) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.