cid

package
v0.22.1-0...-a3dd6d7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package cid implements content-ID URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	HashName string
	Domain   string
	Hash     []byte
}

A URL represents a parsed CID URL.

func Parse

func Parse(rawURL string) (*URL, error)

Parse parses a raw url into a URL structure.

The URL may or may not include the cid: scheme, but will fail if the exact structure for CID URLs is not met (or if the scheme is present and is anything other than "cid").

func (*URL) String

func (u *URL) String() string

String reassembles the URL into a valid URL string.

Jump to

Keyboard shortcuts

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