token

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodedSnapToken

type EncodedSnapToken interface {
	// String returns the string representation of the token.
	String() string
	// Decode decodes the token from a string
	Decode() (SnapToken, error)
}

type NoopEncodedToken

type NoopEncodedToken struct {
	Value string
}

func (NoopEncodedToken) Decode

func (t NoopEncodedToken) Decode() (SnapToken, error)

Decode - Decodes the token from a string

func (NoopEncodedToken) String

func (t NoopEncodedToken) String() string

Decode - Decodes the token from a string

type NoopToken

type NoopToken struct {
	Value string
}

func (NoopToken) Eg

func (t NoopToken) Eg(token SnapToken) bool

Eg - Snapshot is equal to given snapshot

func (NoopToken) Encode

func (t NoopToken) Encode() EncodedSnapToken

Encode - encodes the token to a string

func (NoopToken) Gt

func (t NoopToken) Gt(token SnapToken) bool

Gt - Snapshot is greater than given snapshot

func (NoopToken) Lt

func (t NoopToken) Lt(token SnapToken) bool

Lt - Snapshot is less than given snapshot

type SnapToken

type SnapToken interface {
	// Encode encodes the token to a string.
	Encode() EncodedSnapToken
	// Eg snapshot is equal to given snapshot
	Eg(token SnapToken) bool
	// Gt snapshot is greater than given snapshot
	Gt(token SnapToken) bool
	// Lt snapshot is less than given snapshot
	Lt(token SnapToken) bool
}

func NewNoopToken

func NewNoopToken() SnapToken

NewNoopToken - Creates a new noop snapshot token

Jump to

Keyboard shortcuts

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