kv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(kvs ...*api.KVPair) ([]byte, error)

Decode overrides given value representation for each kv entry as an object and returns all kv as json array.

func Encode

func Encode(data []byte) (encoded api.KVPairs, err error)

Encode accepts json array of kv entries to transform each value as []byte from json object.

Types

type KV

type KV struct {
	*api.KVPair
	// Value overrides embedded KVPair's Value
	// to represent value as json object instead of raw string.
	Value interface{}
}

KV is used to represent a single K/V entry.

Jump to

Keyboard shortcuts

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