sqlstore

package
v1.7.1-0...-29a0ac7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HasEngine bool

	DbCfg struct {
		Type, Host, Name, User, Pwd, Path, SslMode string
	}

	UseSQLite3 bool
)

Functions

func AddCollector

func AddCollector(cmd *m.AddCollectorCommand) error

func AddCollectorSession

func AddCollectorSession(cmd *m.AddCollectorSessionCommand) error

func AddEndpoint

func AddEndpoint(cmd *m.AddEndpointCommand) error

func AddMonitor

func AddMonitor(cmd *m.AddMonitorCommand) error

func ClearCollectorSession

func ClearCollectorSession(cmd *m.ClearCollectorSessionCommand) error

func CopyPublicCollectorTags

func CopyPublicCollectorTags(orgId int64, sess *session) error

func DeleteCollector

func DeleteCollector(cmd *m.DeleteCollectorCommand) error

func DeleteCollectorSession

func DeleteCollectorSession(cmd *m.DeleteCollectorSessionCommand) error

func DeleteEndpoint

func DeleteEndpoint(cmd *m.DeleteEndpointCommand) error

func DeleteMonitor

func DeleteMonitor(cmd *m.DeleteMonitorCommand) error

func DeleteMonitorTransaction

func DeleteMonitorTransaction(cmd *m.DeleteMonitorCommand, sess *session) error

func GetAlertSchedulerValue

func GetAlertSchedulerValue(query *m.GetAlertSchedulerValueQuery) error

func GetAllEndpointTags

func GetAllEndpointTags(query *m.GetAllEndpointTagsQuery) error

func GetCollectorById

func GetCollectorById(query *m.GetCollectorByIdQuery) error

func GetCollectorByName

func GetCollectorByName(query *m.GetCollectorByNameQuery) error

func GetCollectorSessions

func GetCollectorSessions(query *m.GetCollectorSessionsQuery) error

func GetCollectorSessionsTransaction

func GetCollectorSessionsTransaction(query *m.GetCollectorSessionsQuery, sess *session) error

func GetCollectorTags

func GetCollectorTags(query *m.GetAllCollectorTagsQuery) error

func GetCollectors

func GetCollectors(query *m.GetCollectorsQuery) error

func GetEndpointById

func GetEndpointById(query *m.GetEndpointByIdQuery) error

func GetEndpointByIdTransaction

func GetEndpointByIdTransaction(query *m.GetEndpointByIdQuery, sess *session) error

func GetEndpoints

func GetEndpoints(query *m.GetEndpointsQuery) error

func GetGlobalQuotaByTarget

func GetGlobalQuotaByTarget(query *m.GetGlobalQuotaByTargetQuery) error

func GetMonitorById

func GetMonitorById(query *m.GetMonitorByIdQuery) error

func GetMonitorTypes

func GetMonitorTypes(query *m.GetMonitorTypesQuery) error

func GetMonitors

func GetMonitors(query *m.GetMonitorsQuery) error

func GetMonitorsForAlerts

func GetMonitorsForAlerts(query *m.GetMonitorsForAlertsQuery) error

GetMonitorsForAlerts finds monitors where ts % freq = offset.

func GetOrgQuotaByTarget

func GetOrgQuotaByTarget(query *m.GetOrgQuotaByTargetQuery) error

func GetOrgQuotas

func GetOrgQuotas(query *m.GetOrgQuotasQuery) error

func LoadConfig

func LoadConfig()

func NewEngine

func NewEngine()

func SetEngine

func SetEngine(engine *xorm.Engine, enableLog bool) (err error)

func UpdateAlertSchedulerValue

func UpdateAlertSchedulerValue(cmd *m.UpdateAlertSchedulerValueCommand) error

func UpdateCollector

func UpdateCollector(cmd *m.UpdateCollectorCommand) error

func UpdateEndpoint

func UpdateEndpoint(cmd *m.UpdateEndpointCommand) error

func UpdateMonitor

func UpdateMonitor(cmd *m.UpdateMonitorCommand) error

func UpdateMonitorState

func UpdateMonitorState(cmd *m.UpdateMonitorStateCommand) error

func UpdateOrgQuota

func UpdateOrgQuota(cmd *m.UpdateOrgQuotaCmd) error

Types

type CollectorId

type CollectorId struct {
	CollectorId int64
}

type CollectorWithTag

type CollectorWithTag struct {
	Id            int64
	OrgId         int64
	Name          string
	Slug          string
	Tags          string
	Latitude      float64
	Longitude     float64
	Public        bool
	Created       time.Time
	Updated       time.Time
	Online        bool
	OnlineChange  time.Time
	Enabled       bool
	EnabledChange time.Time
}

type EndpointWithTag

type EndpointWithTag struct {
	Id      int64
	OrgId   int64
	Name    string
	Slug    string
	Tags    string
	Created time.Time
	Updated time.Time
}

type MonitorTypeWithSettingsDTO

type MonitorTypeWithSettingsDTO struct {
	Id           int64
	Name         string
	Variable     string
	Description  string
	Required     bool
	DataType     string
	Conditions   map[string]interface{}
	DefaultValue string
}

type MonitorWithCollectorDTO

type MonitorWithCollectorDTO struct {
	Id              int64
	EndpointId      int64
	OrgId           int64
	EndpointSlug    string
	MonitorTypeId   int64
	MonitorTypeName string
	CollectorIds    string
	CollectorTags   string
	TagCollectors   string
	State           m.CheckEvalResult
	StateChange     time.Time
	StateCheck      time.Time
	Settings        []*m.MonitorSettingDTO
	HealthSettings  *m.MonitorHealthSettingDTO //map[string]int //note: wish we could use m.MonitorHealthSettingDTO directly, but xorm doesn't unmarshal to structs?
	Frequency       int64
	Enabled         bool
	Offset          int64
	Updated         time.Time
	Created         time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL