registrationurl

package
v0.0.0-...-3107470 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package registrationurl validates the exact URLs that may be retained by browser-registration authoring and execution contracts.

Index

Constants

View Source
const (
	MaxURLBytes        = 4096
	MaxQueryBytes      = 1024
	MaxQueryItems      = 16
	MaxQueryKeyBytes   = 64
	MaxQueryValueBytes = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Facts

type Facts struct {
	URL    string
	Origin string
	Path   string
}

Facts is the canonical URL plus the only facts safe for observation output. Query is deliberately absent.

func Parse

func Parse(raw string, allowQuery bool, canonicalOrigin func(string) (string, error)) (Facts, error)

Parse accepts one canonical absolute, fragment-free URL. When allowQuery is false it preserves the v1 query rejection. When true it admits only a bounded canonical literal query with unique nonempty safe keys and values. Errors never include rejected URL material.

Jump to

Keyboard shortcuts

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