mock

package
v0.0.0-...-4e1960a Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	sync.Once

	Resolver         Namesys
	ResolverFailures NamesysErrors
	// contains filtered or unexported fields
}

API implementation of an API backing a gateway.

func (*API) FetcherForSession

func (m *API) FetcherForSession(*ipld.LinkSystem) fetcher.Fetcher

FetcherForSession requests

func (*API) NewSession

func (m *API) NewSession(context.Context) *ipld.LinkSystem

NewSession requests a link system that can be used for the duration of a given request context. The link system returned should be consistent for the life of the context - CIDs which have at some point been accessible to the link system at some point during the session are expected to continue to be available for the duration of the session.

func (*API) Resolve

func (m *API) Resolve(_ context.Context, name string) (string, error)

Resolve ipns names

type Namesys

type Namesys map[string]string

Namesys allows for explicit name resolutions

type NamesysErrors

type NamesysErrors map[string]error

NamesysErrors allows for explicit name resolution failures

Jump to

Keyboard shortcuts

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