site

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the site type in the database.
	Label = "site"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldIsDefault holds the string denoting the is_default field in the database.
	FieldIsDefault = "is_default"
	// FieldDomain holds the string denoting the domain field in the database.
	FieldDomain = "domain"
	// FieldCreated holds the string denoting the created field in the database.
	FieldCreated = "created"
	// FieldModified holds the string denoting the modified field in the database.
	FieldModified = "modified"
	// EdgeTenant holds the string denoting the tenant edge name in mutations.
	EdgeTenant = "tenant"
	// EdgeAgents holds the string denoting the agents edge name in mutations.
	EdgeAgents = "agents"
	// EdgeProfiles holds the string denoting the profiles edge name in mutations.
	EdgeProfiles = "profiles"
	// AgentFieldID holds the string denoting the ID field of the Agent.
	AgentFieldID = "oid"
	// Table holds the table name of the site in the database.
	Table = "sites"
	// TenantTable is the table that holds the tenant relation/edge.
	TenantTable = "sites"
	// TenantInverseTable is the table name for the Tenant entity.
	// It exists in this package in order to avoid circular dependency with the "tenant" package.
	TenantInverseTable = "tenants"
	// TenantColumn is the table column denoting the tenant relation/edge.
	TenantColumn = "tenant_sites"
	// AgentsTable is the table that holds the agents relation/edge. The primary key declared below.
	AgentsTable = "site_agents"
	// AgentsInverseTable is the table name for the Agent entity.
	// It exists in this package in order to avoid circular dependency with the "agent" package.
	AgentsInverseTable = "agents"
	// ProfilesTable is the table that holds the profiles relation/edge.
	ProfilesTable = "profiles"
	// ProfilesInverseTable is the table name for the Profile entity.
	// It exists in this package in order to avoid circular dependency with the "profile" package.
	ProfilesInverseTable = "profiles"
	// ProfilesColumn is the table column denoting the profiles relation/edge.
	ProfilesColumn = "site_profiles"
)

Variables

View Source
var (
	// DefaultCreated holds the default value on creation for the "created" field.
	DefaultCreated func() time.Time
	// DefaultModified holds the default value on creation for the "modified" field.
	DefaultModified func() time.Time
	// UpdateDefaultModified holds the default value on update for the "modified" field.
	UpdateDefaultModified func() time.Time
)
View Source
var (
	// AgentsPrimaryKey and AgentsColumn2 are the table columns denoting the
	// primary key for the agents relation (M2M).
	AgentsPrimaryKey = []string{"site_id", "agent_id"}
)

Columns holds all SQL columns for site fields.

View Source
var ForeignKeys = []string{
	"tenant_sites",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "sites" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Site) predicate.Site

And groups predicates with the AND operator between them.

func Created

func Created(v time.Time) predicate.Site

Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.

func CreatedEQ

func CreatedEQ(v time.Time) predicate.Site

CreatedEQ applies the EQ predicate on the "created" field.

func CreatedGT

func CreatedGT(v time.Time) predicate.Site

CreatedGT applies the GT predicate on the "created" field.

func CreatedGTE

func CreatedGTE(v time.Time) predicate.Site

CreatedGTE applies the GTE predicate on the "created" field.

func CreatedIn

func CreatedIn(vs ...time.Time) predicate.Site

CreatedIn applies the In predicate on the "created" field.

func CreatedIsNil

func CreatedIsNil() predicate.Site

CreatedIsNil applies the IsNil predicate on the "created" field.

func CreatedLT

func CreatedLT(v time.Time) predicate.Site

CreatedLT applies the LT predicate on the "created" field.

func CreatedLTE

func CreatedLTE(v time.Time) predicate.Site

CreatedLTE applies the LTE predicate on the "created" field.

func CreatedNEQ

func CreatedNEQ(v time.Time) predicate.Site

CreatedNEQ applies the NEQ predicate on the "created" field.

func CreatedNotIn

func CreatedNotIn(vs ...time.Time) predicate.Site

CreatedNotIn applies the NotIn predicate on the "created" field.

func CreatedNotNil

func CreatedNotNil() predicate.Site

CreatedNotNil applies the NotNil predicate on the "created" field.

func Description

func Description(v string) predicate.Site

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Site

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Site

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Site

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Site

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Site

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Site

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Site

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Site

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Site

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Site

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Site

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Site

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Site

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Site

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Site

DescriptionNotNil applies the NotNil predicate on the "description" field.

func Domain

func Domain(v string) predicate.Site

Domain applies equality check predicate on the "domain" field. It's identical to DomainEQ.

func DomainContains

func DomainContains(v string) predicate.Site

DomainContains applies the Contains predicate on the "domain" field.

func DomainContainsFold

func DomainContainsFold(v string) predicate.Site

DomainContainsFold applies the ContainsFold predicate on the "domain" field.

func DomainEQ

func DomainEQ(v string) predicate.Site

DomainEQ applies the EQ predicate on the "domain" field.

func DomainEqualFold

func DomainEqualFold(v string) predicate.Site

DomainEqualFold applies the EqualFold predicate on the "domain" field.

func DomainGT

func DomainGT(v string) predicate.Site

DomainGT applies the GT predicate on the "domain" field.

func DomainGTE

func DomainGTE(v string) predicate.Site

DomainGTE applies the GTE predicate on the "domain" field.

func DomainHasPrefix

func DomainHasPrefix(v string) predicate.Site

DomainHasPrefix applies the HasPrefix predicate on the "domain" field.

func DomainHasSuffix

func DomainHasSuffix(v string) predicate.Site

DomainHasSuffix applies the HasSuffix predicate on the "domain" field.

func DomainIn

func DomainIn(vs ...string) predicate.Site

DomainIn applies the In predicate on the "domain" field.

func DomainIsNil

func DomainIsNil() predicate.Site

DomainIsNil applies the IsNil predicate on the "domain" field.

func DomainLT

func DomainLT(v string) predicate.Site

DomainLT applies the LT predicate on the "domain" field.

func DomainLTE

func DomainLTE(v string) predicate.Site

DomainLTE applies the LTE predicate on the "domain" field.

func DomainNEQ

func DomainNEQ(v string) predicate.Site

DomainNEQ applies the NEQ predicate on the "domain" field.

func DomainNotIn

func DomainNotIn(vs ...string) predicate.Site

DomainNotIn applies the NotIn predicate on the "domain" field.

func DomainNotNil

func DomainNotNil() predicate.Site

DomainNotNil applies the NotNil predicate on the "domain" field.

func HasAgents

func HasAgents() predicate.Site

HasAgents applies the HasEdge predicate on the "agents" edge.

func HasAgentsWith

func HasAgentsWith(preds ...predicate.Agent) predicate.Site

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

func HasProfiles

func HasProfiles() predicate.Site

HasProfiles applies the HasEdge predicate on the "profiles" edge.

func HasProfilesWith

func HasProfilesWith(preds ...predicate.Profile) predicate.Site

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

func HasTenant

func HasTenant() predicate.Site

HasTenant applies the HasEdge predicate on the "tenant" edge.

func HasTenantWith

func HasTenantWith(preds ...predicate.Tenant) predicate.Site

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

func ID

func ID(id int) predicate.Site

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Site

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Site

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Site

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Site

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Site

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Site

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Site

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Site

IDNotIn applies the NotIn predicate on the ID field.

func IsDefault

func IsDefault(v bool) predicate.Site

IsDefault applies equality check predicate on the "is_default" field. It's identical to IsDefaultEQ.

func IsDefaultEQ

func IsDefaultEQ(v bool) predicate.Site

IsDefaultEQ applies the EQ predicate on the "is_default" field.

func IsDefaultIsNil

func IsDefaultIsNil() predicate.Site

IsDefaultIsNil applies the IsNil predicate on the "is_default" field.

func IsDefaultNEQ

func IsDefaultNEQ(v bool) predicate.Site

IsDefaultNEQ applies the NEQ predicate on the "is_default" field.

func IsDefaultNotNil

func IsDefaultNotNil() predicate.Site

IsDefaultNotNil applies the NotNil predicate on the "is_default" field.

func Modified

func Modified(v time.Time) predicate.Site

Modified applies equality check predicate on the "modified" field. It's identical to ModifiedEQ.

func ModifiedEQ

func ModifiedEQ(v time.Time) predicate.Site

ModifiedEQ applies the EQ predicate on the "modified" field.

func ModifiedGT

func ModifiedGT(v time.Time) predicate.Site

ModifiedGT applies the GT predicate on the "modified" field.

func ModifiedGTE

func ModifiedGTE(v time.Time) predicate.Site

ModifiedGTE applies the GTE predicate on the "modified" field.

func ModifiedIn

func ModifiedIn(vs ...time.Time) predicate.Site

ModifiedIn applies the In predicate on the "modified" field.

func ModifiedIsNil

func ModifiedIsNil() predicate.Site

ModifiedIsNil applies the IsNil predicate on the "modified" field.

func ModifiedLT

func ModifiedLT(v time.Time) predicate.Site

ModifiedLT applies the LT predicate on the "modified" field.

func ModifiedLTE

func ModifiedLTE(v time.Time) predicate.Site

ModifiedLTE applies the LTE predicate on the "modified" field.

func ModifiedNEQ

func ModifiedNEQ(v time.Time) predicate.Site

ModifiedNEQ applies the NEQ predicate on the "modified" field.

func ModifiedNotIn

func ModifiedNotIn(vs ...time.Time) predicate.Site

ModifiedNotIn applies the NotIn predicate on the "modified" field.

func ModifiedNotNil

func ModifiedNotNil() predicate.Site

ModifiedNotNil applies the NotNil predicate on the "modified" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Site) predicate.Site

Or groups predicates with the OR operator between them.

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 Site queries.

func ByAgents

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

ByAgents orders the results by agents terms.

func ByAgentsCount

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

ByAgentsCount orders the results by agents count.

func ByCreated

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

ByCreated orders the results by the created field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByDomain

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

ByDomain orders the results by the domain field.

func ByID

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

ByID orders the results by the id field.

func ByIsDefault

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

ByIsDefault orders the results by the is_default field.

func ByModified

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

ByModified orders the results by the modified field.

func ByProfiles

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

ByProfiles orders the results by profiles terms.

func ByProfilesCount

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

ByProfilesCount orders the results by profiles count.

func ByTenantField

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

ByTenantField orders the results by tenant field.

Jump to

Keyboard shortcuts

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