Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Listener) predicate.Listener
- func Color(v uint32) predicate.Listener
- func ColorEQ(v uint32) predicate.Listener
- func ColorGT(v uint32) predicate.Listener
- func ColorGTE(v uint32) predicate.Listener
- func ColorIn(vs ...uint32) predicate.Listener
- func ColorLT(v uint32) predicate.Listener
- func ColorLTE(v uint32) predicate.Listener
- func ColorNEQ(v uint32) predicate.Listener
- func ColorNotIn(vs ...uint32) predicate.Listener
- func CreatedAt(v time.Time) predicate.Listener
- func CreatedAtEQ(v time.Time) predicate.Listener
- func CreatedAtGT(v time.Time) predicate.Listener
- func CreatedAtGTE(v time.Time) predicate.Listener
- func CreatedAtIn(vs ...time.Time) predicate.Listener
- func CreatedAtLT(v time.Time) predicate.Listener
- func CreatedAtLTE(v time.Time) predicate.Listener
- func CreatedAtNEQ(v time.Time) predicate.Listener
- func CreatedAtNotIn(vs ...time.Time) predicate.Listener
- func DeletedAt(v time.Time) predicate.Listener
- func DeletedAtEQ(v time.Time) predicate.Listener
- func DeletedAtGT(v time.Time) predicate.Listener
- func DeletedAtGTE(v time.Time) predicate.Listener
- func DeletedAtIn(vs ...time.Time) predicate.Listener
- func DeletedAtIsNil() predicate.Listener
- func DeletedAtLT(v time.Time) predicate.Listener
- func DeletedAtLTE(v time.Time) predicate.Listener
- func DeletedAtNEQ(v time.Time) predicate.Listener
- func DeletedAtNotIn(vs ...time.Time) predicate.Listener
- func DeletedAtNotNil() predicate.Listener
- func HasAgent() predicate.Listener
- func HasAgentWith(preds ...predicate.Agent) predicate.Listener
- func ID(id int64) predicate.Listener
- func IDEQ(id int64) predicate.Listener
- func IDGT(id int64) predicate.Listener
- func IDGTE(id int64) predicate.Listener
- func IDIn(ids ...int64) predicate.Listener
- func IDLT(id int64) predicate.Listener
- func IDLTE(id int64) predicate.Listener
- func IDNEQ(id int64) predicate.Listener
- func IDNotIn(ids ...int64) predicate.Listener
- func IP(v types.Inet) predicate.Listener
- func IPContains(v types.Inet) predicate.Listener
- func IPContainsFold(v types.Inet) predicate.Listener
- func IPEQ(v types.Inet) predicate.Listener
- func IPEqualFold(v types.Inet) predicate.Listener
- func IPGT(v types.Inet) predicate.Listener
- func IPGTE(v types.Inet) predicate.Listener
- func IPHasPrefix(v types.Inet) predicate.Listener
- func IPHasSuffix(v types.Inet) predicate.Listener
- func IPIn(vs ...types.Inet) predicate.Listener
- func IPIsNil() predicate.Listener
- func IPLT(v types.Inet) predicate.Listener
- func IPLTE(v types.Inet) predicate.Listener
- func IPNEQ(v types.Inet) predicate.Listener
- func IPNotIn(vs ...types.Inet) predicate.Listener
- func IPNotNil() predicate.Listener
- func Last(v time.Time) predicate.Listener
- func LastEQ(v time.Time) predicate.Listener
- func LastGT(v time.Time) predicate.Listener
- func LastGTE(v time.Time) predicate.Listener
- func LastIn(vs ...time.Time) predicate.Listener
- func LastLT(v time.Time) predicate.Listener
- func LastLTE(v time.Time) predicate.Listener
- func LastNEQ(v time.Time) predicate.Listener
- func LastNotIn(vs ...time.Time) predicate.Listener
- func Name(v string) predicate.Listener
- func NameContains(v string) predicate.Listener
- func NameContainsFold(v string) predicate.Listener
- func NameEQ(v string) predicate.Listener
- func NameEqualFold(v string) predicate.Listener
- func NameGT(v string) predicate.Listener
- func NameGTE(v string) predicate.Listener
- func NameHasPrefix(v string) predicate.Listener
- func NameHasSuffix(v string) predicate.Listener
- func NameIn(vs ...string) predicate.Listener
- func NameIsNil() predicate.Listener
- func NameLT(v string) predicate.Listener
- func NameLTE(v string) predicate.Listener
- func NameNEQ(v string) predicate.Listener
- func NameNotIn(vs ...string) predicate.Listener
- func NameNotNil() predicate.Listener
- func Not(p predicate.Listener) predicate.Listener
- func Note(v string) predicate.Listener
- func NoteContains(v string) predicate.Listener
- func NoteContainsFold(v string) predicate.Listener
- func NoteEQ(v string) predicate.Listener
- func NoteEqualFold(v string) predicate.Listener
- func NoteGT(v string) predicate.Listener
- func NoteGTE(v string) predicate.Listener
- func NoteHasPrefix(v string) predicate.Listener
- func NoteHasSuffix(v string) predicate.Listener
- func NoteIn(vs ...string) predicate.Listener
- func NoteIsNil() predicate.Listener
- func NoteLT(v string) predicate.Listener
- func NoteLTE(v string) predicate.Listener
- func NoteNEQ(v string) predicate.Listener
- func NoteNotIn(vs ...string) predicate.Listener
- func NoteNotNil() predicate.Listener
- func Or(predicates ...predicate.Listener) predicate.Listener
- func Port(v uint16) predicate.Listener
- func PortEQ(v uint16) predicate.Listener
- func PortGT(v uint16) predicate.Listener
- func PortGTE(v uint16) predicate.Listener
- func PortIn(vs ...uint16) predicate.Listener
- func PortIsNil() predicate.Listener
- func PortLT(v uint16) predicate.Listener
- func PortLTE(v uint16) predicate.Listener
- func PortNEQ(v uint16) predicate.Listener
- func PortNotIn(vs ...uint16) predicate.Listener
- func PortNotNil() predicate.Listener
- func Token(v string) predicate.Listener
- func TokenContains(v string) predicate.Listener
- func TokenContainsFold(v string) predicate.Listener
- func TokenEQ(v string) predicate.Listener
- func TokenEqualFold(v string) predicate.Listener
- func TokenGT(v string) predicate.Listener
- func TokenGTE(v string) predicate.Listener
- func TokenHasPrefix(v string) predicate.Listener
- func TokenHasSuffix(v string) predicate.Listener
- func TokenIn(vs ...string) predicate.Listener
- func TokenIsNil() predicate.Listener
- func TokenLT(v string) predicate.Listener
- func TokenLTE(v string) predicate.Listener
- func TokenNEQ(v string) predicate.Listener
- func TokenNotIn(vs ...string) predicate.Listener
- func TokenNotNil() predicate.Listener
- func UpdatedAt(v time.Time) predicate.Listener
- func UpdatedAtEQ(v time.Time) predicate.Listener
- func UpdatedAtGT(v time.Time) predicate.Listener
- func UpdatedAtGTE(v time.Time) predicate.Listener
- func UpdatedAtIn(vs ...time.Time) predicate.Listener
- func UpdatedAtLT(v time.Time) predicate.Listener
- func UpdatedAtLTE(v time.Time) predicate.Listener
- func UpdatedAtNEQ(v time.Time) predicate.Listener
- func UpdatedAtNotIn(vs ...time.Time) predicate.Listener
- func ValidColumn(column string) bool
- type OrderOption
- func ByAgent(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByAgentCount(opts ...sql.OrderTermOption) OrderOption
- func ByColor(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIP(opts ...sql.OrderTermOption) OrderOption
- func ByLast(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByNote(opts ...sql.OrderTermOption) OrderOption
- func ByPort(opts ...sql.OrderTermOption) OrderOption
- func ByToken(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldToken, FieldName, FieldIP, FieldPort, FieldColor, FieldNote, FieldLast, }
Columns holds all SQL columns for listener fields.
Functions ¶
func Color ¶
Color applies equality check predicate on the "color" field. It's identical to ColorEQ.
func ColorNotIn ¶
ColorNotIn applies the NotIn predicate on the "color" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasAgentWith ¶
HasAgentWith applies the HasEdge predicate on the "agent" edge with a given conditions (other predicates).
func IPContains ¶
IPContains applies the Contains predicate on the "ip" field.
func IPContainsFold ¶
IPContainsFold applies the ContainsFold predicate on the "ip" field.
func IPEqualFold ¶
IPEqualFold applies the EqualFold predicate on the "ip" field.
func IPHasPrefix ¶
IPHasPrefix applies the HasPrefix predicate on the "ip" field.
func IPHasSuffix ¶
IPHasSuffix applies the HasSuffix predicate on the "ip" 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 NoteContains ¶
NoteContains applies the Contains predicate on the "note" field.
func NoteContainsFold ¶
NoteContainsFold applies the ContainsFold predicate on the "note" field.
func NoteEqualFold ¶
NoteEqualFold applies the EqualFold predicate on the "note" field.
func NoteHasPrefix ¶
NoteHasPrefix applies the HasPrefix predicate on the "note" field.
func NoteHasSuffix ¶
NoteHasSuffix applies the HasSuffix predicate on the "note" field.
func NoteNotNil ¶
NoteNotNil applies the NotNil predicate on the "note" field.
func PortNotNil ¶
PortNotNil applies the NotNil predicate on the "port" field.
func Token ¶
Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
func TokenContains ¶
TokenContains applies the Contains predicate on the "token" field.
func TokenContainsFold ¶
TokenContainsFold applies the ContainsFold predicate on the "token" field.
func TokenEqualFold ¶
TokenEqualFold applies the EqualFold predicate on the "token" field.
func TokenHasPrefix ¶
TokenHasPrefix applies the HasPrefix predicate on the "token" field.
func TokenHasSuffix ¶
TokenHasSuffix applies the HasSuffix predicate on the "token" field.
func TokenIsNil ¶
TokenIsNil applies the IsNil predicate on the "token" field.
func TokenNotIn ¶
TokenNotIn applies the NotIn predicate on the "token" field.
func TokenNotNil ¶
TokenNotNil applies the NotNil predicate on the "token" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 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.