database

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 7 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 *database.DB) *DB

func (*DB) AppendMany

func (db *DB) AppendMany(_ context.Context, metrics []model.Metric) error

func (*DB) CountByEntity

func (db *DB) CountByEntity(entityID string) (int, error)

func (*DB) Delete

func (db *DB) Delete(_ context.Context, metric model.Metric) error

func (*DB) DeleteMany

func (db *DB) DeleteMany(_ context.Context, metrics []model.Metric) error

func (*DB) FindAll

func (db *DB) FindAll(_ context.Context, filter FilterFn) ([]model.Metric, error)

func (*DB) FindByEntity

func (db *DB) FindByEntity(entityID string, filter FilterFn) ([]model.Metric, error)

func (*DB) Keys

func (db *DB) Keys() ([]string, error)

func (*DB) Store

func (db *DB) Store(_ context.Context, metric model.Metric) error

type FilterFn

type FilterFn func(metric model.Metric) bool

Jump to

Keyboard shortcuts

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