listener

package
v0.0.0-...-52fa7fc Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the listener type in the database.
	Label = "listener"
	// 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"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldToken holds the string denoting the token field in the database.
	FieldToken = "token"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldIP holds the string denoting the ip field in the database.
	FieldIP = "ip"
	// FieldPort holds the string denoting the port field in the database.
	FieldPort = "port"
	// FieldColor holds the string denoting the color field in the database.
	FieldColor = "color"
	// FieldNote holds the string denoting the note field in the database.
	FieldNote = "note"
	// FieldLast holds the string denoting the last field in the database.
	FieldLast = "last"
	// EdgeAgent holds the string denoting the agent edge name in mutations.
	EdgeAgent = "agent"
	// Table holds the table name of the listener in the database.
	Table = "listener"
	// AgentTable is the table that holds the agent relation/edge.
	AgentTable = "agent"
	// AgentInverseTable is the table name for the Agent entity.
	// It exists in this package in order to avoid circular dependency with the "agent" package.
	AgentInverseTable = "agent"
	// AgentColumn is the table column denoting the agent relation/edge.
	AgentColumn = "listener_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// TokenValidator is a validator for the "token" field. It is called by the builders before save.
	TokenValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// IPValidator is a validator for the "ip" field. It is called by the builders before save.
	IPValidator func(string) error
	// PortValidator is a validator for the "port" field. It is called by the builders before save.
	PortValidator func(uint16) error
	// DefaultColor holds the default value on creation for the "color" field.
	DefaultColor uint32
	// NoteValidator is a validator for the "note" field. It is called by the builders before save.
	NoteValidator func(string) error
	// DefaultLast holds the default value on creation for the "last" field.
	DefaultLast func() time.Time
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/PicoTools/pico/internal/ent/runtime"

Columns holds all SQL columns for listener fields.

Functions

func And

func And(predicates ...predicate.Listener) predicate.Listener

And groups predicates with the AND operator between them.

func Color

func Color(v uint32) predicate.Listener

Color applies equality check predicate on the "color" field. It's identical to ColorEQ.

func ColorEQ

func ColorEQ(v uint32) predicate.Listener

ColorEQ applies the EQ predicate on the "color" field.

func ColorGT

func ColorGT(v uint32) predicate.Listener

ColorGT applies the GT predicate on the "color" field.

func ColorGTE

func ColorGTE(v uint32) predicate.Listener

ColorGTE applies the GTE predicate on the "color" field.

func ColorIn

func ColorIn(vs ...uint32) predicate.Listener

ColorIn applies the In predicate on the "color" field.

func ColorLT

func ColorLT(v uint32) predicate.Listener

ColorLT applies the LT predicate on the "color" field.

func ColorLTE

func ColorLTE(v uint32) predicate.Listener

ColorLTE applies the LTE predicate on the "color" field.

func ColorNEQ

func ColorNEQ(v uint32) predicate.Listener

ColorNEQ applies the NEQ predicate on the "color" field.

func ColorNotIn

func ColorNotIn(vs ...uint32) predicate.Listener

ColorNotIn applies the NotIn predicate on the "color" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Listener

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Listener

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Listener

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Listener

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Listener

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Listener

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Listener

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Listener

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Listener

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Listener

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Listener

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Listener

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Listener

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Listener

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Listener

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Listener

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Listener

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Listener

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func HasAgent

func HasAgent() predicate.Listener

HasAgent applies the HasEdge predicate on the "agent" edge.

func HasAgentWith

func HasAgentWith(preds ...predicate.Agent) predicate.Listener

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

func ID

func ID(id int64) predicate.Listener

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Listener

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Listener

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Listener

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Listener

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Listener

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Listener

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Listener

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Listener

IDNotIn applies the NotIn predicate on the ID field.

func IP

IP applies equality check predicate on the "ip" field. It's identical to IPEQ.

func IPContains

func IPContains(v types.Inet) predicate.Listener

IPContains applies the Contains predicate on the "ip" field.

func IPContainsFold

func IPContainsFold(v types.Inet) predicate.Listener

IPContainsFold applies the ContainsFold predicate on the "ip" field.

func IPEQ

func IPEQ(v types.Inet) predicate.Listener

IPEQ applies the EQ predicate on the "ip" field.

func IPEqualFold

func IPEqualFold(v types.Inet) predicate.Listener

IPEqualFold applies the EqualFold predicate on the "ip" field.

func IPGT

func IPGT(v types.Inet) predicate.Listener

IPGT applies the GT predicate on the "ip" field.

func IPGTE

func IPGTE(v types.Inet) predicate.Listener

IPGTE applies the GTE predicate on the "ip" field.

func IPHasPrefix

func IPHasPrefix(v types.Inet) predicate.Listener

IPHasPrefix applies the HasPrefix predicate on the "ip" field.

func IPHasSuffix

func IPHasSuffix(v types.Inet) predicate.Listener

IPHasSuffix applies the HasSuffix predicate on the "ip" field.

func IPIn

func IPIn(vs ...types.Inet) predicate.Listener

IPIn applies the In predicate on the "ip" field.

func IPIsNil

func IPIsNil() predicate.Listener

IPIsNil applies the IsNil predicate on the "ip" field.

func IPLT

func IPLT(v types.Inet) predicate.Listener

IPLT applies the LT predicate on the "ip" field.

func IPLTE

func IPLTE(v types.Inet) predicate.Listener

IPLTE applies the LTE predicate on the "ip" field.

func IPNEQ

func IPNEQ(v types.Inet) predicate.Listener

IPNEQ applies the NEQ predicate on the "ip" field.

func IPNotIn

func IPNotIn(vs ...types.Inet) predicate.Listener

IPNotIn applies the NotIn predicate on the "ip" field.

func IPNotNil

func IPNotNil() predicate.Listener

IPNotNil applies the NotNil predicate on the "ip" field.

func Last

func Last(v time.Time) predicate.Listener

Last applies equality check predicate on the "last" field. It's identical to LastEQ.

func LastEQ

func LastEQ(v time.Time) predicate.Listener

LastEQ applies the EQ predicate on the "last" field.

func LastGT

func LastGT(v time.Time) predicate.Listener

LastGT applies the GT predicate on the "last" field.

func LastGTE

func LastGTE(v time.Time) predicate.Listener

LastGTE applies the GTE predicate on the "last" field.

func LastIn

func LastIn(vs ...time.Time) predicate.Listener

LastIn applies the In predicate on the "last" field.

func LastLT

func LastLT(v time.Time) predicate.Listener

LastLT applies the LT predicate on the "last" field.

func LastLTE

func LastLTE(v time.Time) predicate.Listener

LastLTE applies the LTE predicate on the "last" field.

func LastNEQ

func LastNEQ(v time.Time) predicate.Listener

LastNEQ applies the NEQ predicate on the "last" field.

func LastNotIn

func LastNotIn(vs ...time.Time) predicate.Listener

LastNotIn applies the NotIn predicate on the "last" field.

func Name

func Name(v string) predicate.Listener

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

func NameContains

func NameContains(v string) predicate.Listener

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

func NameContainsFold

func NameContainsFold(v string) predicate.Listener

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

func NameEQ

func NameEQ(v string) predicate.Listener

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

func NameEqualFold

func NameEqualFold(v string) predicate.Listener

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

func NameGT

func NameGT(v string) predicate.Listener

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

func NameGTE

func NameGTE(v string) predicate.Listener

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Listener

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Listener

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

func NameIn

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

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

func NameIsNil

func NameIsNil() predicate.Listener

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

func NameLT

func NameLT(v string) predicate.Listener

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

func NameLTE

func NameLTE(v string) predicate.Listener

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

func NameNEQ

func NameNEQ(v string) predicate.Listener

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

func NameNotIn

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

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

func NameNotNil

func NameNotNil() predicate.Listener

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

func Not

Not applies the not operator on the given predicate.

func Note

func Note(v string) predicate.Listener

Note applies equality check predicate on the "note" field. It's identical to NoteEQ.

func NoteContains

func NoteContains(v string) predicate.Listener

NoteContains applies the Contains predicate on the "note" field.

func NoteContainsFold

func NoteContainsFold(v string) predicate.Listener

NoteContainsFold applies the ContainsFold predicate on the "note" field.

func NoteEQ

func NoteEQ(v string) predicate.Listener

NoteEQ applies the EQ predicate on the "note" field.

func NoteEqualFold

func NoteEqualFold(v string) predicate.Listener

NoteEqualFold applies the EqualFold predicate on the "note" field.

func NoteGT

func NoteGT(v string) predicate.Listener

NoteGT applies the GT predicate on the "note" field.

func NoteGTE

func NoteGTE(v string) predicate.Listener

NoteGTE applies the GTE predicate on the "note" field.

func NoteHasPrefix

func NoteHasPrefix(v string) predicate.Listener

NoteHasPrefix applies the HasPrefix predicate on the "note" field.

func NoteHasSuffix

func NoteHasSuffix(v string) predicate.Listener

NoteHasSuffix applies the HasSuffix predicate on the "note" field.

func NoteIn

func NoteIn(vs ...string) predicate.Listener

NoteIn applies the In predicate on the "note" field.

func NoteIsNil

func NoteIsNil() predicate.Listener

NoteIsNil applies the IsNil predicate on the "note" field.

func NoteLT

func NoteLT(v string) predicate.Listener

NoteLT applies the LT predicate on the "note" field.

func NoteLTE

func NoteLTE(v string) predicate.Listener

NoteLTE applies the LTE predicate on the "note" field.

func NoteNEQ

func NoteNEQ(v string) predicate.Listener

NoteNEQ applies the NEQ predicate on the "note" field.

func NoteNotIn

func NoteNotIn(vs ...string) predicate.Listener

NoteNotIn applies the NotIn predicate on the "note" field.

func NoteNotNil

func NoteNotNil() predicate.Listener

NoteNotNil applies the NotNil predicate on the "note" field.

func Or

func Or(predicates ...predicate.Listener) predicate.Listener

Or groups predicates with the OR operator between them.

func Port

func Port(v uint16) predicate.Listener

Port applies equality check predicate on the "port" field. It's identical to PortEQ.

func PortEQ

func PortEQ(v uint16) predicate.Listener

PortEQ applies the EQ predicate on the "port" field.

func PortGT

func PortGT(v uint16) predicate.Listener

PortGT applies the GT predicate on the "port" field.

func PortGTE

func PortGTE(v uint16) predicate.Listener

PortGTE applies the GTE predicate on the "port" field.

func PortIn

func PortIn(vs ...uint16) predicate.Listener

PortIn applies the In predicate on the "port" field.

func PortIsNil

func PortIsNil() predicate.Listener

PortIsNil applies the IsNil predicate on the "port" field.

func PortLT

func PortLT(v uint16) predicate.Listener

PortLT applies the LT predicate on the "port" field.

func PortLTE

func PortLTE(v uint16) predicate.Listener

PortLTE applies the LTE predicate on the "port" field.

func PortNEQ

func PortNEQ(v uint16) predicate.Listener

PortNEQ applies the NEQ predicate on the "port" field.

func PortNotIn

func PortNotIn(vs ...uint16) predicate.Listener

PortNotIn applies the NotIn predicate on the "port" field.

func PortNotNil

func PortNotNil() predicate.Listener

PortNotNil applies the NotNil predicate on the "port" field.

func Token

func Token(v string) predicate.Listener

Token applies equality check predicate on the "token" field. It's identical to TokenEQ.

func TokenContains

func TokenContains(v string) predicate.Listener

TokenContains applies the Contains predicate on the "token" field.

func TokenContainsFold

func TokenContainsFold(v string) predicate.Listener

TokenContainsFold applies the ContainsFold predicate on the "token" field.

func TokenEQ

func TokenEQ(v string) predicate.Listener

TokenEQ applies the EQ predicate on the "token" field.

func TokenEqualFold

func TokenEqualFold(v string) predicate.Listener

TokenEqualFold applies the EqualFold predicate on the "token" field.

func TokenGT

func TokenGT(v string) predicate.Listener

TokenGT applies the GT predicate on the "token" field.

func TokenGTE

func TokenGTE(v string) predicate.Listener

TokenGTE applies the GTE predicate on the "token" field.

func TokenHasPrefix

func TokenHasPrefix(v string) predicate.Listener

TokenHasPrefix applies the HasPrefix predicate on the "token" field.

func TokenHasSuffix

func TokenHasSuffix(v string) predicate.Listener

TokenHasSuffix applies the HasSuffix predicate on the "token" field.

func TokenIn

func TokenIn(vs ...string) predicate.Listener

TokenIn applies the In predicate on the "token" field.

func TokenIsNil

func TokenIsNil() predicate.Listener

TokenIsNil applies the IsNil predicate on the "token" field.

func TokenLT

func TokenLT(v string) predicate.Listener

TokenLT applies the LT predicate on the "token" field.

func TokenLTE

func TokenLTE(v string) predicate.Listener

TokenLTE applies the LTE predicate on the "token" field.

func TokenNEQ

func TokenNEQ(v string) predicate.Listener

TokenNEQ applies the NEQ predicate on the "token" field.

func TokenNotIn

func TokenNotIn(vs ...string) predicate.Listener

TokenNotIn applies the NotIn predicate on the "token" field.

func TokenNotNil

func TokenNotNil() predicate.Listener

TokenNotNil applies the NotNil predicate on the "token" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Listener

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Listener

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Listener

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Listener

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Listener

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Listener

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Listener

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Listener

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Listener

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Listener queries.

func ByAgent

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

ByAgent orders the results by agent terms.

func ByAgentCount

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

ByAgentCount orders the results by agent count.

func ByColor

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

ByColor orders the results by the color field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByID

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

ByID orders the results by the id field.

func ByIP

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

ByIP orders the results by the ip field.

func ByLast

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

ByLast orders the results by the last field.

func ByName

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

ByName orders the results by the name field.

func ByNote

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

ByNote orders the results by the note field.

func ByPort

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

ByPort orders the results by the port field.

func ByToken

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

ByToken orders the results by the token field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳