sqlitestore

package
v0.0.0-...-f92ee09 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqliteStore

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

SqliteStore implements the store interface with Sqlite

func New

func New(dbFile string) (*SqliteStore, error)

New creates new Store backed by SQLite3

func (*SqliteStore) Close

func (s *SqliteStore) Close() error

Close ...

func (*SqliteStore) DeleteCal

func (s *SqliteStore) DeleteCal(id int64) error

DeleteCal ...

func (*SqliteStore) GetCal

func (s *SqliteStore) GetCal(id int64) (*model.Cal, error)

GetCal ...

func (*SqliteStore) GetMessage

func (s *SqliteStore) GetMessage(id int64) (*model.Message, error)

GetMessage ...

func (*SqliteStore) ListCals

func (s *SqliteStore) ListCals(offset int, limit int) ([]model.Cal, error)

ListCals ...

func (*SqliteStore) ListCalsForDevice

func (s *SqliteStore) ListCalsForDevice(deviceID string) ([]model.Cal, error)

ListCalsForDevice ...

func (*SqliteStore) ListDeviceMessagesByDate

func (s *SqliteStore) ListDeviceMessagesByDate(deviceID string, from int64, to int64) ([]model.Message, error)

ListDeviceMessagesByDate ...

func (*SqliteStore) ListMessages

func (s *SqliteStore) ListMessages(offset int, limit int) ([]model.Message, error)

ListMessages ...

func (*SqliteStore) ListMessagesByDate

func (s *SqliteStore) ListMessagesByDate(from int64, to int64) ([]model.Message, error)

ListMessagesByDate ...

func (*SqliteStore) PutCal

func (s *SqliteStore) PutCal(c *model.Cal) (int64, error)

PutCal ...

func (*SqliteStore) PutMessage

func (s *SqliteStore) PutMessage(m *model.Message) (int64, error)

PutMessage ...

Jump to

Keyboard shortcuts

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