CursorToken

org.sigilaris.node.gossip.GossipCursorModel$package.CursorToken
object CursorToken

Attributes

Source
GossipCursorModel.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def decodeBase64Url(value: String): Either[String, CursorToken]

Decodes a base64url-encoded cursor token.

Decodes a base64url-encoded cursor token.

Value parameters

value

the base64url string (without padding)

Attributes

Returns

the token, or an error message

Source
GossipCursorModel.scala
def fromBytes(bytes: ByteVector): Either[String, CursorToken]

Creates a cursor token from raw bytes.

Creates a cursor token from raw bytes.

Value parameters

bytes

the raw bytes (must not be empty)

Attributes

Returns

the token, or an error if empty

Source
GossipCursorModel.scala
def issue(payload: ByteVector, version: Int): Either[String, CursorToken]

Issues a new cursor token with the given payload and version.

Issues a new cursor token with the given payload and version.

Value parameters

payload

the cursor payload bytes

version

the version byte (default: CurrentVersion)

Attributes

Returns

the assembled cursor token

Source
GossipCursorModel.scala
def unsafeIssue(payload: ByteVector, version: Int): CursorToken

Issues a cursor token, throwing on invalid version values.

Issues a cursor token, throwing on invalid version values.

Attributes

Source
GossipCursorModel.scala

Concrete fields

val CurrentVersion: Int

The current cursor token wire format version.

The current cursor token wire format version.

Attributes

Source
GossipCursorModel.scala

Givens

Givens

Extensions

Extensions

extension (token: CursorToken)
def bytes: ByteVector

Attributes

Source
GossipCursorModel.scala
def payload: ByteVector

Attributes

Source
GossipCursorModel.scala
def toBase64Url: String

Attributes

Source
GossipCursorModel.scala
def validateVersion(expected: Int): Either[StaleCursor, CursorToken]

Attributes

Source
GossipCursorModel.scala
def version: Int

Attributes

Source
GossipCursorModel.scala