tapedb

package module
v2.0.0-...-5024b2a Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

tapedb

Embbeded database for Go programs

Project

The implementation was provided by simia.tech GmbH.

License

The project is licensed under Apache 2.0 (see LICENSE file).

Documentation

Index

Constants

View Source
const (
	FileNameDatabase    = "db"
	FileNameNewDatabase = "db.new"
	FilePrefixPayload   = "payload-"

	HeaderNonce = "Nonce"
)

Variables

View Source
var (
	ErrUnknownChangeType = errors.New("unknown change type")
)

Functions

func GenerateUUID

func GenerateUUID() string

Types

type Base

type Base interface {
	io.ReaderFrom
	io.WriterTo

	Apply(Change) error
}

type Change

type Change interface {
	io.ReaderFrom
	io.WriterTo

	TypeName() string
}

type Database

type Database[B Base, S State] interface {
	Base() B
	State() S
	Apply(Change) error
	Close() error
}

type Factory

type Factory[B Base, S State] interface {
	NewBase() B
	NewState(B, sync.Locker) S
	NewChange(string) (Change, error)
}

type State

type State interface {
	Apply(Change) error
}

Directories

Path Synopsis
cmd
io

Jump to

Keyboard shortcuts

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