db

package
v0.0.0-...-f9cc55b Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: db.go

Generated by this command:

mockgen -source=db.go -package=db -destination=mock_db.go

Package db is a generated GoMock package.

Index

Constants

View Source
const (
	PlaylistKey = "playlist"
	VideoKey    = "video"
	PositionKey = "position"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltKeyValueStore

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

func (*BoltKeyValueStore) Close

func (keyValueStore *BoltKeyValueStore) Close() error

func (*BoltKeyValueStore) Delete

func (keyValueStore *BoltKeyValueStore) Delete() error

func (*BoltKeyValueStore) DeleteBucket

func (keyValueStore *BoltKeyValueStore) DeleteBucket(bucket string) error

func (*BoltKeyValueStore) DeleteKey

func (keyValueStore *BoltKeyValueStore) DeleteKey(bucket string, key string) error

func (*BoltKeyValueStore) GetAll

func (keyValueStore *BoltKeyValueStore) GetAll(bucket string) (map[string][]byte, error)

func (*BoltKeyValueStore) GetValue

func (keyValueStore *BoltKeyValueStore) GetValue(bucket string, key string) ([]byte, error)

func (*BoltKeyValueStore) Open

func (keyValueStore *BoltKeyValueStore) Open() error

func (*BoltKeyValueStore) Update

func (keyValueStore *BoltKeyValueStore) Update(bucket string, key string, value []byte) error

func (*BoltKeyValueStore) UpdatePlaylist

func (keyValueStore *BoltKeyValueStore) UpdatePlaylist(bucket string, playlist []byte, video string, position uint64) error

type DBManager

type DBManager interface {
	Open() error
	Close() error
	Delete() error
	Update(bucket string, key string, value []byte) error
	GetValue(bucket string, key string) ([]byte, error)
	DeleteKey(bucket string, key string) error
	DeleteBucket(bucket string) error
	UpdatePlaylist(bucket string, playlist []byte, video string, position uint64) error
	GetAll(bucket string) (map[string][]byte, error)
}

TODO updateplaylist -> update abitrary map elements Functionality for updating the states. Buckets and keys are only created based on the Update() function.

func NewDBManager

func NewDBManager(path string, timeout uint64) (DBManager, error)

type MockDBManager

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

MockDBManager is a mock of DBManager interface.

func NewMockDBManager

func NewMockDBManager(ctrl *gomock.Controller) *MockDBManager

NewMockDBManager creates a new mock instance.

func (*MockDBManager) Close

func (m *MockDBManager) Close() error

Close mocks base method.

func (*MockDBManager) Delete

func (m *MockDBManager) Delete() error

Delete mocks base method.

func (*MockDBManager) DeleteBucket

func (m *MockDBManager) DeleteBucket(bucket string) error

DeleteBucket mocks base method.

func (*MockDBManager) DeleteKey

func (m *MockDBManager) DeleteKey(bucket, key string) error

DeleteKey mocks base method.

func (*MockDBManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDBManager) GetAll

func (m *MockDBManager) GetAll(bucket string) (map[string][]byte, error)

GetAll mocks base method.

func (*MockDBManager) GetValue

func (m *MockDBManager) GetValue(bucket, key string) ([]byte, error)

GetValue mocks base method.

func (*MockDBManager) Open

func (m *MockDBManager) Open() error

Open mocks base method.

func (*MockDBManager) Update

func (m *MockDBManager) Update(bucket, key string, value []byte) error

Update mocks base method.

func (*MockDBManager) UpdatePlaylist

func (m *MockDBManager) UpdatePlaylist(bucket string, playlist []byte, video string, position uint64) error

UpdatePlaylist mocks base method.

type MockDBManagerMockRecorder

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

MockDBManagerMockRecorder is the mock recorder for MockDBManager.

func (*MockDBManagerMockRecorder) Close

func (mr *MockDBManagerMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockDBManagerMockRecorder) Delete

func (mr *MockDBManagerMockRecorder) Delete() *gomock.Call

Delete indicates an expected call of Delete.

func (*MockDBManagerMockRecorder) DeleteBucket

func (mr *MockDBManagerMockRecorder) DeleteBucket(bucket any) *gomock.Call

DeleteBucket indicates an expected call of DeleteBucket.

func (*MockDBManagerMockRecorder) DeleteKey

func (mr *MockDBManagerMockRecorder) DeleteKey(bucket, key any) *gomock.Call

DeleteKey indicates an expected call of DeleteKey.

func (*MockDBManagerMockRecorder) GetAll

func (mr *MockDBManagerMockRecorder) GetAll(bucket any) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockDBManagerMockRecorder) GetValue

func (mr *MockDBManagerMockRecorder) GetValue(bucket, key any) *gomock.Call

GetValue indicates an expected call of GetValue.

func (*MockDBManagerMockRecorder) Open

Open indicates an expected call of Open.

func (*MockDBManagerMockRecorder) Update

func (mr *MockDBManagerMockRecorder) Update(bucket, key, value any) *gomock.Call

Update indicates an expected call of Update.

func (*MockDBManagerMockRecorder) UpdatePlaylist

func (mr *MockDBManagerMockRecorder) UpdatePlaylist(bucket, playlist, video, position any) *gomock.Call

UpdatePlaylist indicates an expected call of UpdatePlaylist.

Jump to

Keyboard shortcuts

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