storage

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package storage implements a set of functions to interact with the database.

Index

Constants

This section is empty.

Variables

View Source
var ErrDatabaseNotFound = errors.New("database not found")

Functions

This section is empty.

Types

type Storage

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

Storage handles all operations related to the database.

func Open

func Open(opts *config.Options, path string) (*Storage, error)

Open a bolt database on current directory in given path. It is the caller's responsibility to close it.

func (*Storage) Close

func (s *Storage) Close() error

Close the bolt database

func (*Storage) CreatePlayback

func (s *Storage) CreatePlayback(pb *entity.Playback) error

CreatePlayback creates a playback callback data.

func (*Storage) Playback

func (s *Storage) Playback(id int) (*entity.Playback, error)

Playback returns playback data of the given id.

func (*Storage) RemovePlayback

func (s *Storage) RemovePlayback(id uint64) error

RemovePlayback removes a playback callback entry by id.

Jump to

Keyboard shortcuts

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