dbstore

package
v0.0.3-alpha3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrationSource

func MigrationSource() *migration.EmbedMigrationSource

func RunMigration

func RunMigration(dsn string) (int, error)

Types

type DbConstraintStore

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

DbConstraintStore implements store.ConstraintStore

func NewDbConstraintStore

func NewDbConstraintStore(dsn string) (*DbConstraintStore, error)

func (*DbConstraintStore) Add

func (d *DbConstraintStore) Add(constraint *tarianpb.Constraint) error

func (*DbConstraintStore) FindByNamespace

func (d *DbConstraintStore) FindByNamespace(namespace string) ([]*tarianpb.Constraint, error)

func (*DbConstraintStore) GetAll

func (d *DbConstraintStore) GetAll() ([]*tarianpb.Constraint, error)

func (*DbConstraintStore) NamespaceAndNameExist

func (d *DbConstraintStore) NamespaceAndNameExist(namespace, name string) (bool, error)

func (*DbConstraintStore) RemoveByNamespaceAndName

func (d *DbConstraintStore) RemoveByNamespaceAndName(namespace, name string) error

type DbEventStore

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

DbEventStore implements store.EventStore

func NewDbEventStore

func NewDbEventStore(dsn string) (*DbEventStore, error)

func (*DbEventStore) Add

func (d *DbEventStore) Add(event *tarianpb.Event) error

func (*DbEventStore) FindByNamespace

func (d *DbEventStore) FindByNamespace(namespace string, limit uint) ([]*tarianpb.Event, error)

func (*DbEventStore) FindWhereAlertNotSent

func (d *DbEventStore) FindWhereAlertNotSent() ([]*tarianpb.Event, error)

func (*DbEventStore) GetAll

func (d *DbEventStore) GetAll(limit uint) ([]*tarianpb.Event, error)

func (*DbEventStore) UpdateAlertSent

func (d *DbEventStore) UpdateAlertSent(uid string) error

Jump to

Keyboard shortcuts

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