Documentation
¶
Index ¶
- type API
- type DB
- type DashboardAPI
- type DashboardBlockDTO
- type DashboardBlockQuery
- type System
- func (db *System) Delete(query *DashboardBlockQuery) (err error)
- func (db *System) Get(query *DashboardBlockQuery) (obj *SystemBlock, err error)
- func (db *System) List(query *DashboardBlockQuery, pageSize int64, pageNo int64) (objs []*SystemBlock, total int, err error)
- func (db *System) Save(obj *SystemBlock) error
- type SystemBlock
- type SystemBlockUpdate
- type User
- func (db *User) Delete(query *DashboardBlockQuery) (err error)
- func (db *User) Get(query *DashboardBlockQuery) (obj *UserBlock, err error)
- func (db *User) List(query *DashboardBlockQuery, pageSize int64, pageNo int64) (objs []*UserBlock, total int, err error)
- func (db *User) Save(obj *UserBlock) error
- type UserBlock
- type UserBlockUpdate
- type View
- type ViewConfigDTO
- type ViewConfigItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
URL string `json:"url"`
Query map[string]interface{} `json:"query"`
Body map[string]interface{} `json:"body"`
Header map[string]interface{} `json:"header"`
ExtraData map[string]interface{} `json:"extraData"`
Method string `json:"method"`
}
API .
type DashboardAPI ¶
type DashboardAPI interface {
CreateDashboard(block *UserBlock) (dash *DashboardBlockDTO, err error)
}
type DashboardBlockDTO ¶
type DashboardBlockDTO struct {
ID string `json:"id"`
Name string `json:"name"`
Desc string `json:"desc"`
Scope string `json:"scope"`
ScopeID string `json:"scopeId"`
ViewConfig *ViewConfigDTO `json:"viewConfig"`
DataConfig *dataConfigDTO `json:"-"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
Version string `json:"version"`
}
DashboardBlockDTO .
func (*DashboardBlockDTO) ReplaceVCWithDynamicParameter ¶
func (dash *DashboardBlockDTO) ReplaceVCWithDynamicParameter(query url.Values) *DashboardBlockDTO
type DashboardBlockQuery ¶
DashboardBlockQuery .
func (*DashboardBlockQuery) Supplements ¶
func (q *DashboardBlockQuery) Supplements(db *gorm.DB) *gorm.DB
Supplements Query condition .
type System ¶
System .
func (*System) Delete ¶
func (db *System) Delete(query *DashboardBlockQuery) (err error)
Delete system dashboard block
func (*System) Get ¶
func (db *System) Get(query *DashboardBlockQuery) (obj *SystemBlock, err error)
Get system dashboard block
func (*System) List ¶
func (db *System) List(query *DashboardBlockQuery, pageSize int64, pageNo int64) (objs []*SystemBlock, total int, err error)
List system dashboard block
type SystemBlock ¶
type SystemBlock struct {
ID string `gorm:"not null;unique_index:id;type:varchar(64)" json:"id"`
Name string `gorm:"not null;type:varchar(32);unique_index: Name, Scope, ScopeID" json:"name" binding:"required"`
Desc string `json:"desc"`
Domain string `json:"domain"`
Scope string `gorm:"unique_index: Name, Scope, ScopeID" json:"scope"`
ScopeID string `gorm:"unique_index: Name, Scope, ScopeID" json:"scopeId"`
ViewConfig *ViewConfigDTO `gorm:"not null;type:text"json:"viewConfig"`
DataConfig *dataConfigDTO `gorm:"type:text" json:"dataConfig"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Version string `json:"version"`
}
systemBlock .
type SystemBlockUpdate ¶
type SystemBlockUpdate struct {
Name *string `json:"name"`
Desc *string `json:"desc"`
ViewConfig *ViewConfigDTO `json:"viewConfig"`
}
SystemBlockUpdate .
type User ¶
User .
func (*User) Delete ¶
func (db *User) Delete(query *DashboardBlockQuery) (err error)
Delete user dashboard block
func (*User) Get ¶
func (db *User) Get(query *DashboardBlockQuery) (obj *UserBlock, err error)
Get user dashboard block
type UserBlock ¶
type UserBlock struct {
ID string `gorm:"not null;unique_index: Name, Scope, ScopeID,ID;type:varchar(64)" json:"id"`
Name string `gorm:"not null;type:varchar(32);unique_index: Name, Scope, ScopeID,ID" json:"name" binding:"required"`
Desc string `json:"desc"`
Domain string `json:"domain"`
Scope string `gorm:"unique_index: Name, Scope, ScopeID,ID" json:"scope"`
ScopeID string `gorm:"unique_index: Name, Scope, ScopeID,ID" json:"scopeId"`
ViewConfig *ViewConfigDTO `gorm:"type:text;not null" json:"viewConfig"`
DataConfig *dataConfigDTO `gorm:"type:text;not nul" json:"dataConfig"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Version string `json:"version"`
}
userBlock .
type UserBlockUpdate ¶
type UserBlockUpdate struct {
Name *string `json:"name"`
Desc *string `json:"desc"`
ViewConfig *ViewConfigDTO `json:"viewConfig"`
DataConfig *dataConfigDTO `json:"dataConfig"`
}
UserBlockUpdate .
type View ¶
type View struct {
Title string `json:"title"`
Description string `json:"description"`
ChartType string `json:"chartType"`
DataSourceType string `json:"dataSourceType"`
StaticData interface{} `json:"staticData"`
Config config `json:"config"`
API *API `json:"api"`
Controls interface{} `json:"controls"`
}
ViewResp .
Click to show internal directories.
Click to hide internal directories.