sqlstore

package
v0.0.0-...-0bdedc6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DbCfg struct {
		Type, Host, Name, User, Pwd, Path, SslMode string
	}

	UseSQLite3 bool
)

Functions

func AddEndpoint

func AddEndpoint(e *m.EndpointDTO) error

func AddProbe

func AddProbe(p *m.ProbeDTO) error

func AddProbeSession

func AddProbeSession(probeSess *m.ProbeSession) error

func BatchUpdateCheckState

func BatchUpdateCheckState(jobs []*m.AlertingJob) ([]*m.AlertingJob, error)

func ClearProbeSessions

func ClearProbeSessions(instance string) error

func DeleteEndpoint

func DeleteEndpoint(orgId, id int64) error

func DeleteProbe

func DeleteProbe(id int64, orgId int64) error

func DeleteProbeSession

func DeleteProbeSession(p *m.ProbeSession) error

func GetAlertSchedulerValue

func GetAlertSchedulerValue(id string) (string, error)

func GetCheckById

func GetCheckById(orgId, checkId int64) (*m.Check, error)

func GetChecksForAlerts

func GetChecksForAlerts(ts int64) ([]m.CheckForAlertDTO, error)

func GetEndpointById

func GetEndpointById(orgId, id int64) (*m.EndpointDTO, error)

func GetEndpointTags

func GetEndpointTags(orgId int64) ([]string, error)

func GetEndpoints

func GetEndpoints(query *m.GetEndpointsQuery) ([]m.EndpointDTO, error)

func GetGlobalQuotaByTarget

func GetGlobalQuotaByTarget(target string) (*m.GlobalQuotaDTO, error)

func GetOnlineProbes

func GetOnlineProbes() ([]m.Probe, error)

func GetOrgQuotaByTarget

func GetOrgQuotaByTarget(orgId int64, target string, def int64) (*m.OrgQuotaDTO, error)

func GetOrgQuotas

func GetOrgQuotas(orgId int64) ([]m.OrgQuotaDTO, error)

func GetProbeById

func GetProbeById(id int64, orgId int64) (*m.ProbeDTO, error)

func GetProbeByName

func GetProbeByName(name string, orgId int64) (*m.ProbeDTO, error)

func GetProbeChecks

func GetProbeChecks(probe *m.ProbeDTO) ([]m.Check, error)

func GetProbeChecksWithEndpointSlug

func GetProbeChecksWithEndpointSlug(probe *m.ProbeDTO) ([]m.CheckWithSlug, error)

func GetProbeSessions

func GetProbeSessions(probeId int64, instance string, since time.Time) ([]m.ProbeSession, error)

func GetProbeTags

func GetProbeTags(orgId int64) ([]string, error)

func GetProbes

func GetProbes(query *m.GetProbesQuery) ([]m.ProbeDTO, error)

func GetProbesForCheck

func GetProbesForCheck(check *m.Check) ([]int64, error)

func GetUsage

func GetUsage() (*m.Usage, error)

func LoadConfig

func LoadConfig()

func MockEngine

func MockEngine() error

setup and manage an SQLite3 engine for testing.

func NewEngine

func NewEngine()

func SetEngine

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

func TestDB

func TestDB() error

func UpdateAlertSchedulerValue

func UpdateAlertSchedulerValue(id, value string) error

func UpdateCheckState

func UpdateCheckState(job *m.AlertingJob) (bool, error)

func UpdateEndpoint

func UpdateEndpoint(e *m.EndpointDTO) error

func UpdateOrgQuota

func UpdateOrgQuota(q *m.OrgQuotaDTO) error

func UpdateProbe

func UpdateProbe(p *m.ProbeDTO) error

func UpdateProbeSession

func UpdateProbeSession(probeSess *m.ProbeSession) error

func ValidateCheckRoute

func ValidateCheckRoute(check *m.Check) error

Types

type ProbeId

type ProbeId struct {
	Id int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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