types

package
v1.16.37 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Empty = ID{}

Empty returns an empty ID

Functions

This section is empty.

Types

type ID

type ID [32]byte

ID represents a 32-byte identifier

func GenerateTestID

func GenerateTestID() ID

GenerateTestID generates a random ID for testing

func (ID) String

func (id ID) String() string

String returns the string representation of an ID

type NodeID

type NodeID [20]byte

NodeID represents a node identifier

func GenerateTestNodeID

func GenerateTestNodeID() NodeID

GenerateTestNodeID generates a random NodeID for testing

func NodeIDFromString

func NodeIDFromString(s string) (NodeID, error)

NodeIDFromString creates a NodeID from a string

func (NodeID) String

func (id NodeID) String() string

String returns the string representation of a NodeID

type ShortID

type ShortID [20]byte

ShortID represents a 20-byte identifier

func ShortFromString

func ShortFromString(s string) (ShortID, error)

ShortFromString creates a ShortID from a string

func (ShortID) String

func (id ShortID) String() string

String returns the string representation of a ShortID

Jump to

Keyboard shortcuts

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