origin

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the origin type in the database.
	Label = "origin"
	// 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"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldWeight holds the string denoting the weight field in the database.
	FieldWeight = "weight"
	// FieldTarget holds the string denoting the target field in the database.
	FieldTarget = "target"
	// FieldPortNumber holds the string denoting the port_number field in the database.
	FieldPortNumber = "port_number"
	// FieldActive holds the string denoting the active field in the database.
	FieldActive = "active"
	// FieldPoolID holds the string denoting the pool_id field in the database.
	FieldPoolID = "pool_id"
	// EdgePool holds the string denoting the pool edge name in mutations.
	EdgePool = "pool"
	// Table holds the table name of the origin in the database.
	Table = "origins"
	// PoolTable is the table that holds the pool relation/edge.
	PoolTable = "origins"
	// PoolInverseTable is the table name for the Pool entity.
	// It exists in this package in order to avoid circular dependency with the "pool" package.
	PoolInverseTable = "pools"
	// PoolColumn is the table column denoting the pool relation/edge.
	PoolColumn = "pool_id"
)

Variables

View Source
var (
	// 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
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultWeight holds the default value on creation for the "weight" field.
	DefaultWeight int32
	// TargetValidator is a validator for the "target" field. It is called by the builders before save.
	TargetValidator func(string) error
	// PortNumberValidator is a validator for the "port_number" field. It is called by the builders before save.
	PortNumberValidator func(int) error
	// DefaultActive holds the default value on creation for the "active" field.
	DefaultActive bool
	// PoolIDValidator is a validator for the "pool_id" field. It is called by the builders before save.
	PoolIDValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() gidx.PrefixedID
)

Columns holds all SQL columns for origin fields.

Functions

func Active

func Active(v bool) predicate.Origin

Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.

func ActiveEQ

func ActiveEQ(v bool) predicate.Origin

ActiveEQ applies the EQ predicate on the "active" field.

func ActiveNEQ

func ActiveNEQ(v bool) predicate.Origin

ActiveNEQ applies the NEQ predicate on the "active" field.

func And

func And(predicates ...predicate.Origin) predicate.Origin

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Origin

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Origin

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Origin

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Origin

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Origin

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Origin

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Origin

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

func CreatedAtNotIn

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

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

func HasPool

func HasPool() predicate.Origin

HasPool applies the HasEdge predicate on the "pool" edge.

func HasPoolWith

func HasPoolWith(preds ...predicate.Pool) predicate.Origin

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id gidx.PrefixedID) predicate.Origin

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...gidx.PrefixedID) predicate.Origin

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id gidx.PrefixedID) predicate.Origin

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id gidx.PrefixedID) predicate.Origin

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...gidx.PrefixedID) predicate.Origin

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Origin

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

func NameContains

func NameContains(v string) predicate.Origin

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

func NameContainsFold

func NameContainsFold(v string) predicate.Origin

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

func NameEQ

func NameEQ(v string) predicate.Origin

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

func NameEqualFold

func NameEqualFold(v string) predicate.Origin

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

func NameGT

func NameGT(v string) predicate.Origin

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

func NameGTE

func NameGTE(v string) predicate.Origin

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Origin

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Origin

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Origin

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

func NameLTE

func NameLTE(v string) predicate.Origin

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

func NameNEQ

func NameNEQ(v string) predicate.Origin

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

func NameNotIn

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

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Origin) predicate.Origin

Or groups predicates with the OR operator between them.

func PoolID

func PoolID(v gidx.PrefixedID) predicate.Origin

PoolID applies equality check predicate on the "pool_id" field. It's identical to PoolIDEQ.

func PoolIDContains

func PoolIDContains(v gidx.PrefixedID) predicate.Origin

PoolIDContains applies the Contains predicate on the "pool_id" field.

func PoolIDContainsFold

func PoolIDContainsFold(v gidx.PrefixedID) predicate.Origin

PoolIDContainsFold applies the ContainsFold predicate on the "pool_id" field.

func PoolIDEQ

func PoolIDEQ(v gidx.PrefixedID) predicate.Origin

PoolIDEQ applies the EQ predicate on the "pool_id" field.

func PoolIDEqualFold

func PoolIDEqualFold(v gidx.PrefixedID) predicate.Origin

PoolIDEqualFold applies the EqualFold predicate on the "pool_id" field.

func PoolIDGT

func PoolIDGT(v gidx.PrefixedID) predicate.Origin

PoolIDGT applies the GT predicate on the "pool_id" field.

func PoolIDGTE

func PoolIDGTE(v gidx.PrefixedID) predicate.Origin

PoolIDGTE applies the GTE predicate on the "pool_id" field.

func PoolIDHasPrefix

func PoolIDHasPrefix(v gidx.PrefixedID) predicate.Origin

PoolIDHasPrefix applies the HasPrefix predicate on the "pool_id" field.

func PoolIDHasSuffix

func PoolIDHasSuffix(v gidx.PrefixedID) predicate.Origin

PoolIDHasSuffix applies the HasSuffix predicate on the "pool_id" field.

func PoolIDIn

func PoolIDIn(vs ...gidx.PrefixedID) predicate.Origin

PoolIDIn applies the In predicate on the "pool_id" field.

func PoolIDLT

func PoolIDLT(v gidx.PrefixedID) predicate.Origin

PoolIDLT applies the LT predicate on the "pool_id" field.

func PoolIDLTE

func PoolIDLTE(v gidx.PrefixedID) predicate.Origin

PoolIDLTE applies the LTE predicate on the "pool_id" field.

func PoolIDNEQ

func PoolIDNEQ(v gidx.PrefixedID) predicate.Origin

PoolIDNEQ applies the NEQ predicate on the "pool_id" field.

func PoolIDNotIn

func PoolIDNotIn(vs ...gidx.PrefixedID) predicate.Origin

PoolIDNotIn applies the NotIn predicate on the "pool_id" field.

func PortNumber

func PortNumber(v int) predicate.Origin

PortNumber applies equality check predicate on the "port_number" field. It's identical to PortNumberEQ.

func PortNumberEQ

func PortNumberEQ(v int) predicate.Origin

PortNumberEQ applies the EQ predicate on the "port_number" field.

func PortNumberGT

func PortNumberGT(v int) predicate.Origin

PortNumberGT applies the GT predicate on the "port_number" field.

func PortNumberGTE

func PortNumberGTE(v int) predicate.Origin

PortNumberGTE applies the GTE predicate on the "port_number" field.

func PortNumberIn

func PortNumberIn(vs ...int) predicate.Origin

PortNumberIn applies the In predicate on the "port_number" field.

func PortNumberLT

func PortNumberLT(v int) predicate.Origin

PortNumberLT applies the LT predicate on the "port_number" field.

func PortNumberLTE

func PortNumberLTE(v int) predicate.Origin

PortNumberLTE applies the LTE predicate on the "port_number" field.

func PortNumberNEQ

func PortNumberNEQ(v int) predicate.Origin

PortNumberNEQ applies the NEQ predicate on the "port_number" field.

func PortNumberNotIn

func PortNumberNotIn(vs ...int) predicate.Origin

PortNumberNotIn applies the NotIn predicate on the "port_number" field.

func Target

func Target(v string) predicate.Origin

Target applies equality check predicate on the "target" field. It's identical to TargetEQ.

func TargetContains

func TargetContains(v string) predicate.Origin

TargetContains applies the Contains predicate on the "target" field.

func TargetContainsFold

func TargetContainsFold(v string) predicate.Origin

TargetContainsFold applies the ContainsFold predicate on the "target" field.

func TargetEQ

func TargetEQ(v string) predicate.Origin

TargetEQ applies the EQ predicate on the "target" field.

func TargetEqualFold

func TargetEqualFold(v string) predicate.Origin

TargetEqualFold applies the EqualFold predicate on the "target" field.

func TargetGT

func TargetGT(v string) predicate.Origin

TargetGT applies the GT predicate on the "target" field.

func TargetGTE

func TargetGTE(v string) predicate.Origin

TargetGTE applies the GTE predicate on the "target" field.

func TargetHasPrefix

func TargetHasPrefix(v string) predicate.Origin

TargetHasPrefix applies the HasPrefix predicate on the "target" field.

func TargetHasSuffix

func TargetHasSuffix(v string) predicate.Origin

TargetHasSuffix applies the HasSuffix predicate on the "target" field.

func TargetIn

func TargetIn(vs ...string) predicate.Origin

TargetIn applies the In predicate on the "target" field.

func TargetLT

func TargetLT(v string) predicate.Origin

TargetLT applies the LT predicate on the "target" field.

func TargetLTE

func TargetLTE(v string) predicate.Origin

TargetLTE applies the LTE predicate on the "target" field.

func TargetNEQ

func TargetNEQ(v string) predicate.Origin

TargetNEQ applies the NEQ predicate on the "target" field.

func TargetNotIn

func TargetNotIn(vs ...string) predicate.Origin

TargetNotIn applies the NotIn predicate on the "target" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Origin

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Origin

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Origin

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Origin

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Origin

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Origin

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Origin

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

func UpdatedAtNotIn

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

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).

func Weight added in v0.0.32

func Weight(v int32) predicate.Origin

Weight applies equality check predicate on the "weight" field. It's identical to WeightEQ.

func WeightEQ added in v0.0.32

func WeightEQ(v int32) predicate.Origin

WeightEQ applies the EQ predicate on the "weight" field.

func WeightGT added in v0.0.32

func WeightGT(v int32) predicate.Origin

WeightGT applies the GT predicate on the "weight" field.

func WeightGTE added in v0.0.32

func WeightGTE(v int32) predicate.Origin

WeightGTE applies the GTE predicate on the "weight" field.

func WeightIn added in v0.0.32

func WeightIn(vs ...int32) predicate.Origin

WeightIn applies the In predicate on the "weight" field.

func WeightLT added in v0.0.32

func WeightLT(v int32) predicate.Origin

WeightLT applies the LT predicate on the "weight" field.

func WeightLTE added in v0.0.32

func WeightLTE(v int32) predicate.Origin

WeightLTE applies the LTE predicate on the "weight" field.

func WeightNEQ added in v0.0.32

func WeightNEQ(v int32) predicate.Origin

WeightNEQ applies the NEQ predicate on the "weight" field.

func WeightNotIn added in v0.0.32

func WeightNotIn(vs ...int32) predicate.Origin

WeightNotIn applies the NotIn predicate on the "weight" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Origin queries.

func ByActive

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

ByActive orders the results by the active field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByName

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

ByName orders the results by the name field.

func ByPoolField

func ByPoolField(field string, opts ...sql.OrderTermOption) OrderOption

ByPoolField orders the results by pool field.

func ByPoolID

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

ByPoolID orders the results by the pool_id field.

func ByPortNumber

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

ByPortNumber orders the results by the port_number field.

func ByTarget

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

ByTarget orders the results by the target field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByWeight added in v0.0.32

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

ByWeight orders the results by the weight field.

Jump to

Keyboard shortcuts

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