db

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 2 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 interface {
	Save(result checks.ResultDTO)
	Get(check string) (result checks.Result, ok bool)
	List() map[string]checks.Result
}

type InMemory

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

func NewInMemory

func NewInMemory() *InMemory

NewInMemory creates a new in-memory database

func (*InMemory) Get

func (i *InMemory) Get(check string) (checks.Result, bool)

func (*InMemory) List

func (i *InMemory) List() map[string]checks.Result

List returns a copy of the map

func (*InMemory) Save

func (i *InMemory) Save(result checks.ResultDTO)

Jump to

Keyboard shortcuts

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