membership

package
v0.89.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the membership type in the database.
	Label = "membership"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCurrent holds the string denoting the current field in the database.
	FieldCurrent = "current"
	// 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"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// EdgeOrganization holds the string denoting the organization edge name in mutations.
	EdgeOrganization = "organization"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the membership in the database.
	Table = "memberships"
	// OrganizationTable is the table that holds the organization relation/edge.
	OrganizationTable = "memberships"
	// OrganizationInverseTable is the table name for the Organization entity.
	// It exists in this package in order to avoid circular dependency with the "organization" package.
	OrganizationInverseTable = "organizations"
	// OrganizationColumn is the table column denoting the organization relation/edge.
	OrganizationColumn = "organization_memberships"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "memberships"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_memberships"
)

Variables

View Source
var (
	// DefaultCurrent holds the default value on creation for the "current" field.
	DefaultCurrent 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for membership fields.

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

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

Functions

func And

func And(predicates ...predicate.Membership) predicate.Membership

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Membership

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Membership

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Membership

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Membership

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Membership

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Membership

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Membership

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

func CreatedAtNotIn

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

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

func Current

func Current(v bool) predicate.Membership

Current applies equality check predicate on the "current" field. It's identical to CurrentEQ.

func CurrentEQ

func CurrentEQ(v bool) predicate.Membership

CurrentEQ applies the EQ predicate on the "current" field.

func CurrentNEQ

func CurrentNEQ(v bool) predicate.Membership

CurrentNEQ applies the NEQ predicate on the "current" field.

func HasOrganization

func HasOrganization() predicate.Membership

HasOrganization applies the HasEdge predicate on the "organization" edge.

func HasOrganizationWith

func HasOrganizationWith(preds ...predicate.Organization) predicate.Membership

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

func HasUser

func HasUser() predicate.Membership

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Membership

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Membership

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Membership

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Membership

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Membership

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Membership

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Membership

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Membership

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Membership

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Membership) predicate.Membership

Or groups predicates with the OR operator between them.

func RoleEQ added in v0.75.0

func RoleEQ(v authz.Role) predicate.Membership

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn added in v0.75.0

func RoleIn(vs ...authz.Role) predicate.Membership

RoleIn applies the In predicate on the "role" field.

func RoleNEQ added in v0.75.0

func RoleNEQ(v authz.Role) predicate.Membership

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn added in v0.75.0

func RoleNotIn(vs ...authz.Role) predicate.Membership

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator added in v0.75.0

func RoleValidator(r authz.Role) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Membership

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Membership

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Membership

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Membership

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Membership

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Membership

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Membership

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

func UpdatedAtNotIn

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

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 added in v0.13.0

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Membership queries.

func ByCreatedAt added in v0.13.0

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

ByCreatedAt orders the results by the created_at field.

func ByCurrent added in v0.13.0

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

ByCurrent orders the results by the current field.

func ByID added in v0.13.0

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

ByID orders the results by the id field.

func ByOrganizationField added in v0.13.0

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

ByOrganizationField orders the results by organization field.

func ByRole added in v0.75.0

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

ByRole orders the results by the role field.

func ByUpdatedAt added in v0.13.0

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

ByUpdatedAt orders the results by the updated_at field.

func ByUserField added in v0.13.0

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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