codec

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(s ReadOnlyStore, decoder Decoder, options ...store.ReaderOption) (store.Version, error)

func ReadLatest

func ReadLatest(s ReadOnlyStore, decoder Decoder) (store.Version, error)

ReadLatest reads latest version or fallback to previous one when decoder returned error

func Write

func Write(s WriteOnlyStore, encoder Encoder, options ...store.WriterOption) error

Types

type Decoder

type Decoder func(reader io.Reader) error

type Encoder

type Encoder func(writer io.Writer) error

type ReadOnlyStore

type ReadOnlyStore interface {
	Versions() ([]store.Version, error)
	Reader(...store.ReaderOption) (store.Reader, error)
}

type WriteOnlyStore

type WriteOnlyStore interface {
	Writer(...store.WriterOption) (store.Writer, error)
}

Jump to

Keyboard shortcuts

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