repository

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryRepo

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

func NewInMemoryRepo

func NewInMemoryRepo() *InMemoryRepo

func (*InMemoryRepo) GetAll

func (r *InMemoryRepo) GetAll() ([]taskstorage.TaskInfo, error)

func (*InMemoryRepo) GetById

func (r *InMemoryRepo) GetById(taskId string) (taskstorage.TaskInfo, error)

func (*InMemoryRepo) GetUpdatedSince

func (r *InMemoryRepo) GetUpdatedSince(since time.Time) ([]taskstorage.TaskInfo, error)

func (*InMemoryRepo) Insert

func (r *InMemoryRepo) Insert(taskInfo taskstorage.TaskInfo) (taskId string, err error)

func (*InMemoryRepo) MarkAsCancelled

func (r *InMemoryRepo) MarkAsCancelled(id string) (ok bool, err error)

func (*InMemoryRepo) MarkAsDone

func (r *InMemoryRepo) MarkAsDone(id string) (ok bool, err error)

func (*InMemoryRepo) MarkAsFailed

func (r *InMemoryRepo) MarkAsFailed(id string) (ok bool, err error)

func (*InMemoryRepo) Update

func (r *InMemoryRepo) Update(id string, diff taskstorage.UpdateDiff) error

func (*InMemoryRepo) UpdateState

func (r *InMemoryRepo) UpdateState(id string, old, new taskstorage.TaskState) (swapped bool, err error)

type RandStringGenerator

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

func NewRandStringGenerator

func NewRandStringGenerator(seed int64, byteLen uint, encoderFactory func(r io.Writer) io.Writer) *RandStringGenerator

func (*RandStringGenerator) Generate

func (f *RandStringGenerator) Generate() (randomStr string, err error)

type Sqlite3Repo

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

func NewSql3Repo

func NewSql3Repo(dbName string) (repo *Sqlite3Repo, err error)

func (*Sqlite3Repo) Close

func (r *Sqlite3Repo) Close() error

func (*Sqlite3Repo) GetAll

func (r *Sqlite3Repo) GetAll() (taskInfos []taskstorage.TaskInfo, err error)

func (*Sqlite3Repo) GetById

func (r *Sqlite3Repo) GetById(taskId string) (taskInfo taskstorage.TaskInfo, err error)

func (*Sqlite3Repo) GetUpdatedSince

func (r *Sqlite3Repo) GetUpdatedSince(since time.Time) ([]taskstorage.TaskInfo, error)

func (*Sqlite3Repo) Insert

func (r *Sqlite3Repo) Insert(taskInfo taskstorage.TaskInfo) (taskId string, err error)

func (*Sqlite3Repo) MarkAsCancelled

func (r *Sqlite3Repo) MarkAsCancelled(id string) (ok bool, err error)

func (*Sqlite3Repo) MarkAsDone

func (r *Sqlite3Repo) MarkAsDone(id string) (ok bool, err error)

func (*Sqlite3Repo) MarkAsFailed

func (r *Sqlite3Repo) MarkAsFailed(id string) (ok bool, err error)

func (*Sqlite3Repo) Update

func (r *Sqlite3Repo) Update(id string, diff taskstorage.UpdateDiff) (err error)

func (*Sqlite3Repo) UpdateState

func (r *Sqlite3Repo) UpdateState(id string, old, new taskstorage.TaskState) (swapped bool, err error)

Jump to

Keyboard shortcuts

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