Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.GroupMembership) predicate.GroupMembership
- func GroupID(v uuid.UUID) predicate.GroupMembership
- func GroupIDEQ(v uuid.UUID) predicate.GroupMembership
- func GroupIDIn(vs ...uuid.UUID) predicate.GroupMembership
- func GroupIDNEQ(v uuid.UUID) predicate.GroupMembership
- func GroupIDNotIn(vs ...uuid.UUID) predicate.GroupMembership
- func HasGroup() predicate.GroupMembership
- func HasGroupWith(preds ...predicate.Group) predicate.GroupMembership
- func HasProject() predicate.GroupMembership
- func HasProjectWith(preds ...predicate.Project) predicate.GroupMembership
- func Not(p predicate.GroupMembership) predicate.GroupMembership
- func Or(predicates ...predicate.GroupMembership) predicate.GroupMembership
- func ProjectID(v uuid.UUID) predicate.GroupMembership
- func ProjectIDEQ(v uuid.UUID) predicate.GroupMembership
- func ProjectIDIn(vs ...uuid.UUID) predicate.GroupMembership
- func ProjectIDNEQ(v uuid.UUID) predicate.GroupMembership
- func ProjectIDNotIn(vs ...uuid.UUID) predicate.GroupMembership
- func RoleEQ(v Role) predicate.GroupMembership
- func RoleIn(vs ...Role) predicate.GroupMembership
- func RoleNEQ(v Role) predicate.GroupMembership
- func RoleNotIn(vs ...Role) predicate.GroupMembership
- func RoleValidator(r Role) error
- func ValidColumn(column string) bool
- type OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByGroupID(opts ...sql.OrderTermOption) OrderOption
- func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByProjectID(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- type Role
Constants ¶
const ( // Label holds the string label denoting the groupmembership type in the database. Label = "group_membership" // FieldProjectID holds the string denoting the project_id field in the database. FieldProjectID = "project_id" // FieldGroupID holds the string denoting the group_id field in the database. FieldGroupID = "group_id" // FieldRole holds the string denoting the role field in the database. FieldRole = "role" // EdgeProject holds the string denoting the project edge name in mutations. EdgeProject = "project" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // ProjectFieldID holds the string denoting the ID field of the Project. ProjectFieldID = "id" // GroupFieldID holds the string denoting the ID field of the Group. GroupFieldID = "id" // Table holds the table name of the groupmembership in the database. Table = "group_memberships" // ProjectTable is the table that holds the project relation/edge. ProjectTable = "group_memberships" // ProjectInverseTable is the table name for the Project entity. // It exists in this package in order to avoid circular dependency with the "project" package. ProjectInverseTable = "projects" // ProjectColumn is the table column denoting the project relation/edge. ProjectColumn = "project_id" // GroupTable is the table that holds the group relation/edge. GroupTable = "group_memberships" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_id" )
const DefaultRole = RoleDeployer
RoleDeployer is the default value of the Role enum.
Variables ¶
var Columns = []string{ FieldProjectID, FieldGroupID, FieldRole, }
Columns holds all SQL columns for groupmembership fields.
Functions ¶
func And ¶
func And(predicates ...predicate.GroupMembership) predicate.GroupMembership
And groups predicates with the AND operator between them.
func GroupID ¶
func GroupID(v uuid.UUID) predicate.GroupMembership
GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
func GroupIDEQ ¶
func GroupIDEQ(v uuid.UUID) predicate.GroupMembership
GroupIDEQ applies the EQ predicate on the "group_id" field.
func GroupIDIn ¶
func GroupIDIn(vs ...uuid.UUID) predicate.GroupMembership
GroupIDIn applies the In predicate on the "group_id" field.
func GroupIDNEQ ¶
func GroupIDNEQ(v uuid.UUID) predicate.GroupMembership
GroupIDNEQ applies the NEQ predicate on the "group_id" field.
func GroupIDNotIn ¶
func GroupIDNotIn(vs ...uuid.UUID) predicate.GroupMembership
GroupIDNotIn applies the NotIn predicate on the "group_id" field.
func HasGroup ¶
func HasGroup() predicate.GroupMembership
HasGroup applies the HasEdge predicate on the "group" edge.
func HasGroupWith ¶
func HasGroupWith(preds ...predicate.Group) predicate.GroupMembership
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasProject ¶
func HasProject() predicate.GroupMembership
HasProject applies the HasEdge predicate on the "project" edge.
func HasProjectWith ¶
func HasProjectWith(preds ...predicate.Project) predicate.GroupMembership
HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).
func Not ¶
func Not(p predicate.GroupMembership) predicate.GroupMembership
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.GroupMembership) predicate.GroupMembership
Or groups predicates with the OR operator between them.
func ProjectID ¶
func ProjectID(v uuid.UUID) predicate.GroupMembership
ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.
func ProjectIDEQ ¶
func ProjectIDEQ(v uuid.UUID) predicate.GroupMembership
ProjectIDEQ applies the EQ predicate on the "project_id" field.
func ProjectIDIn ¶
func ProjectIDIn(vs ...uuid.UUID) predicate.GroupMembership
ProjectIDIn applies the In predicate on the "project_id" field.
func ProjectIDNEQ ¶
func ProjectIDNEQ(v uuid.UUID) predicate.GroupMembership
ProjectIDNEQ applies the NEQ predicate on the "project_id" field.
func ProjectIDNotIn ¶
func ProjectIDNotIn(vs ...uuid.UUID) predicate.GroupMembership
ProjectIDNotIn applies the NotIn predicate on the "project_id" field.
func RoleEQ ¶
func RoleEQ(v Role) predicate.GroupMembership
RoleEQ applies the EQ predicate on the "role" field.
func RoleIn ¶
func RoleIn(vs ...Role) predicate.GroupMembership
RoleIn applies the In predicate on the "role" field.
func RoleNEQ ¶
func RoleNEQ(v Role) predicate.GroupMembership
RoleNEQ applies the NEQ predicate on the "role" field.
func RoleNotIn ¶
func RoleNotIn(vs ...Role) predicate.GroupMembership
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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the GroupMembership queries.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByGroupID ¶
func ByGroupID(opts ...sql.OrderTermOption) OrderOption
ByGroupID orders the results by the group_id field.
func ByProjectField ¶
func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption
ByProjectField orders the results by project field.
func ByProjectID ¶
func ByProjectID(opts ...sql.OrderTermOption) OrderOption
ByProjectID orders the results by the project_id field.
func ByRole ¶
func ByRole(opts ...sql.OrderTermOption) OrderOption
ByRole orders the results by the role field.