perm

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the perm type in the database.
	Label = "perm"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldRepoPerm holds the string denoting the repo_perm field in the database.
	FieldRepoPerm = "repo_perm"
	// FieldSyncedAt holds the string denoting the synced_at field in the database.
	FieldSyncedAt = "synced_at"
	// 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"
	// FieldRepoID holds the string denoting the repo_id field in the database.
	FieldRepoID = "repo_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeRepo holds the string denoting the repo edge name in mutations.
	EdgeRepo = "repo"
	// Table holds the table name of the perm in the database.
	Table = "perms"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "perms"
	// 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_id"
	// RepoTable is the table that holds the repo relation/edge.
	RepoTable = "perms"
	// RepoInverseTable is the table name for the Repo entity.
	// It exists in this package in order to avoid circular dependency with the "repo" package.
	RepoInverseTable = "repos"
	// RepoColumn is the table column denoting the repo relation/edge.
	RepoColumn = "repo_id"
)
View Source
const DefaultRepoPerm = RepoPermRead

RepoPermRead is the default value of the RepoPerm enum.

Variables

View Source
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
)

Columns holds all SQL columns for perm fields.

Functions

func And

func And(predicates ...predicate.Perm) predicate.Perm

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Perm

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Perm

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Perm

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Perm

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Perm

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Perm

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Perm

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Perm

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Perm

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasRepo

func HasRepo() predicate.Perm

HasRepo applies the HasEdge predicate on the "repo" edge.

func HasRepoWith

func HasRepoWith(preds ...predicate.Repo) predicate.Perm

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

func HasUser

func HasUser() predicate.Perm

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Perm

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Perm

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Perm

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Perm

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Perm

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Perm

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Perm

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Perm) predicate.Perm

Or groups predicates with the OR operator between them.

func RepoID

func RepoID(v int64) predicate.Perm

RepoID applies equality check predicate on the "repo_id" field. It's identical to RepoIDEQ.

func RepoIDEQ

func RepoIDEQ(v int64) predicate.Perm

RepoIDEQ applies the EQ predicate on the "repo_id" field.

func RepoIDIn

func RepoIDIn(vs ...int64) predicate.Perm

RepoIDIn applies the In predicate on the "repo_id" field.

func RepoIDNEQ

func RepoIDNEQ(v int64) predicate.Perm

RepoIDNEQ applies the NEQ predicate on the "repo_id" field.

func RepoIDNotIn

func RepoIDNotIn(vs ...int64) predicate.Perm

RepoIDNotIn applies the NotIn predicate on the "repo_id" field.

func RepoPermEQ

func RepoPermEQ(v RepoPerm) predicate.Perm

RepoPermEQ applies the EQ predicate on the "repo_perm" field.

func RepoPermIn

func RepoPermIn(vs ...RepoPerm) predicate.Perm

RepoPermIn applies the In predicate on the "repo_perm" field.

func RepoPermNEQ

func RepoPermNEQ(v RepoPerm) predicate.Perm

RepoPermNEQ applies the NEQ predicate on the "repo_perm" field.

func RepoPermNotIn

func RepoPermNotIn(vs ...RepoPerm) predicate.Perm

RepoPermNotIn applies the NotIn predicate on the "repo_perm" field.

func RepoPermValidator

func RepoPermValidator(rp RepoPerm) error

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

func SyncedAt

func SyncedAt(v time.Time) predicate.Perm

SyncedAt applies equality check predicate on the "synced_at" field. It's identical to SyncedAtEQ.

func SyncedAtEQ

func SyncedAtEQ(v time.Time) predicate.Perm

SyncedAtEQ applies the EQ predicate on the "synced_at" field.

func SyncedAtGT

func SyncedAtGT(v time.Time) predicate.Perm

SyncedAtGT applies the GT predicate on the "synced_at" field.

func SyncedAtGTE

func SyncedAtGTE(v time.Time) predicate.Perm

SyncedAtGTE applies the GTE predicate on the "synced_at" field.

func SyncedAtIn

func SyncedAtIn(vs ...time.Time) predicate.Perm

SyncedAtIn applies the In predicate on the "synced_at" field.

func SyncedAtIsNil

func SyncedAtIsNil() predicate.Perm

SyncedAtIsNil applies the IsNil predicate on the "synced_at" field.

func SyncedAtLT

func SyncedAtLT(v time.Time) predicate.Perm

SyncedAtLT applies the LT predicate on the "synced_at" field.

func SyncedAtLTE

func SyncedAtLTE(v time.Time) predicate.Perm

SyncedAtLTE applies the LTE predicate on the "synced_at" field.

func SyncedAtNEQ

func SyncedAtNEQ(v time.Time) predicate.Perm

SyncedAtNEQ applies the NEQ predicate on the "synced_at" field.

func SyncedAtNotIn

func SyncedAtNotIn(vs ...time.Time) predicate.Perm

SyncedAtNotIn applies the NotIn predicate on the "synced_at" field.

func SyncedAtNotNil

func SyncedAtNotNil() predicate.Perm

SyncedAtNotNil applies the NotNil predicate on the "synced_at" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Perm

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Perm

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Perm

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Perm

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Perm

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Perm

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Perm

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Perm

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Perm

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UserID

func UserID(v int64) predicate.Perm

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int64) predicate.Perm

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int64) predicate.Perm

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int64) predicate.Perm

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int64) predicate.Perm

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type RepoPerm

type RepoPerm string

RepoPerm defines the type for the "repo_perm" enum field.

const (
	RepoPermRead  RepoPerm = "read"
	RepoPermWrite RepoPerm = "write"
	RepoPermAdmin RepoPerm = "admin"
)

RepoPerm values.

func (RepoPerm) String

func (rp RepoPerm) String() string

Jump to

Keyboard shortcuts

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