uri

package
v0.0.0-...-c0ffc74 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package uri handles the Telehash URI format.

Reference

See: https://github.com/telehash/telehash.org/blob/master/v3/uri.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(uri *URI) (*e3x.Identity, error)

Resolve resolves a URI into an Identity.

func WellKnown

func WellKnown(e *e3x.Endpoint) http.Handler

WellKnown returns an http.Handler which will serve the /.well-known/mesh.json document for Endpoint.

Types

type InvalidURIError

type InvalidURIError string

InvalidURIError is returned when Parse has invalid input

func (InvalidURIError) Error

func (e InvalidURIError) Error() string

type URI

type URI struct {
	Protocol  string
	User      string
	Canonical string
	Session   string
	Token     string
}

URI represents a Telehash URI. It can be resolved to an Identity.

func Parse

func Parse(rawstr string) (*URI, error)

Parse parses a Telehash URI.

func (*URI) String

func (uri *URI) String() string

Jump to

Keyboard shortcuts

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