Documentation ¶
Index ¶
- Variables
- func BlockAdd(index int, block ...*Block)
- func BlockRegister(block ...*Block)
- func BlockRemove(index int)
- func BlockSet(index int, list ...*Block)
- func CardAdd(index int, card ...*Card)
- func CardRegister(card ...*Card)
- func CardRemove(index int)
- func CardSet(index int, list ...*Card)
- func GlobalFooterAdd(index int, footer ...*GlobalFooter)
- func GlobalFooterRegister(footer ...*GlobalFooter)
- func GlobalFooterRemove(index int)
- func GlobalFooterSet(index int, list ...*GlobalFooter)
- func GlobalHeadAdd(index int, footer ...*GlobalHead)
- func GlobalHeadRegister(footer ...*GlobalHead)
- func GlobalHeadRemove(index int)
- func GlobalHeadSet(index int, list ...*GlobalHead)
- func TopButtonAdd(index int, topButton ...*Button)
- func TopButtonFindTmpl(tmpl string) int
- func TopButtonRegister(topButton ...*Button)
- func TopButtonRemove(index int)
- func TopButtonRemoveByTmpl(tmpl string)
- func TopButtonSearch(cb func(*Button) bool) int
- func TopButtonSet(index int, list ...*Button)
- type Block
- func (c *Block) IsHidden(ctx echo.Context) (hidden bool)
- func (c *Block) Ready(ctx echo.Context) error
- func (c *Block) SetContentGenerator(content func(echo.Context) error) *Block
- func (c *Block) SetExtra(extra echo.H) *Block
- func (c *Block) SetExtraKV(key string, value interface{}) *Block
- func (c *Block) SetFooter(footer string) *Block
- func (c *Block) SetHidden(hidden bool) *Block
- func (c *Block) SetHiddenDetector(hidden func(echo.Context) bool) *Block
- func (c *Block) SetIdent(ident string) *Block
- func (c *Block) SetTitle(title string) *Block
- func (c *Block) SetTmpl(tmpl string) *Block
- type Blocks
- func (c *Blocks) Add(index int, list ...*Block)
- func (c *Blocks) FindTmpl(tmpl string) int
- func (c *Blocks) Ready(ctx echo.Context) error
- func (c *Blocks) Remove(index int)
- func (c *Blocks) RemoveByTmpl(tmpl string)
- func (c *Blocks) Search(cb func(*Block) bool) int
- func (c *Blocks) Set(index int, list ...*Block)
- func (c *Blocks) Size() int
- type Button
- type Buttons
- type Card
- type Cards
- func (c *Cards) Add(index int, list ...*Card)
- func (c *Cards) Build(ctx echo.Context) Cards
- func (c *Cards) FindShort(short string) int
- func (c *Cards) Remove(index int)
- func (c *Cards) RemoveByShort(tmpl string)
- func (c *Cards) Search(cb func(*Card) bool) int
- func (c *Cards) Set(index int, list ...*Card)
- func (c *Cards) Size() int
- type Dashboard
- type Dashboards
- type GlobalFooter
- type GlobalFooters
- type GlobalHead
- type GlobalHeads
- type IsHidden
- type Page
- type Tmplx
- type Tmplxs
- func (c *Tmplxs) Add(index int, list ...*Tmplx)
- func (c *Tmplxs) FindTmpl(tmpl string) int
- func (c *Tmplxs) Ready(ctx echo.Context) error
- func (c *Tmplxs) Remove(index int)
- func (c *Tmplxs) RemoveByTmpl(tmpl string)
- func (c *Tmplxs) Search(cb func(*Tmplx) bool) int
- func (c *Tmplxs) Set(index int, list ...*Tmplx)
- func (c *Tmplxs) Size() int
Constants ¶
This section is empty.
Variables ¶
View Source
var Default = &Dashboards{ Backend: &Dashboard{ Cards: cards, Blocks: &blocks, GlobalHeads: &globalHeads, GlobalFooters: &globalFooters, TopButtons: &topButtons, }, Frontend: &Dashboard{}, }
Functions ¶
func BlockRegister ¶
func BlockRegister(block ...*Block)
func CardRegister ¶
func CardRegister(card ...*Card)
func GlobalFooterAdd ¶
func GlobalFooterAdd(index int, footer ...*GlobalFooter)
func GlobalFooterRegister ¶
func GlobalFooterRegister(footer ...*GlobalFooter)
func GlobalHeadAdd ¶
func GlobalHeadAdd(index int, footer ...*GlobalHead)
func GlobalHeadRegister ¶
func GlobalHeadRegister(footer ...*GlobalHead)
func TopButtonAdd ¶
func TopButtonFindTmpl ¶
func TopButtonRegister ¶
func TopButtonRegister(topButton ...*Button)
func TopButtonRemoveByTmpl ¶
func TopButtonRemoveByTmpl(tmpl string)
func TopButtonSearch ¶
Types ¶
type Block ¶
type Block struct { Title string `json:",omitempty" xml:",omitempty"` // 标题 Ident string `json:",omitempty" xml:",omitempty"` // 英文标识 Extra echo.H `json:",omitempty" xml:",omitempty"` // 附加数据 Hidden sql.NullBool Tmpl string //模板文件 // contains filtered or unexported fields }
func (*Block) SetContentGenerator ¶
func (*Block) SetExtraKV ¶
func (*Block) SetHiddenDetector ¶
type Card ¶
type Card struct { IconName string //图标名称:fa-tasks IconColor string //图标颜色:primary、success、danger、warning、info Short string //简称 Name string //中文名称 Summary string //说明 Content interface{} //数字等内容 Hidden sql.NullBool // contains filtered or unexported fields }
func (*Card) SetContentGenerator ¶
type Dashboard ¶
type Dashboard struct { Cards *Cards Blocks *Blocks GlobalHeads *GlobalHeads TopButtons *Buttons }
type Dashboards ¶
type GlobalFooter ¶
type GlobalFooter = Tmplx
func NewGlobalFooter ¶
func NewGlobalFooter(tmpl string, handle ...func(echo.Context) error) *GlobalFooter
type GlobalFooters ¶
type GlobalFooters = Tmplxs
func GlobalFooterAll ¶
func GlobalFooterAll(_ echo.Context) GlobalFooters
type GlobalHead ¶
type GlobalHead = Tmplx
func NewGlobalHead ¶
func NewGlobalHead(tmpl string, handle ...func(echo.Context) error) *GlobalHead
type GlobalHeads ¶
type GlobalHeads = Tmplxs
func GlobalHeadAll ¶
func GlobalHeadAll(_ echo.Context) GlobalHeads
type Tmplx ¶
type Tmplx struct { Tmpl string //模板文件 // contains filtered or unexported fields }
func (*Tmplx) SetContentGenerator ¶
Click to show internal directories.
Click to hide internal directories.