Help us shape the future of Go! Take the 2026 Go Developer Survey

handles

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package handles provides shared mechanics for scoped opaque handles. Domain adapters remain responsible for authorization, storage and lifetimes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	// contains filtered or unexported fields
}

func NewCodec

func NewCodec(random io.Reader, prefix string, input HashInput) (*Codec, error)

func (*Codec) Hash

func (c *Codec) Hash(token string) (string, bool)

Hash accepts only the canonical encoding and exact configured namespace.

func (*Codec) Issue

func (c *Codec) Issue() (string, string, error)

Issue returns an unguessable 256-bit token and its storage digest.

type HashInput

type HashInput uint8

HashInput preserves legacy namespaces which hash either the wire token or the underlying random bytes. It is not an authorization policy.

const (
	HashWire HashInput = iota + 1
	HashRaw
)

Directories

Path Synopsis
Package capability contains shared capability storage.
Package capability contains shared capability storage.
Package reservations registers retirement migrations for the former store.
Package reservations registers retirement migrations for the former store.

Jump to

Keyboard shortcuts

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