Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Membership) predicate.Membership
- func CreatedAt(v time.Time) predicate.Membership
- func CreatedAtEQ(v time.Time) predicate.Membership
- func CreatedAtGT(v time.Time) predicate.Membership
- func CreatedAtGTE(v time.Time) predicate.Membership
- func CreatedAtIn(vs ...time.Time) predicate.Membership
- func CreatedAtLT(v time.Time) predicate.Membership
- func CreatedAtLTE(v time.Time) predicate.Membership
- func CreatedAtNEQ(v time.Time) predicate.Membership
- func CreatedAtNotIn(vs ...time.Time) predicate.Membership
- func HasOrganization() predicate.Membership
- func HasOrganizationWith(preds ...predicate.Organization) predicate.Membership
- func HasUser() predicate.Membership
- func HasUserWith(preds ...predicate.User) predicate.Membership
- func ID(id uuid.UUID) predicate.Membership
- func IDEQ(id uuid.UUID) predicate.Membership
- func IDGT(id uuid.UUID) predicate.Membership
- func IDGTE(id uuid.UUID) predicate.Membership
- func IDIn(ids ...uuid.UUID) predicate.Membership
- func IDLT(id uuid.UUID) predicate.Membership
- func IDLTE(id uuid.UUID) predicate.Membership
- func IDNEQ(id uuid.UUID) predicate.Membership
- func IDNotIn(ids ...uuid.UUID) predicate.Membership
- func Not(p predicate.Membership) predicate.Membership
- func Or(predicates ...predicate.Membership) predicate.Membership
- func OrganizationID(v uuid.UUID) predicate.Membership
- func OrganizationIDEQ(v uuid.UUID) predicate.Membership
- func OrganizationIDIn(vs ...uuid.UUID) predicate.Membership
- func OrganizationIDNEQ(v uuid.UUID) predicate.Membership
- func OrganizationIDNotIn(vs ...uuid.UUID) predicate.Membership
- func PermissionsIsNil() predicate.Membership
- func PermissionsNotNil() predicate.Membership
- func Role(v string) predicate.Membership
- func RoleContains(v string) predicate.Membership
- func RoleContainsFold(v string) predicate.Membership
- func RoleEQ(v string) predicate.Membership
- func RoleEqualFold(v string) predicate.Membership
- func RoleGT(v string) predicate.Membership
- func RoleGTE(v string) predicate.Membership
- func RoleHasPrefix(v string) predicate.Membership
- func RoleHasSuffix(v string) predicate.Membership
- func RoleIn(vs ...string) predicate.Membership
- func RoleLT(v string) predicate.Membership
- func RoleLTE(v string) predicate.Membership
- func RoleNEQ(v string) predicate.Membership
- func RoleNotIn(vs ...string) predicate.Membership
- func UpdatedAt(v time.Time) predicate.Membership
- func UpdatedAtEQ(v time.Time) predicate.Membership
- func UpdatedAtGT(v time.Time) predicate.Membership
- func UpdatedAtGTE(v time.Time) predicate.Membership
- func UpdatedAtIn(vs ...time.Time) predicate.Membership
- func UpdatedAtLT(v time.Time) predicate.Membership
- func UpdatedAtLTE(v time.Time) predicate.Membership
- func UpdatedAtNEQ(v time.Time) predicate.Membership
- func UpdatedAtNotIn(vs ...time.Time) predicate.Membership
- func UserID(v uuid.UUID) predicate.Membership
- func UserIDEQ(v uuid.UUID) predicate.Membership
- func UserIDIn(vs ...uuid.UUID) predicate.Membership
- func UserIDNEQ(v uuid.UUID) predicate.Membership
- func UserIDNotIn(vs ...uuid.UUID) predicate.Membership
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) 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 ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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" // 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" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldOrganizationID holds the string denoting the organization_id field in the database. FieldOrganizationID = "organization_id" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // FieldPermissions holds the string denoting the permissions field in the database. FieldPermissions = "permissions" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeOrganization holds the string denoting the organization edge name in mutations. EdgeOrganization = "organization" // Table holds the table name of the membership in the database. Table = "cf_memberships" // UserTable is the table that holds the user relation/edge. UserTable = "cf_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 = "cf_users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_id" // OrganizationTable is the table that holds the organization relation/edge. OrganizationTable = "cf_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 = "cf_organizations" // OrganizationColumn is the table column denoting the organization relation/edge. OrganizationColumn = "organization_id" )
Variables ¶
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 // RoleValidator is a validator for the "role" field. It is called by the builders before save. RoleValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldUserID, FieldOrganizationID, FieldRole, FieldPermissions, }
Columns holds all SQL columns for membership fields.
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 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 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 ¶
func Not(p predicate.Membership) predicate.Membership
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 OrganizationID ¶
func OrganizationID(v uuid.UUID) predicate.Membership
OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.
func OrganizationIDEQ ¶
func OrganizationIDEQ(v uuid.UUID) predicate.Membership
OrganizationIDEQ applies the EQ predicate on the "organization_id" field.
func OrganizationIDIn ¶
func OrganizationIDIn(vs ...uuid.UUID) predicate.Membership
OrganizationIDIn applies the In predicate on the "organization_id" field.
func OrganizationIDNEQ ¶
func OrganizationIDNEQ(v uuid.UUID) predicate.Membership
OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.
func OrganizationIDNotIn ¶
func OrganizationIDNotIn(vs ...uuid.UUID) predicate.Membership
OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.
func PermissionsIsNil ¶
func PermissionsIsNil() predicate.Membership
PermissionsIsNil applies the IsNil predicate on the "permissions" field.
func PermissionsNotNil ¶
func PermissionsNotNil() predicate.Membership
PermissionsNotNil applies the NotNil predicate on the "permissions" field.
func Role ¶
func Role(v string) predicate.Membership
Role applies equality check predicate on the "role" field. It's identical to RoleEQ.
func RoleContains ¶
func RoleContains(v string) predicate.Membership
RoleContains applies the Contains predicate on the "role" field.
func RoleContainsFold ¶
func RoleContainsFold(v string) predicate.Membership
RoleContainsFold applies the ContainsFold predicate on the "role" field.
func RoleEQ ¶
func RoleEQ(v string) predicate.Membership
RoleEQ applies the EQ predicate on the "role" field.
func RoleEqualFold ¶
func RoleEqualFold(v string) predicate.Membership
RoleEqualFold applies the EqualFold predicate on the "role" field.
func RoleGT ¶
func RoleGT(v string) predicate.Membership
RoleGT applies the GT predicate on the "role" field.
func RoleGTE ¶
func RoleGTE(v string) predicate.Membership
RoleGTE applies the GTE predicate on the "role" field.
func RoleHasPrefix ¶
func RoleHasPrefix(v string) predicate.Membership
RoleHasPrefix applies the HasPrefix predicate on the "role" field.
func RoleHasSuffix ¶
func RoleHasSuffix(v string) predicate.Membership
RoleHasSuffix applies the HasSuffix predicate on the "role" field.
func RoleIn ¶
func RoleIn(vs ...string) predicate.Membership
RoleIn applies the In predicate on the "role" field.
func RoleLT ¶
func RoleLT(v string) predicate.Membership
RoleLT applies the LT predicate on the "role" field.
func RoleLTE ¶
func RoleLTE(v string) predicate.Membership
RoleLTE applies the LTE predicate on the "role" field.
func RoleNEQ ¶
func RoleNEQ(v string) predicate.Membership
RoleNEQ applies the NEQ predicate on the "role" field.
func RoleNotIn ¶
func RoleNotIn(vs ...string) predicate.Membership
RoleNotIn applies the NotIn predicate on the "role" field.
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 UserID ¶
func UserID(v uuid.UUID) predicate.Membership
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDEQ ¶
func UserIDEQ(v uuid.UUID) predicate.Membership
UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDIn ¶
func UserIDIn(vs ...uuid.UUID) predicate.Membership
UserIDIn applies the In predicate on the "user_id" field.
func UserIDNEQ ¶
func UserIDNEQ(v uuid.UUID) predicate.Membership
UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNotIn ¶
func UserIDNotIn(vs ...uuid.UUID) predicate.Membership
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 Membership queries.
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 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 ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.