db

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct {
	// contains filtered or unexported fields
}

func New

func New() *Db

func (*Db) AddCheck

func (db *Db) AddCheck(ctx context.Context, check *sm.Check) error

func (*Db) AddProbe

func (db *Db) AddProbe(ctx context.Context, probe *sm.Probe, token []byte) error

func (*Db) AddTenant

func (db *Db) AddTenant(ctx context.Context, tenant *sm.Tenant) error

func (*Db) DeleteCheck

func (db *Db) DeleteCheck(ctx context.Context, id int64) error

func (*Db) DeleteProbe

func (db *Db) DeleteProbe(ctx context.Context, id int64) error

func (*Db) DeleteTenant

func (db *Db) DeleteTenant(ctx context.Context, id int64) error

func (*Db) FindProbeByID

func (db *Db) FindProbeByID(ctx context.Context, id int64) (*sm.Probe, error)

func (*Db) FindProbeIDByToken

func (db *Db) FindProbeIDByToken(ctx context.Context, token []byte) (int64, error)

func (*Db) GetCheck

func (db *Db) GetCheck(ctx context.Context, id int64) (*sm.Check, error)

func (*Db) GetProbe

func (db *Db) GetProbe(ctx context.Context, id int64) (*sm.Probe, error)

func (*Db) GetTenant

func (db *Db) GetTenant(ctx context.Context, id int64) (*sm.Tenant, error)

func (*Db) ListChecks

func (db *Db) ListChecks(ctx context.Context) ([]sm.Check, error)

func (*Db) ListChecksForProbe

func (db *Db) ListChecksForProbe(ctx context.Context, id int64) ([]sm.Check, error)

func (*Db) ListProbes

func (db *Db) ListProbes(ctx context.Context) ([]sm.Probe, error)

func (*Db) ListTenants

func (db *Db) ListTenants(ctx context.Context) ([]sm.Tenant, error)

func (*Db) UpdateCheck

func (db *Db) UpdateCheck(ctx context.Context, check *sm.Check) (*sm.Check, error)

func (*Db) UpdateProbe

func (db *Db) UpdateProbe(ctx context.Context, probe *sm.Probe) (*sm.Probe, error)

func (*Db) UpdateTenant

func (db *Db) UpdateTenant(ctx context.Context, tenant *sm.Tenant) (*sm.Tenant, error)

Jump to

Keyboard shortcuts

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