Documentation
¶
Index ¶
- Constants
- Variables
- func IsValid(s Status) bool
- func ShouldReturn(s Status) bool
- type AnalyseData
- func (a *AnalyseData) Change(changer func(set ContentSet) Content)
- func (a *AnalyseData) ExtraByKey(k string) (interface{}, bool)
- func (a *AnalyseData) PutExtra(k string, v interface{}) *AnalyseData
- func (a *AnalyseData) RmExtra(k string)
- func (a AnalyseData) String() string
- func (a *AnalyseData) WaitReady()
- func (a *AnalyseData) WithID(id string) *AnalyseData
- func (a *AnalyseData) WithName(name string) *AnalyseData
- type Content
- type ContentSet
- type JSONTime
- type Pool
- type Status
- type Type
Constants ¶
View Source
const ( UnitType = Type(iota) MarkdownType ListType TableType )
DataContent Format Type
Variables ¶
View Source
var ( OkStatus = newStatus(0, successFlag) // 成功 RunErrStatus = newStatus(1, validFlag) // 模块运行错误,表示特定的函数执行失败 BugStatus = newStatus(2, validFlag) // 由于未知BUG出现了某种预料之外的情况 InvalidStatus = newStatus(3, noneFlag) // 无效状态,将被忽略 )
View Source
var EmptyContent = wrapContent{}
Functions ¶
func ShouldReturn ¶
Types ¶
type AnalyseData ¶
type AnalyseData struct { XTime JSONTime `json:"time"` DataList []*AnalyseData `json:"dataList"` ID string `json:"id"` Name string `json:"name"` Desc string `json:"desc"` Data *wrapContent `json:"data"` Status Status `json:"status"` XType Type `json:"type"` // contains filtered or unexported fields }
func NewAnalyseData ¶
func NewAnalyseData(content Content) *AnalyseData
NewAnalyseData create analyse data.
func NewLazyAnalyseData ¶
func NewLazyAnalyseData(lazyFunc func(aData *AnalyseData) Content) *AnalyseData
func NewListAnalyseData ¶
func NewListAnalyseData(id string, name string, dataList []*AnalyseData) *AnalyseData
func NewOtherAnalyseData ¶
func NewOtherAnalyseData(s Status, desc string, content Content) *AnalyseData
func (*AnalyseData) Change ¶
func (a *AnalyseData) Change(changer func(set ContentSet) Content)
func (*AnalyseData) ExtraByKey ¶
func (a *AnalyseData) ExtraByKey(k string) (interface{}, bool)
func (*AnalyseData) PutExtra ¶
func (a *AnalyseData) PutExtra(k string, v interface{}) *AnalyseData
func (*AnalyseData) RmExtra ¶
func (a *AnalyseData) RmExtra(k string)
func (AnalyseData) String ¶
func (a AnalyseData) String() string
func (*AnalyseData) WaitReady ¶
func (a *AnalyseData) WaitReady()
func (*AnalyseData) WithID ¶
func (a *AnalyseData) WithID(id string) *AnalyseData
func (*AnalyseData) WithName ¶
func (a *AnalyseData) WithName(name string) *AnalyseData
type ContentSet ¶
type ContentSet struct {
// contains filtered or unexported fields
}
func NewSet ¶
func NewSet(contents ...Content) *ContentSet
func (ContentSet) Class ¶
func (c ContentSet) Class() Type
func (*ContentSet) Combine ¶
func (c *ContentSet) Combine(contents ...Content) *ContentSet
func (ContentSet) Data ¶
func (c ContentSet) Data() (res interface{})
type JSONTime ¶
func (JSONTime) MarshalJSON ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool 数据池
Click to show internal directories.
Click to hide internal directories.