keys

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package keys is a composable framework for constructing badger keys from fields of events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(b []byte, elems ...Element)

Read the contents of a byte slice into the provided list of Element types.

func Write

func Write(elems ...Element) []byte

Write the contents of each Element to a byte slice.

Types

type Element

type Element interface {
	// Write the binary form of the field into the given bytes.Buffer.
	Write(buf *bytes.Buffer)
	// Read accepts a bytes.Buffer and decodes a field from it.
	Read(buf *bytes.Buffer) Element
	// Len gives the length of the bytes output by the type.
	Len() int
}

Element is an interface for a type that can Read and Write its binary form.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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