kv

package
v0.0.0-...-ceca93b Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadFormat = errors.New("malformed data")

ErrBadFormat is returned when a read file contains data which cannot be properly parsed into an Entry.

View Source
var ErrNotExist = errors.New("key does not exist")

ErrNotExist is returned when attempting to perform an operation on a key which does not exist.

Functions

func Delete

func Delete(key string) error

func Get

func Get(key string) (string, error)

func Set

func Set(key, val string, now time.Time) error

func Timestamps

func Timestamps(key string) (first, last time.Time, err error)

Types

type Entry

type Entry struct {
	FirstEdited time.Time
	LastEdited  time.Time
	Value       string
}

Jump to

Keyboard shortcuts

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