org

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the org type in the database.
	Label = "org"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldSlug holds the string denoting the slug field in the database.
	FieldSlug = "slug"
	// FieldPlan holds the string denoting the plan field in the database.
	FieldPlan = "plan"
	// FieldTrafficRetentionDays holds the string denoting the traffic_retention_days field in the database.
	FieldTrafficRetentionDays = "traffic_retention_days"
	// FieldMaxProxies holds the string denoting the max_proxies field in the database.
	FieldMaxProxies = "max_proxies"
	// FieldActive holds the string denoting the active field in the database.
	FieldActive = "active"
	// 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"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgeProxies holds the string denoting the proxies edge name in mutations.
	EdgeProxies = "proxies"
	// Table holds the table name of the org in the database.
	Table = "orgs"
	// UsersTable is the table that holds the users relation/edge.
	UsersTable = "users"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// UsersColumn is the table column denoting the users relation/edge.
	UsersColumn = "org_users"
	// ProxiesTable is the table that holds the proxies relation/edge.
	ProxiesTable = "proxies"
	// ProxiesInverseTable is the table name for the Proxy entity.
	// It exists in this package in order to avoid circular dependency with the "proxy" package.
	ProxiesInverseTable = "proxies"
	// ProxiesColumn is the table column denoting the proxies relation/edge.
	ProxiesColumn = "org_proxies"
)
View Source
const DefaultPlan = PlanFree

PlanFree is the default value of the Plan enum.

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// SlugValidator is a validator for the "slug" field. It is called by the builders before save.
	SlugValidator func(string) error
	// DefaultTrafficRetentionDays holds the default value on creation for the "traffic_retention_days" field.
	DefaultTrafficRetentionDays int
	// DefaultMaxProxies holds the default value on creation for the "max_proxies" field.
	DefaultMaxProxies int
	// DefaultActive holds the default value on creation for the "active" field.
	DefaultActive bool
	// 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
)

Columns holds all SQL columns for org fields.

Functions

func Active

func Active(v bool) predicate.Org

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

func ActiveEQ

func ActiveEQ(v bool) predicate.Org

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

func ActiveNEQ

func ActiveNEQ(v bool) predicate.Org

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

func And

func And(predicates ...predicate.Org) predicate.Org

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Org

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Org

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Org

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Org

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Org

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Org

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Org

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

func CreatedAtNotIn

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

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

func HasProxies

func HasProxies() predicate.Org

HasProxies applies the HasEdge predicate on the "proxies" edge.

func HasProxiesWith

func HasProxiesWith(preds ...predicate.Proxy) predicate.Org

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

func HasUsers

func HasUsers() predicate.Org

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.Org

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

func ID

func ID(id int) predicate.Org

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Org

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Org

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Org

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Org

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Org

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Org

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func MaxProxies

func MaxProxies(v int) predicate.Org

MaxProxies applies equality check predicate on the "max_proxies" field. It's identical to MaxProxiesEQ.

func MaxProxiesEQ

func MaxProxiesEQ(v int) predicate.Org

MaxProxiesEQ applies the EQ predicate on the "max_proxies" field.

func MaxProxiesGT

func MaxProxiesGT(v int) predicate.Org

MaxProxiesGT applies the GT predicate on the "max_proxies" field.

func MaxProxiesGTE

func MaxProxiesGTE(v int) predicate.Org

MaxProxiesGTE applies the GTE predicate on the "max_proxies" field.

func MaxProxiesIn

func MaxProxiesIn(vs ...int) predicate.Org

MaxProxiesIn applies the In predicate on the "max_proxies" field.

func MaxProxiesLT

func MaxProxiesLT(v int) predicate.Org

MaxProxiesLT applies the LT predicate on the "max_proxies" field.

func MaxProxiesLTE

func MaxProxiesLTE(v int) predicate.Org

MaxProxiesLTE applies the LTE predicate on the "max_proxies" field.

func MaxProxiesNEQ

func MaxProxiesNEQ(v int) predicate.Org

MaxProxiesNEQ applies the NEQ predicate on the "max_proxies" field.

func MaxProxiesNotIn

func MaxProxiesNotIn(vs ...int) predicate.Org

MaxProxiesNotIn applies the NotIn predicate on the "max_proxies" field.

func Name

func Name(v string) predicate.Org

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

func NameContains

func NameContains(v string) predicate.Org

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

func NameContainsFold

func NameContainsFold(v string) predicate.Org

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

func NameEQ

func NameEQ(v string) predicate.Org

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

func NameEqualFold

func NameEqualFold(v string) predicate.Org

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

func NameGT

func NameGT(v string) predicate.Org

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

func NameGTE

func NameGTE(v string) predicate.Org

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Org

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Org

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Org

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

func NameLTE

func NameLTE(v string) predicate.Org

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

func NameNEQ

func NameNEQ(v string) predicate.Org

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

func NameNotIn

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

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

func Not

func Not(p predicate.Org) predicate.Org

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Org) predicate.Org

Or groups predicates with the OR operator between them.

func PlanEQ

func PlanEQ(v Plan) predicate.Org

PlanEQ applies the EQ predicate on the "plan" field.

func PlanIn

func PlanIn(vs ...Plan) predicate.Org

PlanIn applies the In predicate on the "plan" field.

func PlanNEQ

func PlanNEQ(v Plan) predicate.Org

PlanNEQ applies the NEQ predicate on the "plan" field.

func PlanNotIn

func PlanNotIn(vs ...Plan) predicate.Org

PlanNotIn applies the NotIn predicate on the "plan" field.

func PlanValidator

func PlanValidator(pl Plan) error

PlanValidator is a validator for the "plan" field enum values. It is called by the builders before save.

func Slug

func Slug(v string) predicate.Org

Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.

func SlugContains

func SlugContains(v string) predicate.Org

SlugContains applies the Contains predicate on the "slug" field.

func SlugContainsFold

func SlugContainsFold(v string) predicate.Org

SlugContainsFold applies the ContainsFold predicate on the "slug" field.

func SlugEQ

func SlugEQ(v string) predicate.Org

SlugEQ applies the EQ predicate on the "slug" field.

func SlugEqualFold

func SlugEqualFold(v string) predicate.Org

SlugEqualFold applies the EqualFold predicate on the "slug" field.

func SlugGT

func SlugGT(v string) predicate.Org

SlugGT applies the GT predicate on the "slug" field.

func SlugGTE

func SlugGTE(v string) predicate.Org

SlugGTE applies the GTE predicate on the "slug" field.

func SlugHasPrefix

func SlugHasPrefix(v string) predicate.Org

SlugHasPrefix applies the HasPrefix predicate on the "slug" field.

func SlugHasSuffix

func SlugHasSuffix(v string) predicate.Org

SlugHasSuffix applies the HasSuffix predicate on the "slug" field.

func SlugIn

func SlugIn(vs ...string) predicate.Org

SlugIn applies the In predicate on the "slug" field.

func SlugLT

func SlugLT(v string) predicate.Org

SlugLT applies the LT predicate on the "slug" field.

func SlugLTE

func SlugLTE(v string) predicate.Org

SlugLTE applies the LTE predicate on the "slug" field.

func SlugNEQ

func SlugNEQ(v string) predicate.Org

SlugNEQ applies the NEQ predicate on the "slug" field.

func SlugNotIn

func SlugNotIn(vs ...string) predicate.Org

SlugNotIn applies the NotIn predicate on the "slug" field.

func TrafficRetentionDays

func TrafficRetentionDays(v int) predicate.Org

TrafficRetentionDays applies equality check predicate on the "traffic_retention_days" field. It's identical to TrafficRetentionDaysEQ.

func TrafficRetentionDaysEQ

func TrafficRetentionDaysEQ(v int) predicate.Org

TrafficRetentionDaysEQ applies the EQ predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysGT

func TrafficRetentionDaysGT(v int) predicate.Org

TrafficRetentionDaysGT applies the GT predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysGTE

func TrafficRetentionDaysGTE(v int) predicate.Org

TrafficRetentionDaysGTE applies the GTE predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysIn

func TrafficRetentionDaysIn(vs ...int) predicate.Org

TrafficRetentionDaysIn applies the In predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysLT

func TrafficRetentionDaysLT(v int) predicate.Org

TrafficRetentionDaysLT applies the LT predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysLTE

func TrafficRetentionDaysLTE(v int) predicate.Org

TrafficRetentionDaysLTE applies the LTE predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysNEQ

func TrafficRetentionDaysNEQ(v int) predicate.Org

TrafficRetentionDaysNEQ applies the NEQ predicate on the "traffic_retention_days" field.

func TrafficRetentionDaysNotIn

func TrafficRetentionDaysNotIn(vs ...int) predicate.Org

TrafficRetentionDaysNotIn applies the NotIn predicate on the "traffic_retention_days" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Org

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Org

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Org

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Org

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Org

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Org

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Org

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

func UpdatedAtNotIn

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

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 Org 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 ByMaxProxies

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

ByMaxProxies orders the results by the max_proxies field.

func ByName

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

ByName orders the results by the name field.

func ByPlan

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

ByPlan orders the results by the plan field.

func ByProxies

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

ByProxies orders the results by proxies terms.

func ByProxiesCount

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

ByProxiesCount orders the results by proxies count.

func BySlug

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

BySlug orders the results by the slug field.

func ByTrafficRetentionDays

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

ByTrafficRetentionDays orders the results by the traffic_retention_days field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUsers

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

ByUsers orders the results by users terms.

func ByUsersCount

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

ByUsersCount orders the results by users count.

type Plan

type Plan string

Plan defines the type for the "plan" enum field.

const (
	PlanFree       Plan = "free"
	PlanTeam       Plan = "team"
	PlanEnterprise Plan = "enterprise"
)

Plan values.

func (Plan) String

func (pl Plan) String() string

Jump to

Keyboard shortcuts

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