uniresolver

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Type   string `json:"type,omitempty"`
	Title  string `json:"title"`
	Status int    `json:"status"`
	Detail string `json:"detail"`
}

ErrorResponse represents the JSON object to return when an error happens, according to https://api-pilot.ebsi.eu/docs/apis/did-registry/latest#/schemas/ProblemDetails

type Uniresolver

type Uniresolver struct {
	// The location of the Geth node
	NodeURL string `json:"nodeurl,omitempty"`
	// contains filtered or unexported fields
}

Uniresolver implements an HTTP handler that resolves DIDs using a SmartContract deployed in Alastria RedT. It implements the EBSI 'Get a DID Document' API at https://api-pilot.ebsi.eu/docs/apis/did-registry/latest#/operations/get-did-registry-v3-identifier

func (Uniresolver) CaddyModule

func (Uniresolver) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Uniresolver) Cleanup

func (m *Uniresolver) Cleanup() error

Cleanup cleans up the handler.

func (*Uniresolver) Provision

func (m *Uniresolver) Provision(ctx caddy.Context) (err error)

Provision implements caddy.Provisioner

func (Uniresolver) ServeHTTP

func (m Uniresolver) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

ServeHTTP implements caddyhttp.MiddlewareHandler.

func (Uniresolver) UniversalResolver

func (m Uniresolver) UniversalResolver(w http.ResponseWriter, r *http.Request) error

UniversalResolver uses the Alastria RedT network to resolve a DID

func (*Uniresolver) UnmarshalCaddyfile

func (m *Uniresolver) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile implements caddyfile.Unmarshaler.

func (*Uniresolver) Validate

func (m *Uniresolver) Validate() error

Validate implements caddy.Validator.

Jump to

Keyboard shortcuts

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