projectcontributor

package
v0.0.0-...-5435fe0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the projectcontributor type in the database.
	Label = "project_contributor"
	// 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"
	// EdgeProject holds the string denoting the project edge name in mutations.
	EdgeProject = "project"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the projectcontributor in the database.
	Table = "project_contributors"
	// ProjectTable is the table that holds the project relation/edge.
	ProjectTable = "project_contributors"
	// 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_contributors"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "project_contributors"
	// 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_project_contributions"
)

Variables

View Source
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/fogo-sh/grackdb/ent/runtime"
View Source
var Columns = []string{
	FieldID,
	FieldRole,
}

Columns holds all SQL columns for projectcontributor fields.

View Source
var ForeignKeys = []string{
	"project_contributors",
	"user_project_contributions",
}

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

Functions

func And

And groups predicates with the AND operator between them.

func HasProject

func HasProject() predicate.ProjectContributor

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith

func HasProjectWith(preds ...predicate.Project) predicate.ProjectContributor

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

func HasUser

func HasUser() predicate.ProjectContributor

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

func HasUserWith

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

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

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.ProjectContributor

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.ProjectContributor

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

Or groups predicates with the OR operator between them.

func RoleEQ

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

func RoleIn

func RoleIn(vs ...Role) predicate.ProjectContributor

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

func RoleNEQ

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

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.ProjectContributor

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 Role

type Role string

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

const (
	RoleOwner       Role = "OWNER"
	RoleContributor Role = "CONTRIBUTOR"
)

Role values.

func (Role) MarshalGQL

func (e Role) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Role) String

func (r Role) String() string

func (*Role) UnmarshalGQL

func (e *Role) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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