rwapi

package
v0.0.0-...-307a978 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 2 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstraintOrTransactionError

type ConstraintOrTransactionError struct {
	Message string
	Details []string
}

func (ConstraintOrTransactionError) Error

type IDEntry

type IDEntry struct {
	ID   string `json:"id"`
	Hash string `json:"hash,omitempty"`
}

IDEntry is used when listing __ids.

type IDService

type IDService interface {
	IDs(func(entry IDEntry) (more bool, err error)) error
}

IDService is an additional optional interface that read-write applications can choose to implement

type Service

type Service interface {
	Write(thing interface{}, transId string) error
	Read(uuid string, transId string) (thing interface{}, found bool, err error)
	Delete(uuid string, transId string) (found bool, err error)
	DecodeJSON(*json.Decoder) (thing interface{}, identity string, err error)
	Count() (int, error)
	Check() error
	Initialise() error
}

Service defines the functions any read-write application needs to implement

Jump to

Keyboard shortcuts

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