Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.OrgMembership) predicate.OrgMembership
- func HasOrganization() predicate.OrgMembership
- func HasOrganizationWith(preds ...predicate.Organization) predicate.OrgMembership
- func ID(id string) predicate.OrgMembership
- func IDContainsFold(id string) predicate.OrgMembership
- func IDEQ(id string) predicate.OrgMembership
- func IDEqualFold(id string) predicate.OrgMembership
- func IDGT(id string) predicate.OrgMembership
- func IDGTE(id string) predicate.OrgMembership
- func IDIn(ids ...string) predicate.OrgMembership
- func IDLT(id string) predicate.OrgMembership
- func IDLTE(id string) predicate.OrgMembership
- func IDNEQ(id string) predicate.OrgMembership
- func IDNotIn(ids ...string) predicate.OrgMembership
- func Not(p predicate.OrgMembership) predicate.OrgMembership
- func Or(predicates ...predicate.OrgMembership) predicate.OrgMembership
- func OrganizationID(v string) predicate.OrgMembership
- func OrganizationIDContains(v string) predicate.OrgMembership
- func OrganizationIDContainsFold(v string) predicate.OrgMembership
- func OrganizationIDEQ(v string) predicate.OrgMembership
- func OrganizationIDEqualFold(v string) predicate.OrgMembership
- func OrganizationIDGT(v string) predicate.OrgMembership
- func OrganizationIDGTE(v string) predicate.OrgMembership
- func OrganizationIDHasPrefix(v string) predicate.OrgMembership
- func OrganizationIDHasSuffix(v string) predicate.OrgMembership
- func OrganizationIDIn(vs ...string) predicate.OrgMembership
- func OrganizationIDLT(v string) predicate.OrgMembership
- func OrganizationIDLTE(v string) predicate.OrgMembership
- func OrganizationIDNEQ(v string) predicate.OrgMembership
- func OrganizationIDNotIn(vs ...string) predicate.OrgMembership
- func RoleEQ(v enums.Role) predicate.OrgMembership
- func RoleIn(vs ...enums.Role) predicate.OrgMembership
- func RoleNEQ(v enums.Role) predicate.OrgMembership
- func RoleNotIn(vs ...enums.Role) predicate.OrgMembership
- func RoleValidator(r enums.Role) error
- func UserID(v string) predicate.OrgMembership
- func UserIDContains(v string) predicate.OrgMembership
- func UserIDContainsFold(v string) predicate.OrgMembership
- func UserIDEQ(v string) predicate.OrgMembership
- func UserIDEqualFold(v string) predicate.OrgMembership
- func UserIDGT(v string) predicate.OrgMembership
- func UserIDGTE(v string) predicate.OrgMembership
- func UserIDHasPrefix(v string) predicate.OrgMembership
- func UserIDHasSuffix(v string) predicate.OrgMembership
- func UserIDIn(vs ...string) predicate.OrgMembership
- func UserIDLT(v string) predicate.OrgMembership
- func UserIDLTE(v string) predicate.OrgMembership
- func UserIDNEQ(v string) predicate.OrgMembership
- func UserIDNotIn(vs ...string) predicate.OrgMembership
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the orgmembership type in the database. Label = "org_membership" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldOrganizationID holds the string denoting the organization_id field in the database. FieldOrganizationID = "organization_id" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // EdgeOrganization holds the string denoting the organization edge name in mutations. EdgeOrganization = "organization" // Table holds the table name of the orgmembership in the database. Table = "org_memberships" // OrganizationTable is the table that holds the organization relation/edge. OrganizationTable = "org_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_id" )
const DefaultRole enums.Role = "MEMBER"
Variables ¶
var ( Hooks [1]ent.Hook Policy ent.Policy )
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/theopenlane/iam/entfga/_examples/basic/ent/runtime"
var Columns = []string{ FieldID, FieldRole, FieldOrganizationID, FieldUserID, }
Columns holds all SQL columns for orgmembership fields.
Functions ¶
func And ¶
func And(predicates ...predicate.OrgMembership) predicate.OrgMembership
And groups predicates with the AND operator between them.
func HasOrganization ¶
func HasOrganization() predicate.OrgMembership
HasOrganization applies the HasEdge predicate on the "organization" edge.
func HasOrganizationWith ¶
func HasOrganizationWith(preds ...predicate.Organization) predicate.OrgMembership
HasOrganizationWith applies the HasEdge predicate on the "organization" edge with a given conditions (other predicates).
func IDContainsFold ¶
func IDContainsFold(id string) predicate.OrgMembership
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEQ ¶
func IDEQ(id string) predicate.OrgMembership
IDEQ applies the EQ predicate on the ID field.
func IDEqualFold ¶
func IDEqualFold(id string) predicate.OrgMembership
IDEqualFold applies the EqualFold predicate on the ID field.
func IDGT ¶
func IDGT(id string) predicate.OrgMembership
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id string) predicate.OrgMembership
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...string) predicate.OrgMembership
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id string) predicate.OrgMembership
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id string) predicate.OrgMembership
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id string) predicate.OrgMembership
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...string) predicate.OrgMembership
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.OrgMembership) predicate.OrgMembership
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.OrgMembership) predicate.OrgMembership
Or groups predicates with the OR operator between them.
func OrganizationID ¶
func OrganizationID(v string) predicate.OrgMembership
OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.
func OrganizationIDContains ¶
func OrganizationIDContains(v string) predicate.OrgMembership
OrganizationIDContains applies the Contains predicate on the "organization_id" field.
func OrganizationIDContainsFold ¶
func OrganizationIDContainsFold(v string) predicate.OrgMembership
OrganizationIDContainsFold applies the ContainsFold predicate on the "organization_id" field.
func OrganizationIDEQ ¶
func OrganizationIDEQ(v string) predicate.OrgMembership
OrganizationIDEQ applies the EQ predicate on the "organization_id" field.
func OrganizationIDEqualFold ¶
func OrganizationIDEqualFold(v string) predicate.OrgMembership
OrganizationIDEqualFold applies the EqualFold predicate on the "organization_id" field.
func OrganizationIDGT ¶
func OrganizationIDGT(v string) predicate.OrgMembership
OrganizationIDGT applies the GT predicate on the "organization_id" field.
func OrganizationIDGTE ¶
func OrganizationIDGTE(v string) predicate.OrgMembership
OrganizationIDGTE applies the GTE predicate on the "organization_id" field.
func OrganizationIDHasPrefix ¶
func OrganizationIDHasPrefix(v string) predicate.OrgMembership
OrganizationIDHasPrefix applies the HasPrefix predicate on the "organization_id" field.
func OrganizationIDHasSuffix ¶
func OrganizationIDHasSuffix(v string) predicate.OrgMembership
OrganizationIDHasSuffix applies the HasSuffix predicate on the "organization_id" field.
func OrganizationIDIn ¶
func OrganizationIDIn(vs ...string) predicate.OrgMembership
OrganizationIDIn applies the In predicate on the "organization_id" field.
func OrganizationIDLT ¶
func OrganizationIDLT(v string) predicate.OrgMembership
OrganizationIDLT applies the LT predicate on the "organization_id" field.
func OrganizationIDLTE ¶
func OrganizationIDLTE(v string) predicate.OrgMembership
OrganizationIDLTE applies the LTE predicate on the "organization_id" field.
func OrganizationIDNEQ ¶
func OrganizationIDNEQ(v string) predicate.OrgMembership
OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.
func OrganizationIDNotIn ¶
func OrganizationIDNotIn(vs ...string) predicate.OrgMembership
OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.
func RoleEQ ¶
func RoleEQ(v enums.Role) predicate.OrgMembership
RoleEQ applies the EQ predicate on the "role" field.
func RoleIn ¶
func RoleIn(vs ...enums.Role) predicate.OrgMembership
RoleIn applies the In predicate on the "role" field.
func RoleNEQ ¶
func RoleNEQ(v enums.Role) predicate.OrgMembership
RoleNEQ applies the NEQ predicate on the "role" field.
func RoleNotIn ¶
func RoleNotIn(vs ...enums.Role) predicate.OrgMembership
RoleNotIn applies the NotIn predicate on the "role" field.
func RoleValidator ¶
RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.
func UserID ¶
func UserID(v string) predicate.OrgMembership
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDContains ¶
func UserIDContains(v string) predicate.OrgMembership
UserIDContains applies the Contains predicate on the "user_id" field.
func UserIDContainsFold ¶
func UserIDContainsFold(v string) predicate.OrgMembership
UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.
func UserIDEQ ¶
func UserIDEQ(v string) predicate.OrgMembership
UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEqualFold ¶
func UserIDEqualFold(v string) predicate.OrgMembership
UserIDEqualFold applies the EqualFold predicate on the "user_id" field.
func UserIDGT ¶
func UserIDGT(v string) predicate.OrgMembership
UserIDGT applies the GT predicate on the "user_id" field.
func UserIDGTE ¶
func UserIDGTE(v string) predicate.OrgMembership
UserIDGTE applies the GTE predicate on the "user_id" field.
func UserIDHasPrefix ¶
func UserIDHasPrefix(v string) predicate.OrgMembership
UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.
func UserIDHasSuffix ¶
func UserIDHasSuffix(v string) predicate.OrgMembership
UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.
func UserIDIn ¶
func UserIDIn(vs ...string) predicate.OrgMembership
UserIDIn applies the In predicate on the "user_id" field.
func UserIDLT ¶
func UserIDLT(v string) predicate.OrgMembership
UserIDLT applies the LT predicate on the "user_id" field.
func UserIDLTE ¶
func UserIDLTE(v string) predicate.OrgMembership
UserIDLTE applies the LTE predicate on the "user_id" field.
func UserIDNEQ ¶
func UserIDNEQ(v string) predicate.OrgMembership
UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNotIn ¶
func UserIDNotIn(vs ...string) predicate.OrgMembership
UserIDNotIn applies the NotIn predicate on the "user_id" 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 OrgMembership queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByOrganizationField ¶
func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption
ByOrganizationField orders the results by organization field.
func ByOrganizationID ¶
func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption
ByOrganizationID orders the results by the organization_id field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.