Documentation ¶
Index ¶
- type DataSource
- type DatabaseSource
- func (this DatabaseSource) DeleteWidget(wObj Widget) (bool, error)
- func (this DatabaseSource) DeleteWidgetByKey(id string) (bool, error)
- func (this DatabaseSource) ExpiredWidgetCount(expireTime uint64) (int64, error)
- func (this DatabaseSource) GetWidget(id string) (Widget, error)
- func (this DatabaseSource) GetWidgets(expireTime uint64, from int, qty int) ([]Widget, error)
- func (this DatabaseSource) MinimumWidgetElapseMinutes() (int64, error)
- func (this DatabaseSource) NewWidget(apiHeader string, apiKey string, apiPath string, cacheElapse uint32) (Widget, error)
- func (this DatabaseSource) UpdateNextCheckWidget(wObj Widget) (bool, error)
- func (this DatabaseSource) UpdateWidget(wObj Widget) (bool, error)
- type DbType
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource interface { GetWidget(id string) (Widget, error) GetWidgets(expireTime uint64, from int, qty int) ([]Widget, error) NewWidget(apiHeader string, apiKey string, apiPath string, cacheElapse uint32) (Widget, error) UpdateWidget(wObj Widget) (bool, error) UpdateNextCheckWidget(wObj Widget) (bool, error) DeleteWidget(wObj Widget) (bool, error) DeleteWidgetByKey(id string) (bool, error) ExpiredWidgetCount(expireTime uint64) (int64, error) MinimumWidgetElapseMinutes() (int64, error) }
func GetDataSource ¶
func GetDataSource(dbType DbType, config map[string]string) DataSource
type DatabaseSource ¶
type DatabaseSource struct {
// contains filtered or unexported fields
}
func (DatabaseSource) DeleteWidget ¶
func (this DatabaseSource) DeleteWidget(wObj Widget) (bool, error)
func (DatabaseSource) DeleteWidgetByKey ¶
func (this DatabaseSource) DeleteWidgetByKey(id string) (bool, error)
func (DatabaseSource) ExpiredWidgetCount ¶
func (this DatabaseSource) ExpiredWidgetCount(expireTime uint64) (int64, error)
func (DatabaseSource) GetWidgets ¶
func (DatabaseSource) MinimumWidgetElapseMinutes ¶
func (this DatabaseSource) MinimumWidgetElapseMinutes() (int64, error)
func (DatabaseSource) UpdateNextCheckWidget ¶
func (this DatabaseSource) UpdateNextCheckWidget(wObj Widget) (bool, error)
func (DatabaseSource) UpdateWidget ¶
func (this DatabaseSource) UpdateWidget(wObj Widget) (bool, error)
type Widget ¶
Click to show internal directories.
Click to hide internal directories.