zedtoken

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package zedtoken converts decimal.Decimal to zedtoken and vice versa

Index

Constants

This section is empty.

Variables

View Source
var ErrNilZedToken = errors.New("zedtoken pointer was nil")

ErrNilZedToken is returned as the base error when nil is provided as the zedtoken argument to Decode

Functions

func Decode

func Decode(encoded *v1.ZedToken) (*zedtoken.DecodedZedToken, error)

Decode converts an encoded zedtoken to its decoded version.

func DecodeRevision

func DecodeRevision(encoded *v1.ZedToken) (decimal.Decimal, error)

DecodeRevision converts and extracts the revision from a zedtoken or legacy zookie.

func Encode

func Encode(decoded *zedtoken.DecodedZedToken) (*v1.ZedToken, error)

Encode converts a decoded zedtoken to its opaque version.

func NewFromRevision

func NewFromRevision(revision decimal.Decimal) *v1.ZedToken

NewFromRevision generates an encoded zedtoken from an integral revision.

Types

This section is empty.

Jump to

Keyboard shortcuts

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