db

package
v0.0.0-...-9dc31f9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoxRow

type BoxRow struct {
	Name       string
	CreateTime int64
	MinTime    int64
	MaxTime    int64
}

type SpanRow

type SpanRow struct {
	ID    int64
	Start int64
	End   int64
	Box   string
}

type TBDB

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

TBDB is the base struct for the database

func NewDBWithName

func NewDBWithName(name string) TBDB

func (TBDB) AddBox

func (d TBDB) AddBox(name string, minTime, maxTime int64) error

func (TBDB) AddSpan

func (d TBDB) AddSpan(start, end int64, box string) error

func (TBDB) CreateDB

func (d TBDB) CreateDB() error

func (TBDB) DeleteBox

func (d TBDB) DeleteBox(name string) error

func (TBDB) DeleteBoxAndSpans

func (d TBDB) DeleteBoxAndSpans(name string) error

func (TBDB) DeleteSpan

func (d TBDB) DeleteSpan(start, end int64, box string) error

func (TBDB) DeleteSpanByID

func (d TBDB) DeleteSpanByID(id int64) error

func (TBDB) DoesBoxExist

func (d TBDB) DoesBoxExist(name string) (bool, error)

func (TBDB) DoesSpanOverlap

func (d TBDB) DoesSpanOverlap(start, end int64) (bool, error)

func (TBDB) GetAllBoxes

func (d TBDB) GetAllBoxes() ([]BoxRow, error)

func (TBDB) GetBox

func (d TBDB) GetBox(name string) (BoxRow, error)

func (TBDB) GetSpansForBox

func (d TBDB) GetSpansForBox(boxName string) ([]SpanRow, error)

func (TBDB) GetSpansForTimeRange

func (d TBDB) GetSpansForTimeRange(start, end int64) ([]SpanRow, error)

func (TBDB) Init

func (d TBDB) Init()

func (TBDB) UpdateBox

func (d TBDB) UpdateBox(name string, minTime, maxTime int64) error

func (TBDB) UpdateSpan

func (d TBDB) UpdateSpan(id, start, end int64, box string) error

Jump to

Keyboard shortcuts

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