groupmembership

package
v0.0.0-...-e59a564 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultRole = RoleDeployer

RoleDeployer is the default value of the Role enum.

Variables

Columns holds all SQL columns for groupmembership fields.

Functions

func And

And groups predicates with the AND operator between them.

func GroupID

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

Not applies the not operator on the given predicate.

func Or

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

func RoleValidator(r Role) error

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

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 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.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleViewer    Role = "viewer"
	RoleDeployer  Role = "deployer"
	RoleDeveloper Role = "developer"
	RoleAdmin     Role = "admin"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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