route

package
v0.0.0-...-857c71f Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the route type in the database.
	Label = "route"
	// 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"
	// FieldIsEnable holds the string denoting the is_enable field in the database.
	FieldIsEnable = "is_enable"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldParentID holds the string denoting the parent_id field in the database.
	FieldParentID = "parent_id"
	// FieldPath holds the string denoting the path field in the database.
	FieldPath = "path"
	// FieldComponent holds the string denoting the component field in the database.
	FieldComponent = "component"
	// FieldRedirect holds the string denoting the redirect field in the database.
	FieldRedirect = "redirect"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldMeta holds the string denoting the meta field in the database.
	FieldMeta = "meta"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeChildren holds the string denoting the children edge name in mutations.
	EdgeChildren = "children"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// Table holds the table name of the route in the database.
	Table = "routes"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "routes"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "parent_id"
	// ChildrenTable is the table that holds the children relation/edge.
	ChildrenTable = "routes"
	// ChildrenColumn is the table column denoting the children relation/edge.
	ChildrenColumn = "parent_id"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "role_routes"
	// RolesInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RolesInverseTable = "roles"
)
View Source
const DefaultType = TypeCataLog

TypeCataLog is the default value of the Type enum.

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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
	// DefaultIsEnable holds the default value on creation for the "is_enable" field.
	DefaultIsEnable bool
	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
	DefaultDeletedAt int
)

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/kimchhung/gva/extra/internal/ent/runtime"

Columns holds all SQL columns for route fields.

View Source
var (
	// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
	// primary key for the roles relation (M2M).
	RolesPrimaryKey = []string{"role_id", "route_id"}
)

Functions

func And

func And(predicates ...predicate.Route) predicate.Route

And groups predicates with the AND operator between them.

func Component

func Component(v string) predicate.Route

Component applies equality check predicate on the "component" field. It's identical to ComponentEQ.

func ComponentContains

func ComponentContains(v string) predicate.Route

ComponentContains applies the Contains predicate on the "component" field.

func ComponentContainsFold

func ComponentContainsFold(v string) predicate.Route

ComponentContainsFold applies the ContainsFold predicate on the "component" field.

func ComponentEQ

func ComponentEQ(v string) predicate.Route

ComponentEQ applies the EQ predicate on the "component" field.

func ComponentEqualFold

func ComponentEqualFold(v string) predicate.Route

ComponentEqualFold applies the EqualFold predicate on the "component" field.

func ComponentGT

func ComponentGT(v string) predicate.Route

ComponentGT applies the GT predicate on the "component" field.

func ComponentGTE

func ComponentGTE(v string) predicate.Route

ComponentGTE applies the GTE predicate on the "component" field.

func ComponentHasPrefix

func ComponentHasPrefix(v string) predicate.Route

ComponentHasPrefix applies the HasPrefix predicate on the "component" field.

func ComponentHasSuffix

func ComponentHasSuffix(v string) predicate.Route

ComponentHasSuffix applies the HasSuffix predicate on the "component" field.

func ComponentIn

func ComponentIn(vs ...string) predicate.Route

ComponentIn applies the In predicate on the "component" field.

func ComponentLT

func ComponentLT(v string) predicate.Route

ComponentLT applies the LT predicate on the "component" field.

func ComponentLTE

func ComponentLTE(v string) predicate.Route

ComponentLTE applies the LTE predicate on the "component" field.

func ComponentNEQ

func ComponentNEQ(v string) predicate.Route

ComponentNEQ applies the NEQ predicate on the "component" field.

func ComponentNotIn

func ComponentNotIn(vs ...string) predicate.Route

ComponentNotIn applies the NotIn predicate on the "component" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Route

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Route

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Route

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Route

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Route

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Route

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Route

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v int) predicate.Route

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v int) predicate.Route

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v int) predicate.Route

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v int) predicate.Route

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...int) predicate.Route

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v int) predicate.Route

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v int) predicate.Route

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v int) predicate.Route

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...int) predicate.Route

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func HasChildren

func HasChildren() predicate.Route

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Route) predicate.Route

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

func HasParent

func HasParent() predicate.Route

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Route) predicate.Route

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

func HasRoles

func HasRoles() predicate.Route

HasRoles applies the HasEdge predicate on the "roles" edge.

func HasRolesWith

func HasRolesWith(preds ...predicate.Role) predicate.Route

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

func ID

func ID(id int) predicate.Route

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Route

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Route

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Route

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Route

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Route

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Route

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsEnable

func IsEnable(v bool) predicate.Route

IsEnable applies equality check predicate on the "is_enable" field. It's identical to IsEnableEQ.

func IsEnableEQ

func IsEnableEQ(v bool) predicate.Route

IsEnableEQ applies the EQ predicate on the "is_enable" field.

func IsEnableNEQ

func IsEnableNEQ(v bool) predicate.Route

IsEnableNEQ applies the NEQ predicate on the "is_enable" field.

func Name

func Name(v string) predicate.Route

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Route

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Route

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Route

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Route

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Route

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Route

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Route

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Route

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Route

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Route

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Route

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Route

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Route

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Route) predicate.Route

Or groups predicates with the OR operator between them.

func ParentID

func ParentID(v int) predicate.Route

ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.

func ParentIDEQ

func ParentIDEQ(v int) predicate.Route

ParentIDEQ applies the EQ predicate on the "parent_id" field.

func ParentIDIn

func ParentIDIn(vs ...int) predicate.Route

ParentIDIn applies the In predicate on the "parent_id" field.

func ParentIDIsNil

func ParentIDIsNil() predicate.Route

ParentIDIsNil applies the IsNil predicate on the "parent_id" field.

func ParentIDNEQ

func ParentIDNEQ(v int) predicate.Route

ParentIDNEQ applies the NEQ predicate on the "parent_id" field.

func ParentIDNotIn

func ParentIDNotIn(vs ...int) predicate.Route

ParentIDNotIn applies the NotIn predicate on the "parent_id" field.

func ParentIDNotNil

func ParentIDNotNil() predicate.Route

ParentIDNotNil applies the NotNil predicate on the "parent_id" field.

func Path

func Path(v string) predicate.Route

Path applies equality check predicate on the "path" field. It's identical to PathEQ.

func PathContains

func PathContains(v string) predicate.Route

PathContains applies the Contains predicate on the "path" field.

func PathContainsFold

func PathContainsFold(v string) predicate.Route

PathContainsFold applies the ContainsFold predicate on the "path" field.

func PathEQ

func PathEQ(v string) predicate.Route

PathEQ applies the EQ predicate on the "path" field.

func PathEqualFold

func PathEqualFold(v string) predicate.Route

PathEqualFold applies the EqualFold predicate on the "path" field.

func PathGT

func PathGT(v string) predicate.Route

PathGT applies the GT predicate on the "path" field.

func PathGTE

func PathGTE(v string) predicate.Route

PathGTE applies the GTE predicate on the "path" field.

func PathHasPrefix

func PathHasPrefix(v string) predicate.Route

PathHasPrefix applies the HasPrefix predicate on the "path" field.

func PathHasSuffix

func PathHasSuffix(v string) predicate.Route

PathHasSuffix applies the HasSuffix predicate on the "path" field.

func PathIn

func PathIn(vs ...string) predicate.Route

PathIn applies the In predicate on the "path" field.

func PathLT

func PathLT(v string) predicate.Route

PathLT applies the LT predicate on the "path" field.

func PathLTE

func PathLTE(v string) predicate.Route

PathLTE applies the LTE predicate on the "path" field.

func PathNEQ

func PathNEQ(v string) predicate.Route

PathNEQ applies the NEQ predicate on the "path" field.

func PathNotIn

func PathNotIn(vs ...string) predicate.Route

PathNotIn applies the NotIn predicate on the "path" field.

func Redirect

func Redirect(v string) predicate.Route

Redirect applies equality check predicate on the "redirect" field. It's identical to RedirectEQ.

func RedirectContains

func RedirectContains(v string) predicate.Route

RedirectContains applies the Contains predicate on the "redirect" field.

func RedirectContainsFold

func RedirectContainsFold(v string) predicate.Route

RedirectContainsFold applies the ContainsFold predicate on the "redirect" field.

func RedirectEQ

func RedirectEQ(v string) predicate.Route

RedirectEQ applies the EQ predicate on the "redirect" field.

func RedirectEqualFold

func RedirectEqualFold(v string) predicate.Route

RedirectEqualFold applies the EqualFold predicate on the "redirect" field.

func RedirectGT

func RedirectGT(v string) predicate.Route

RedirectGT applies the GT predicate on the "redirect" field.

func RedirectGTE

func RedirectGTE(v string) predicate.Route

RedirectGTE applies the GTE predicate on the "redirect" field.

func RedirectHasPrefix

func RedirectHasPrefix(v string) predicate.Route

RedirectHasPrefix applies the HasPrefix predicate on the "redirect" field.

func RedirectHasSuffix

func RedirectHasSuffix(v string) predicate.Route

RedirectHasSuffix applies the HasSuffix predicate on the "redirect" field.

func RedirectIn

func RedirectIn(vs ...string) predicate.Route

RedirectIn applies the In predicate on the "redirect" field.

func RedirectIsNil

func RedirectIsNil() predicate.Route

RedirectIsNil applies the IsNil predicate on the "redirect" field.

func RedirectLT

func RedirectLT(v string) predicate.Route

RedirectLT applies the LT predicate on the "redirect" field.

func RedirectLTE

func RedirectLTE(v string) predicate.Route

RedirectLTE applies the LTE predicate on the "redirect" field.

func RedirectNEQ

func RedirectNEQ(v string) predicate.Route

RedirectNEQ applies the NEQ predicate on the "redirect" field.

func RedirectNotIn

func RedirectNotIn(vs ...string) predicate.Route

RedirectNotIn applies the NotIn predicate on the "redirect" field.

func RedirectNotNil

func RedirectNotNil() predicate.Route

RedirectNotNil applies the NotNil predicate on the "redirect" field.

func TypeEQ

func TypeEQ(v Type) predicate.Route

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Route

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Route

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Route

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Route

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Route

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Route

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Route

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Route

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Route

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Route

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Route queries.

func ByChildren

func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByChildren orders the results by children terms.

func ByChildrenCount

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

ByChildrenCount orders the results by children count.

func ByComponent

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

ByComponent orders the results by the component field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByID

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

ByID orders the results by the id field.

func ByIsEnable

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

ByIsEnable orders the results by the is_enable field.

func ByName

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

ByName orders the results by the name field.

func ByParentField

func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption

ByParentField orders the results by parent field.

func ByParentID

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

ByParentID orders the results by the parent_id field.

func ByPath

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

ByPath orders the results by the path field.

func ByRedirect

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

ByRedirect orders the results by the redirect field.

func ByRoles

func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRoles orders the results by roles terms.

func ByRolesCount

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

ByRolesCount orders the results by roles count.

func ByType

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

ByType orders the results by the type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeCataLog      Type = "cata_log"
	TypeMenu         Type = "menu"
	TypeButton       Type = "button"
	TypeExternalLink Type = "external_link"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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