Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Route) predicate.Route
- func Component(v string) predicate.Route
- func ComponentContains(v string) predicate.Route
- func ComponentContainsFold(v string) predicate.Route
- func ComponentEQ(v string) predicate.Route
- func ComponentEqualFold(v string) predicate.Route
- func ComponentGT(v string) predicate.Route
- func ComponentGTE(v string) predicate.Route
- func ComponentHasPrefix(v string) predicate.Route
- func ComponentHasSuffix(v string) predicate.Route
- func ComponentIn(vs ...string) predicate.Route
- func ComponentLT(v string) predicate.Route
- func ComponentLTE(v string) predicate.Route
- func ComponentNEQ(v string) predicate.Route
- func ComponentNotIn(vs ...string) predicate.Route
- func CreatedAt(v time.Time) predicate.Route
- func CreatedAtEQ(v time.Time) predicate.Route
- func CreatedAtGT(v time.Time) predicate.Route
- func CreatedAtGTE(v time.Time) predicate.Route
- func CreatedAtIn(vs ...time.Time) predicate.Route
- func CreatedAtLT(v time.Time) predicate.Route
- func CreatedAtLTE(v time.Time) predicate.Route
- func CreatedAtNEQ(v time.Time) predicate.Route
- func CreatedAtNotIn(vs ...time.Time) predicate.Route
- func DeletedAt(v int) predicate.Route
- func DeletedAtEQ(v int) predicate.Route
- func DeletedAtGT(v int) predicate.Route
- func DeletedAtGTE(v int) predicate.Route
- func DeletedAtIn(vs ...int) predicate.Route
- func DeletedAtLT(v int) predicate.Route
- func DeletedAtLTE(v int) predicate.Route
- func DeletedAtNEQ(v int) predicate.Route
- func DeletedAtNotIn(vs ...int) predicate.Route
- func HasChildren() predicate.Route
- func HasChildrenWith(preds ...predicate.Route) predicate.Route
- func HasParent() predicate.Route
- func HasParentWith(preds ...predicate.Route) predicate.Route
- func HasRoles() predicate.Route
- func HasRolesWith(preds ...predicate.Role) predicate.Route
- func ID(id int) predicate.Route
- func IDEQ(id int) predicate.Route
- func IDGT(id int) predicate.Route
- func IDGTE(id int) predicate.Route
- func IDIn(ids ...int) predicate.Route
- func IDLT(id int) predicate.Route
- func IDLTE(id int) predicate.Route
- func IDNEQ(id int) predicate.Route
- func IDNotIn(ids ...int) predicate.Route
- func IsEnable(v bool) predicate.Route
- func IsEnableEQ(v bool) predicate.Route
- func IsEnableNEQ(v bool) predicate.Route
- func Name(v string) predicate.Route
- func NameContains(v string) predicate.Route
- func NameContainsFold(v string) predicate.Route
- func NameEQ(v string) predicate.Route
- func NameEqualFold(v string) predicate.Route
- func NameGT(v string) predicate.Route
- func NameGTE(v string) predicate.Route
- func NameHasPrefix(v string) predicate.Route
- func NameHasSuffix(v string) predicate.Route
- func NameIn(vs ...string) predicate.Route
- func NameLT(v string) predicate.Route
- func NameLTE(v string) predicate.Route
- func NameNEQ(v string) predicate.Route
- func NameNotIn(vs ...string) predicate.Route
- func Not(p predicate.Route) predicate.Route
- func Or(predicates ...predicate.Route) predicate.Route
- func ParentID(v int) predicate.Route
- func ParentIDEQ(v int) predicate.Route
- func ParentIDIn(vs ...int) predicate.Route
- func ParentIDIsNil() predicate.Route
- func ParentIDNEQ(v int) predicate.Route
- func ParentIDNotIn(vs ...int) predicate.Route
- func ParentIDNotNil() predicate.Route
- func Path(v string) predicate.Route
- func PathContains(v string) predicate.Route
- func PathContainsFold(v string) predicate.Route
- func PathEQ(v string) predicate.Route
- func PathEqualFold(v string) predicate.Route
- func PathGT(v string) predicate.Route
- func PathGTE(v string) predicate.Route
- func PathHasPrefix(v string) predicate.Route
- func PathHasSuffix(v string) predicate.Route
- func PathIn(vs ...string) predicate.Route
- func PathLT(v string) predicate.Route
- func PathLTE(v string) predicate.Route
- func PathNEQ(v string) predicate.Route
- func PathNotIn(vs ...string) predicate.Route
- func Redirect(v string) predicate.Route
- func RedirectContains(v string) predicate.Route
- func RedirectContainsFold(v string) predicate.Route
- func RedirectEQ(v string) predicate.Route
- func RedirectEqualFold(v string) predicate.Route
- func RedirectGT(v string) predicate.Route
- func RedirectGTE(v string) predicate.Route
- func RedirectHasPrefix(v string) predicate.Route
- func RedirectHasSuffix(v string) predicate.Route
- func RedirectIn(vs ...string) predicate.Route
- func RedirectIsNil() predicate.Route
- func RedirectLT(v string) predicate.Route
- func RedirectLTE(v string) predicate.Route
- func RedirectNEQ(v string) predicate.Route
- func RedirectNotIn(vs ...string) predicate.Route
- func RedirectNotNil() predicate.Route
- func TypeEQ(v Type) predicate.Route
- func TypeIn(vs ...Type) predicate.Route
- func TypeNEQ(v Type) predicate.Route
- func TypeNotIn(vs ...Type) predicate.Route
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Route
- func UpdatedAtEQ(v time.Time) predicate.Route
- func UpdatedAtGT(v time.Time) predicate.Route
- func UpdatedAtGTE(v time.Time) predicate.Route
- func UpdatedAtIn(vs ...time.Time) predicate.Route
- func UpdatedAtLT(v time.Time) predicate.Route
- func UpdatedAtLTE(v time.Time) predicate.Route
- func UpdatedAtNEQ(v time.Time) predicate.Route
- func UpdatedAtNotIn(vs ...time.Time) predicate.Route
- func ValidColumn(column string) bool
- type OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByComponent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsEnable(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
- func ByPath(opts ...sql.OrderTermOption) OrderOption
- func ByRedirect(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
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" )
const DefaultType = TypeCataLog
TypeCataLog is the default value of the Type enum.
Variables ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldIsEnable, FieldDeletedAt, FieldParentID, FieldPath, FieldComponent, FieldRedirect, FieldName, FieldType, FieldMeta, }
Columns holds all SQL columns for route fields.
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 Component ¶
Component applies equality check predicate on the "component" field. It's identical to ComponentEQ.
func ComponentContains ¶
ComponentContains applies the Contains predicate on the "component" field.
func ComponentContainsFold ¶
ComponentContainsFold applies the ContainsFold predicate on the "component" field.
func ComponentEQ ¶
ComponentEQ applies the EQ predicate on the "component" field.
func ComponentEqualFold ¶
ComponentEqualFold applies the EqualFold predicate on the "component" field.
func ComponentGT ¶
ComponentGT applies the GT predicate on the "component" field.
func ComponentGTE ¶
ComponentGTE applies the GTE predicate on the "component" field.
func ComponentHasPrefix ¶
ComponentHasPrefix applies the HasPrefix predicate on the "component" field.
func ComponentHasSuffix ¶
ComponentHasSuffix applies the HasSuffix predicate on the "component" field.
func ComponentIn ¶
ComponentIn applies the In predicate on the "component" field.
func ComponentLT ¶
ComponentLT applies the LT predicate on the "component" field.
func ComponentLTE ¶
ComponentLTE applies the LTE predicate on the "component" field.
func ComponentNEQ ¶
ComponentNEQ applies the NEQ predicate on the "component" field.
func ComponentNotIn ¶
ComponentNotIn applies the NotIn predicate on the "component" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasRolesWith ¶
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func IsEnable ¶
IsEnable applies equality check predicate on the "is_enable" field. It's identical to IsEnableEQ.
func IsEnableEQ ¶
IsEnableEQ applies the EQ predicate on the "is_enable" field.
func IsEnableNEQ ¶
IsEnableNEQ applies the NEQ predicate on the "is_enable" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ParentID ¶
ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentIDEQ ¶
ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDIn ¶
ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIsNil ¶
ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDNEQ ¶
ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNotIn ¶
ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotNil ¶
ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func PathContains ¶
PathContains applies the Contains predicate on the "path" field.
func PathContainsFold ¶
PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathEqualFold ¶
PathEqualFold applies the EqualFold predicate on the "path" field.
func PathHasPrefix ¶
PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasSuffix ¶
PathHasSuffix applies the HasSuffix predicate on the "path" field.
func Redirect ¶
Redirect applies equality check predicate on the "redirect" field. It's identical to RedirectEQ.
func RedirectContains ¶
RedirectContains applies the Contains predicate on the "redirect" field.
func RedirectContainsFold ¶
RedirectContainsFold applies the ContainsFold predicate on the "redirect" field.
func RedirectEQ ¶
RedirectEQ applies the EQ predicate on the "redirect" field.
func RedirectEqualFold ¶
RedirectEqualFold applies the EqualFold predicate on the "redirect" field.
func RedirectGT ¶
RedirectGT applies the GT predicate on the "redirect" field.
func RedirectGTE ¶
RedirectGTE applies the GTE predicate on the "redirect" field.
func RedirectHasPrefix ¶
RedirectHasPrefix applies the HasPrefix predicate on the "redirect" field.
func RedirectHasSuffix ¶
RedirectHasSuffix applies the HasSuffix predicate on the "redirect" field.
func RedirectIn ¶
RedirectIn applies the In predicate on the "redirect" field.
func RedirectIsNil ¶
RedirectIsNil applies the IsNil predicate on the "redirect" field.
func RedirectLT ¶
RedirectLT applies the LT predicate on the "redirect" field.
func RedirectLTE ¶
RedirectLTE applies the LTE predicate on the "redirect" field.
func RedirectNEQ ¶
RedirectNEQ applies the NEQ predicate on the "redirect" field.
func RedirectNotIn ¶
RedirectNotIn applies the NotIn predicate on the "redirect" field.
func RedirectNotNil ¶
RedirectNotNil applies the NotNil predicate on the "redirect" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.