Documentation
¶
Overview ¶
Package storage implements a set of functions to interact with the database.
Index ¶
- Variables
- func Migrate(db *sql.DB) error
- func NewConnectionPool(dsn string, minConnections, maxConnections int, ...) (*sql.DB, error)
- func Open(opts *config.Options, path string) (*bolt.DB, error)
- type Storage
- func (s *Storage) Close() (err error)
- func (s *Storage) CreatePlayback(pb *entity.Playback) error
- func (s *Storage) CreateWayback(ctx context.Context, cols []wayback.Collect) error
- func (s *Storage) Ping() error
- func (s *Storage) Playback(id uint64) (*entity.Playback, error)
- func (s *Storage) RemovePlayback(id uint64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDatabaseNotFound = errors.New("database not found")
Functions ¶
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage handles all operations related to the database.
func NewStorage ¶ added in v0.21.0
NewStorage returns a new Storage. It is the caller's responsibility to close it.
func (*Storage) CreatePlayback ¶
CreatePlayback creates a playback callback data.
func (*Storage) CreateWayback ¶ added in v0.21.0
func (*Storage) RemovePlayback ¶
RemovePlayback removes a playback callback entry by id.
Click to show internal directories.
Click to hide internal directories.