store

package
v0.0.0-...-cdb8e5e Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStore

type EventStore struct {
	DbFile   string
	FileMode os.FileMode
	Db       *bolt.DB
	Bucket   string
}

func NewEventStore

func NewEventStore(file string, mode os.FileMode, bucket string) (*EventStore, error)

func (*EventStore) Close

func (e *EventStore) Close()

func (*EventStore) Count

func (e *EventStore) Count() (int, error)

func (*EventStore) CreateBucket

func (e *EventStore) CreateBucket() error

func (*EventStore) Get

func (e *EventStore) Get(key string) (interface{}, error)

func (*EventStore) List

func (e *EventStore) List() (interface{}, error)

func (*EventStore) Put

func (e *EventStore) Put(key string, value interface{}) error

type InMemoryTaskEventStore

type InMemoryTaskEventStore struct {
	Db map[string]*sail.SailEvent
}

func NewInMemoryTaskEventStore

func NewInMemoryTaskEventStore() *InMemoryTaskEventStore

func (*InMemoryTaskEventStore) Count

func (i *InMemoryTaskEventStore) Count() (int, error)

func (*InMemoryTaskEventStore) Get

func (i *InMemoryTaskEventStore) Get(key string) (interface{}, error)

func (*InMemoryTaskEventStore) List

func (i *InMemoryTaskEventStore) List() (interface{}, error)

func (*InMemoryTaskEventStore) Put

func (i *InMemoryTaskEventStore) Put(key string, value interface{}) error

type InMemoryTaskStore

type InMemoryTaskStore struct {
	Db map[string]*sail.Sail
}

func NewInMemoryTaskStore

func NewInMemoryTaskStore() *InMemoryTaskStore

func (*InMemoryTaskStore) Count

func (i *InMemoryTaskStore) Count() (int, error)

func (*InMemoryTaskStore) Get

func (i *InMemoryTaskStore) Get(key string) (interface{}, error)

func (*InMemoryTaskStore) List

func (i *InMemoryTaskStore) List() (interface{}, error)

func (*InMemoryTaskStore) Put

func (i *InMemoryTaskStore) Put(key string, value interface{}) error

type Store

type Store interface {
	Put(key string, value interface{}) error
	Get(key string) (interface{}, error)
	List() (interface{}, error)
	Count() (int, error)
}

type TaskStore

type TaskStore struct {
	Db       *bolt.DB
	DbFile   string
	FileMode os.FileMode
	Bucket   string
}

func NewTaskStore

func NewTaskStore(file string, mode os.FileMode, bucket string) (*TaskStore, error)

func (*TaskStore) Close

func (t *TaskStore) Close()

func (*TaskStore) Count

func (t *TaskStore) Count() (int, error)

func (*TaskStore) CreateBucket

func (t *TaskStore) CreateBucket() error

func (*TaskStore) Get

func (t *TaskStore) Get(key string) (interface{}, error)

func (*TaskStore) List

func (t *TaskStore) List() (interface{}, error)

func (*TaskStore) Put

func (t *TaskStore) Put(key string, value interface{}) error

Jump to

Keyboard shortcuts

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