Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Id string `gorm:"type:char(36);primaryKey"`
NamespaceId *string `gorm:"type:char(36);index:idx_namespace_id,priority:1;index"`
ParentId *string `gorm:"type:char(36);index:idx_parent_id,priority:2;index"`
Type string `gorm:"type:text;not null;index;default:''"`
Kind string `gorm:"type:text;not null;index;default:''"`
Status string `gorm:"type:text;not null;index;default:''"`
Name string `gorm:"type:text;not null;index"`
Metadata datatypes.JSON `gorm:"type:json;not null;default:'{}'"`
CreatedAt time.Time `gorm:"type:datetime;not null;autoCreateTime"`
UpdatedAt time.Time `gorm:"type:datetime;not null;autoUpdateTime"`
}
type NodeRepository ¶
func (*NodeRepository) Create ¶
func (r *NodeRepository) Create(node *Node) error
func (*NodeRepository) Delete ¶
func (r *NodeRepository) Delete(nodeId string) error
func (*NodeRepository) Save ¶
func (r *NodeRepository) Save(node *Node) error
type Repository ¶
type Repository struct {
Node *NodeRepository
// contains filtered or unexported fields
}
func (*Repository) Transaction ¶
func (r *Repository) Transaction(fc func(txRepo *Repository) error) error
Click to show internal directories.
Click to hide internal directories.