Documentation ¶
Index ¶
- type Group
- type Shelf
- type VirtualShelf
- func (slf *VirtualShelf) Bind(shelf ...Shelf) Shelf
- func (slf *VirtualShelf) BindC(shelf Shelf) Shelf
- func (slf *VirtualShelf) Contains(shelf Shelf) (Shelf, bool)
- func (slf *VirtualShelf) Del(shelf Shelf)
- func (slf *VirtualShelf) GetAllChildren() []Shelf
- func (slf *VirtualShelf) GetGroup() *Group
- func (slf *VirtualShelf) GetID() string
- func (slf *VirtualShelf) GetParent() Shelf
- func (slf *VirtualShelf) GetVirtual() *VirtualShelf
- func (slf *VirtualShelf) IsRoot() bool
- func (slf *VirtualShelf) Move(shelf Shelf, index int) error
- func (slf *VirtualShelf) Render(level int) string
- func (slf *VirtualShelf) SetGroup(group *Group)
- func (slf *VirtualShelf) SetParent(parent Shelf)
- func (slf *VirtualShelf) SetWrite(f func() string) Shelf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
type Shelf ¶
type Shelf interface { // GetID 获取ID GetID() string // GetVirtual 获取虚拟架子 GetVirtual() *VirtualShelf // GetParent 获取壳子 GetParent() Shelf // GetGroup 获取所在的组 GetGroup() *Group // GetAllChildren 获取所有子架子 GetAllChildren() []Shelf // IsRoot 是否是根架子 IsRoot() bool // SetWrite 设置输出内容 SetWrite(func() string) Shelf // Contains 检查子架子是否存在某架子并返回其壳子 Contains(shelf Shelf) (Shelf, bool) // Bind 绑定某架子到该架子到末尾,并返回支持继续添加到相同架子的架子 Bind(shelf ...Shelf) Shelf // BindC 绑定架子到该架子末尾,并返回子架子 BindC(shelf Shelf) Shelf // Del 删除特定架子 Del(shelf Shelf) // Move 移动子架子位置 Move(shelf Shelf, index int) error // SetParent 设置壳子 SetParent(shelf Shelf) // SetGroup 设置所在的组 SetGroup(group *Group) // Render 渲染该架子 Render(level int) string }
type VirtualShelf ¶
type VirtualShelf struct {
// contains filtered or unexported fields
}
func (*VirtualShelf) Bind ¶
func (slf *VirtualShelf) Bind(shelf ...Shelf) Shelf
func (*VirtualShelf) BindC ¶
func (slf *VirtualShelf) BindC(shelf Shelf) Shelf
func (*VirtualShelf) Del ¶
func (slf *VirtualShelf) Del(shelf Shelf)
func (*VirtualShelf) GetAllChildren ¶
func (slf *VirtualShelf) GetAllChildren() []Shelf
func (*VirtualShelf) GetGroup ¶
func (slf *VirtualShelf) GetGroup() *Group
func (*VirtualShelf) GetID ¶
func (slf *VirtualShelf) GetID() string
func (*VirtualShelf) GetParent ¶
func (slf *VirtualShelf) GetParent() Shelf
func (*VirtualShelf) GetVirtual ¶
func (slf *VirtualShelf) GetVirtual() *VirtualShelf
func (*VirtualShelf) IsRoot ¶
func (slf *VirtualShelf) IsRoot() bool
func (*VirtualShelf) Render ¶
func (slf *VirtualShelf) Render(level int) string
func (*VirtualShelf) SetGroup ¶
func (slf *VirtualShelf) SetGroup(group *Group)
func (*VirtualShelf) SetParent ¶
func (slf *VirtualShelf) SetParent(parent Shelf)
func (*VirtualShelf) SetWrite ¶
func (slf *VirtualShelf) SetWrite(f func() string) Shelf
Click to show internal directories.
Click to hide internal directories.