Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Subject) predicate.Subject
- func Builtin(v bool) predicate.Subject
- func BuiltinEQ(v bool) predicate.Subject
- func BuiltinNEQ(v bool) predicate.Subject
- func CreateTime(v time.Time) predicate.Subject
- func CreateTimeEQ(v time.Time) predicate.Subject
- func CreateTimeGT(v time.Time) predicate.Subject
- func CreateTimeGTE(v time.Time) predicate.Subject
- func CreateTimeIn(vs ...time.Time) predicate.Subject
- func CreateTimeLT(v time.Time) predicate.Subject
- func CreateTimeLTE(v time.Time) predicate.Subject
- func CreateTimeNEQ(v time.Time) predicate.Subject
- func CreateTimeNotIn(vs ...time.Time) predicate.Subject
- func Description(v string) predicate.Subject
- func DescriptionContains(v string) predicate.Subject
- func DescriptionContainsFold(v string) predicate.Subject
- func DescriptionEQ(v string) predicate.Subject
- func DescriptionEqualFold(v string) predicate.Subject
- func DescriptionGT(v string) predicate.Subject
- func DescriptionGTE(v string) predicate.Subject
- func DescriptionHasPrefix(v string) predicate.Subject
- func DescriptionHasSuffix(v string) predicate.Subject
- func DescriptionIn(vs ...string) predicate.Subject
- func DescriptionIsNil() predicate.Subject
- func DescriptionLT(v string) predicate.Subject
- func DescriptionLTE(v string) predicate.Subject
- func DescriptionNEQ(v string) predicate.Subject
- func DescriptionNotIn(vs ...string) predicate.Subject
- func DescriptionNotNil() predicate.Subject
- func Domain(v string) predicate.Subject
- func DomainContains(v string) predicate.Subject
- func DomainContainsFold(v string) predicate.Subject
- func DomainEQ(v string) predicate.Subject
- func DomainEqualFold(v string) predicate.Subject
- func DomainGT(v string) predicate.Subject
- func DomainGTE(v string) predicate.Subject
- func DomainHasPrefix(v string) predicate.Subject
- func DomainHasSuffix(v string) predicate.Subject
- func DomainIn(vs ...string) predicate.Subject
- func DomainLT(v string) predicate.Subject
- func DomainLTE(v string) predicate.Subject
- func DomainNEQ(v string) predicate.Subject
- func DomainNotIn(vs ...string) predicate.Subject
- func HasRoles() predicate.Subject
- func HasRolesWith(preds ...predicate.SubjectRoleRelationship) predicate.Subject
- func HasTokens() predicate.Subject
- func HasTokensWith(preds ...predicate.Token) predicate.Subject
- func ID(id object.ID) predicate.Subject
- func IDEQ(id object.ID) predicate.Subject
- func IDGT(id object.ID) predicate.Subject
- func IDGTE(id object.ID) predicate.Subject
- func IDIn(ids ...object.ID) predicate.Subject
- func IDLT(id object.ID) predicate.Subject
- func IDLTE(id object.ID) predicate.Subject
- func IDNEQ(id object.ID) predicate.Subject
- func IDNotIn(ids ...object.ID) predicate.Subject
- func Kind(v string) predicate.Subject
- func KindContains(v string) predicate.Subject
- func KindContainsFold(v string) predicate.Subject
- func KindEQ(v string) predicate.Subject
- func KindEqualFold(v string) predicate.Subject
- func KindGT(v string) predicate.Subject
- func KindGTE(v string) predicate.Subject
- func KindHasPrefix(v string) predicate.Subject
- func KindHasSuffix(v string) predicate.Subject
- func KindIn(vs ...string) predicate.Subject
- func KindLT(v string) predicate.Subject
- func KindLTE(v string) predicate.Subject
- func KindNEQ(v string) predicate.Subject
- func KindNotIn(vs ...string) predicate.Subject
- func Name(v string) predicate.Subject
- func NameContains(v string) predicate.Subject
- func NameContainsFold(v string) predicate.Subject
- func NameEQ(v string) predicate.Subject
- func NameEqualFold(v string) predicate.Subject
- func NameGT(v string) predicate.Subject
- func NameGTE(v string) predicate.Subject
- func NameHasPrefix(v string) predicate.Subject
- func NameHasSuffix(v string) predicate.Subject
- func NameIn(vs ...string) predicate.Subject
- func NameLT(v string) predicate.Subject
- func NameLTE(v string) predicate.Subject
- func NameNEQ(v string) predicate.Subject
- func NameNotIn(vs ...string) predicate.Subject
- func Not(p predicate.Subject) predicate.Subject
- func Or(predicates ...predicate.Subject) predicate.Subject
- func UpdateTime(v time.Time) predicate.Subject
- func UpdateTimeEQ(v time.Time) predicate.Subject
- func UpdateTimeGT(v time.Time) predicate.Subject
- func UpdateTimeGTE(v time.Time) predicate.Subject
- func UpdateTimeIn(vs ...time.Time) predicate.Subject
- func UpdateTimeLT(v time.Time) predicate.Subject
- func UpdateTimeLTE(v time.Time) predicate.Subject
- func UpdateTimeNEQ(v time.Time) predicate.Subject
- func UpdateTimeNotIn(vs ...time.Time) predicate.Subject
- 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 ByDomain(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKind(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRolesCount(opts ...sql.OrderTermOption) OrderOption
- func ByTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTokensCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the subject type in the database. Label = "subject" // 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" // FieldDomain holds the string denoting the domain field in the database. FieldDomain = "domain" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldBuiltin holds the string denoting the builtin field in the database. FieldBuiltin = "builtin" // EdgeTokens holds the string denoting the tokens edge name in mutations. EdgeTokens = "tokens" // EdgeRoles holds the string denoting the roles edge name in mutations. EdgeRoles = "roles" // Table holds the table name of the subject in the database. Table = "subjects" // TokensTable is the table that holds the tokens relation/edge. TokensTable = "tokens" // TokensInverseTable is the table name for the Token entity. // It exists in this package in order to avoid circular dependency with the "token" package. TokensInverseTable = "tokens" // TokensColumn is the table column denoting the tokens relation/edge. TokensColumn = "subject_id" // RolesTable is the table that holds the roles relation/edge. RolesTable = "subject_role_relationships" // RolesInverseTable is the table name for the SubjectRoleRelationship entity. // It exists in this package in order to avoid circular dependency with the "subjectrolerelationship" package. RolesInverseTable = "subject_role_relationships" // RolesColumn is the table column denoting the roles relation/edge. RolesColumn = "subject_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 // DefaultDomain holds the default value on creation for the "domain" field. DefaultDomain string // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultBuiltin holds the default value on creation for the "builtin" field. DefaultBuiltin bool )
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, FieldDomain, FieldName, FieldDescription, FieldBuiltin, }
Columns holds all SQL columns for subject 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 Domain ¶
Domain applies equality check predicate on the "domain" field. It's identical to DomainEQ.
func DomainContains ¶
DomainContains applies the Contains predicate on the "domain" field.
func DomainContainsFold ¶
DomainContainsFold applies the ContainsFold predicate on the "domain" field.
func DomainEqualFold ¶
DomainEqualFold applies the EqualFold predicate on the "domain" field.
func DomainHasPrefix ¶
DomainHasPrefix applies the HasPrefix predicate on the "domain" field.
func DomainHasSuffix ¶
DomainHasSuffix applies the HasSuffix predicate on the "domain" field.
func DomainNotIn ¶
DomainNotIn applies the NotIn predicate on the "domain" field.
func HasRolesWith ¶
func HasRolesWith(preds ...predicate.SubjectRoleRelationship) predicate.Subject
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func HasTokensWith ¶
HasTokensWith applies the HasEdge predicate on the "tokens" edge with a given conditions (other predicates).
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 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 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 Subject 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 ByDomain ¶
func ByDomain(opts ...sql.OrderTermOption) OrderOption
ByDomain orders the results by the domain 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 ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name 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 ByTokens ¶
func ByTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTokens orders the results by tokens terms.
func ByTokensCount ¶
func ByTokensCount(opts ...sql.OrderTermOption) OrderOption
ByTokensCount orders the results by tokens count.
func ByUpdateTime ¶
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
ByUpdateTime orders the results by the update_time field.