Documentation
¶
Index ¶
- func NewTreeNode(path string, withNode ...*tree.Node) tree.ITreeNode
- func NewTreeNodePtr(path string, withNode ...*tree.Node) *tree.ITreeNode
- type Querier
- type Query
- func (q *Query) Available() bool
- func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx
- func (q *Query) ReadDB() *Query
- func (q *Query) ReplaceDB(db *gorm.DB) *Query
- func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error
- func (q *Query) WithContext(ctx context.Context) *queryCtx
- func (q *Query) WriteDB() *Query
- type QueryTx
- type User
- type UserAttribute
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTreeNode ¶
NewTreeNode creates an ITreeNode with a path, and optionally more node info for creation
Types ¶
type Query ¶
type Query struct {
User user
UserAttribute userAttribute
UserRole userRole
// contains filtered or unexported fields
}
func (*Query) Transaction ¶
func (*Query) WithContext ¶
type QueryTx ¶
func (*QueryTx) RollbackTo ¶
type UserAttribute ¶
type UserAttribute struct {
UUID string `gorm:"column:uuid; primaryKey; type: varchar(128) not null; index:,composite:ui;"`
Name string `gorm:"column:name; primaryKey;type: varchar(255) not null;"`
Value string `gorm:"column:value;"`
User *User `gorm:"foreignKey:UUID;constraint:OnDelete:CASCADE;"`
}
type UserRole ¶
type UserRole struct {
UUID string `gorm:"column:uuid; primaryKey; type: varchar(128) not null; index:,composite:ui;"`
Role string `gorm:"column:role; primaryKey; type: varchar(255) not null;"`
Weight int `gorm:"column:weight;type:int;default:0;"`
User *User `gorm:"foreignKey:UUID;constraint:OnDelete:CASCADE;"`
}
Click to show internal directories.
Click to hide internal directories.