value

package
v0.0.0-...-576298e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool bool

Bool is a Value that represents a stored boolean

func (Bool) Bytes

func (l Bool) Bytes() []byte

Bytes returns a byte-array representation of this Bool

func (Bool) Compare

func (l Bool) Compare(r Value) Comparison

Compare returns a Comparison between this Bool and another Value

type Comparison

type Comparison int

Comparison represents the result of an equality comparison

const (
	LessThan Comparison = iota - 1
	EqualTo
	GreaterThan
	Incomparable
)

Comparison results

type Float

type Float float64

Float is a Value that represents a stored floating point number

func (Float) Bytes

func (l Float) Bytes() []byte

Bytes returns a byte-array representation of this Float

func (Float) Compare

func (l Float) Compare(r Value) Comparison

Compare returns a Comparison between this Float and another Value

type Integer

type Integer int64

Integer is a Value that represents a stored integer

func (Integer) Bytes

func (l Integer) Bytes() []byte

Bytes returns a byte-array representation of this Integer

func (Integer) Compare

func (l Integer) Compare(r Value) Comparison

Compare returns a Comparison between this Integer and another Value

type Key

type Key []byte

Key is a Value that represents a database key

func JoinKeys

func JoinKeys(keys ...Key) Key

JoinKeys joins a set of Keys or returns an empty Key if provided none

func NewKey

func NewKey() Key

NewKey returns a new unique database Key

func (Key) Bytes

func (l Key) Bytes() []byte

Bytes returns a byte-array representation of this Key

func (Key) Compare

func (l Key) Compare(r Value) Comparison

Compare returns a Comparison between this Key and another Value

func (Key) WithKeys

func (l Key) WithKeys(k ...Key) Key

WithKeys combines a Key with a set of additional Keys

type String

type String string

String is a Value that represents a stored string

func (String) Bytes

func (l String) Bytes() []byte

Bytes returns a byte-array representation of this String

func (String) Compare

func (l String) Compare(r Value) Comparison

Compare returns a Comparison between this String and another Value

type Value

type Value interface {
	Compare(Value) Comparison
	Bytes() []byte
}

Value is a placeholder for what will eventually be a generic

Jump to

Keyboard shortcuts

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