access

package
v0.0.0-...-83e02d6 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the access type in the database.
	Label = "access"
	// 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"
	// FieldProjectID holds the string denoting the project_id field in the database.
	FieldProjectID = "project_id"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// Table holds the table name of the access in the database.
	Table = "accesses"
)
View Source
const DefaultRole = RoleUser

RoleUser is the default value of the Role 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 access fields.

Functions

func And

func And(predicates ...predicate.Access) predicate.Access

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Access

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Access

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Access

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Access

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Access

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Access

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Access

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

func CreatedAtNotIn

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

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

func ID

func ID(id int) predicate.Access

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Access

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Access

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Access

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Access

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Access

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Access

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Access) predicate.Access

Or groups predicates with the OR operator between them.

func ProjectID

func ProjectID(v int) predicate.Access

ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.

func ProjectIDEQ

func ProjectIDEQ(v int) predicate.Access

ProjectIDEQ applies the EQ predicate on the "project_id" field.

func ProjectIDGT

func ProjectIDGT(v int) predicate.Access

ProjectIDGT applies the GT predicate on the "project_id" field.

func ProjectIDGTE

func ProjectIDGTE(v int) predicate.Access

ProjectIDGTE applies the GTE predicate on the "project_id" field.

func ProjectIDIn

func ProjectIDIn(vs ...int) predicate.Access

ProjectIDIn applies the In predicate on the "project_id" field.

func ProjectIDLT

func ProjectIDLT(v int) predicate.Access

ProjectIDLT applies the LT predicate on the "project_id" field.

func ProjectIDLTE

func ProjectIDLTE(v int) predicate.Access

ProjectIDLTE applies the LTE predicate on the "project_id" field.

func ProjectIDNEQ

func ProjectIDNEQ(v int) predicate.Access

ProjectIDNEQ applies the NEQ predicate on the "project_id" field.

func ProjectIDNotIn

func ProjectIDNotIn(vs ...int) predicate.Access

ProjectIDNotIn applies the NotIn predicate on the "project_id" field.

func RoleEQ

func RoleEQ(v Role) predicate.Access

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

func RoleIn

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

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

func RoleNEQ

func RoleNEQ(v Role) predicate.Access

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

func RoleNotIn

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

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 UpdatedAt

func UpdatedAt(v time.Time) predicate.Access

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Access

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Access

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Access

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Access

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Access

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Access

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

func UpdatedAtNotIn

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

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

func UserID

func UserID(v int) predicate.Access

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

func UserIDEQ

func UserIDEQ(v int) predicate.Access

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

func UserIDGT

func UserIDGT(v int) predicate.Access

UserIDGT applies the GT predicate on the "user_id" field.

func UserIDGTE

func UserIDGTE(v int) predicate.Access

UserIDGTE applies the GTE predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Access

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

func UserIDLT

func UserIDLT(v int) predicate.Access

UserIDLT applies the LT predicate on the "user_id" field.

func UserIDLTE

func UserIDLTE(v int) predicate.Access

UserIDLTE applies the LTE predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Access

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

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Access

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 OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Access 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 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.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByUserID

func ByUserID(opts ...sql.OrderTermOption) OrderOption

ByUserID orders the results by the user_id field.

type Role

type Role string

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

const (
	RoleAdmin Role = "admin"
	RoleUser  Role = "user"
)

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