zookie

package
Version: v1.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package zookie converts integers to zookies and vice versa

Index

Constants

This section is empty.

Variables

View Source
var ErrNilZookie = errors.New("zookie pointer was nil")

ErrNilZookie is returned as the base error when nil is provided as the zookie argument to Decode

Functions

func Decode

func Decode(encoded *core.Zookie) (*zookie.DecodedZookie, error)

Decode converts an encoded zookie to its decoded version.

func DecodeRevision

func DecodeRevision(encoded *core.Zookie) (decimal.Decimal, error)

DecodeRevision converts and extracts the revision from a zookie.

func Encode

func Encode(decoded *zookie.DecodedZookie) (*core.Zookie, error)

Encode converts a decoded zookie to its opaque version.

func NewFromRevision

func NewFromRevision(revision decimal.Decimal) *core.Zookie

NewFromRevision generates an encoded zookie from an integral revision.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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