Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Role) predicate.Role
- func Builtin(v bool) predicate.Role
- func BuiltinEQ(v bool) predicate.Role
- func BuiltinNEQ(v bool) predicate.Role
- func CreateTime(v time.Time) predicate.Role
- func CreateTimeEQ(v time.Time) predicate.Role
- func CreateTimeGT(v time.Time) predicate.Role
- func CreateTimeGTE(v time.Time) predicate.Role
- func CreateTimeIn(vs ...time.Time) predicate.Role
- func CreateTimeLT(v time.Time) predicate.Role
- func CreateTimeLTE(v time.Time) predicate.Role
- func CreateTimeNEQ(v time.Time) predicate.Role
- func CreateTimeNotIn(vs ...time.Time) predicate.Role
- func Description(v string) predicate.Role
- func DescriptionContains(v string) predicate.Role
- func DescriptionContainsFold(v string) predicate.Role
- func DescriptionEQ(v string) predicate.Role
- func DescriptionEqualFold(v string) predicate.Role
- func DescriptionGT(v string) predicate.Role
- func DescriptionGTE(v string) predicate.Role
- func DescriptionHasPrefix(v string) predicate.Role
- func DescriptionHasSuffix(v string) predicate.Role
- func DescriptionIn(vs ...string) predicate.Role
- func DescriptionIsNil() predicate.Role
- func DescriptionLT(v string) predicate.Role
- func DescriptionLTE(v string) predicate.Role
- func DescriptionNEQ(v string) predicate.Role
- func DescriptionNotIn(vs ...string) predicate.Role
- func DescriptionNotNil() predicate.Role
- func HasSubjects() predicate.Role
- func HasSubjectsWith(preds ...predicate.SubjectRoleRelationship) predicate.Role
- func ID(id string) predicate.Role
- func IDContainsFold(id string) predicate.Role
- func IDEQ(id string) predicate.Role
- func IDEqualFold(id string) predicate.Role
- func IDGT(id string) predicate.Role
- func IDGTE(id string) predicate.Role
- func IDIn(ids ...string) predicate.Role
- func IDLT(id string) predicate.Role
- func IDLTE(id string) predicate.Role
- func IDNEQ(id string) predicate.Role
- func IDNotIn(ids ...string) predicate.Role
- func Kind(v string) predicate.Role
- func KindContains(v string) predicate.Role
- func KindContainsFold(v string) predicate.Role
- func KindEQ(v string) predicate.Role
- func KindEqualFold(v string) predicate.Role
- func KindGT(v string) predicate.Role
- func KindGTE(v string) predicate.Role
- func KindHasPrefix(v string) predicate.Role
- func KindHasSuffix(v string) predicate.Role
- func KindIn(vs ...string) predicate.Role
- func KindLT(v string) predicate.Role
- func KindLTE(v string) predicate.Role
- func KindNEQ(v string) predicate.Role
- func KindNotIn(vs ...string) predicate.Role
- func Not(p predicate.Role) predicate.Role
- func Or(predicates ...predicate.Role) predicate.Role
- func Session(v bool) predicate.Role
- func SessionEQ(v bool) predicate.Role
- func SessionNEQ(v bool) predicate.Role
- func UpdateTime(v time.Time) predicate.Role
- func UpdateTimeEQ(v time.Time) predicate.Role
- func UpdateTimeGT(v time.Time) predicate.Role
- func UpdateTimeGTE(v time.Time) predicate.Role
- func UpdateTimeIn(vs ...time.Time) predicate.Role
- func UpdateTimeLT(v time.Time) predicate.Role
- func UpdateTimeLTE(v time.Time) predicate.Role
- func UpdateTimeNEQ(v time.Time) predicate.Role
- func UpdateTimeNotIn(vs ...time.Time) predicate.Role
- func ValidColumn(column string) bool
- func WithoutFields(ignores ...string) []string
- type OrderOption
- func ByBuiltin(opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKind(opts ...sql.OrderTermOption) OrderOption
- func BySession(opts ...sql.OrderTermOption) OrderOption
- func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the role type in the database. Label = "role" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldKind holds the string denoting the kind field in the database. FieldKind = "kind" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldPolicies holds the string denoting the policies field in the database. FieldPolicies = "policies" // FieldSession holds the string denoting the session field in the database. FieldSession = "session" // FieldBuiltin holds the string denoting the builtin field in the database. FieldBuiltin = "builtin" // EdgeSubjects holds the string denoting the subjects edge name in mutations. EdgeSubjects = "subjects" // Table holds the table name of the role in the database. Table = "roles" // SubjectsTable is the table that holds the subjects relation/edge. SubjectsTable = "subject_role_relationships" // SubjectsInverseTable is the table name for the SubjectRoleRelationship entity. // It exists in this package in order to avoid circular dependency with the "subjectrolerelationship" package. SubjectsInverseTable = "subject_role_relationships" // SubjectsColumn is the table column denoting the subjects relation/edge. SubjectsColumn = "role_id" )
Variables ¶
var ( Hooks [1]ent.Hook // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // DefaultKind holds the default value on creation for the "kind" field. DefaultKind string // DefaultPolicies holds the default value on creation for the "policies" field. DefaultPolicies types.RolePolicies // DefaultSession holds the default value on creation for the "session" field. DefaultSession bool // DefaultBuiltin holds the default value on creation for the "builtin" field. DefaultBuiltin bool // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(string) error )
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/seal-io/walrus/pkg/dao/model/runtime"
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldKind, FieldDescription, FieldPolicies, FieldSession, FieldBuiltin, }
Columns holds all SQL columns for role fields.
Functions ¶
func Builtin ¶
Builtin applies equality check predicate on the "builtin" field. It's identical to BuiltinEQ.
func BuiltinNEQ ¶
BuiltinNEQ applies the NEQ predicate on the "builtin" field.
func CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasSubjects ¶
HasSubjects applies the HasEdge predicate on the "subjects" edge.
func HasSubjectsWith ¶
func HasSubjectsWith(preds ...predicate.SubjectRoleRelationship) predicate.Role
HasSubjectsWith applies the HasEdge predicate on the "subjects" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func KindContains ¶
KindContains applies the Contains predicate on the "kind" field.
func KindContainsFold ¶
KindContainsFold applies the ContainsFold predicate on the "kind" field.
func KindEqualFold ¶
KindEqualFold applies the EqualFold predicate on the "kind" field.
func KindHasPrefix ¶
KindHasPrefix applies the HasPrefix predicate on the "kind" field.
func KindHasSuffix ¶
KindHasSuffix applies the HasSuffix predicate on the "kind" field.
func Session ¶
Session applies equality check predicate on the "session" field. It's identical to SessionEQ.
func SessionNEQ ¶
SessionNEQ applies the NEQ predicate on the "session" field.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func WithoutFields ¶
WithoutFields returns the fields ignored the given list.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Role queries.
func ByBuiltin ¶
func ByBuiltin(opts ...sql.OrderTermOption) OrderOption
ByBuiltin orders the results by the builtin field.
func ByCreateTime ¶
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
ByCreateTime orders the results by the create_time field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByKind ¶
func ByKind(opts ...sql.OrderTermOption) OrderOption
ByKind orders the results by the kind field.
func BySession ¶
func BySession(opts ...sql.OrderTermOption) OrderOption
BySession orders the results by the session field.
func BySubjects ¶
func BySubjects(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySubjects orders the results by subjects terms.
func BySubjectsCount ¶
func BySubjectsCount(opts ...sql.OrderTermOption) OrderOption
BySubjectsCount orders the results by subjects count.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.