server

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0, MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaimHandler added in v0.10.4

func GetClaimHandler(service types.Getter) http.HandlerFunc

GetClaimHandler retrieves a single content claim by it's root CID.

func GetClaimsHandler added in v0.10.4

func GetClaimsHandler(service types.Querier) http.HandlerFunc

GetClaimsHandler retrieves content claims when a GET request is sent to "/claims?multihash={multihash}".

func GetDIDDocument added in v0.10.4

func GetDIDDocument(id principal.Signer) http.HandlerFunc

GetDIDDocument returns the DID document for did:web resolution.

func GetIPNICIDHandler added in v0.10.4

func GetIPNICIDHandler(service types.Querier, config *ipniConfig) http.HandlerFunc

func GetRootHandler added in v0.10.4

func GetRootHandler(id principal.Signer) http.HandlerFunc

GetRootHandler displays version info when a GET request is sent to "/".

func ListenAndServe

func ListenAndServe(addr string, indexer types.Service, opts ...Option) error

ListenAndServe creates a new indexing service HTTP server, and starts it up.

func NewServer

func NewServer(indexer types.Service, opts ...Option) (*http.ServeMux, error)

NewServer creates a new indexing service HTTP server.

func PostAdHandler added in v0.10.4

func PostAdHandler(sk crypto.PrivKey, store store.PublisherStore) http.HandlerFunc

func PostClaimsHandler added in v0.10.4

func PostClaimsHandler(id principal.Signer, service types.Publisher, options ...server.Option) http.HandlerFunc

PostClaimsHandler invokes the ucanto service when a POST request is sent to "/claims".

Types

type Document added in v0.10.4

type Document struct {
	Context            []string             `json:"@context"` // https://w3id.org/did/v1
	ID                 string               `json:"id"`
	Controller         []string             `json:"controller,omitempty"`
	VerificationMethod []VerificationMethod `json:"verificationMethod,omitempty"`
	Authentication     []string             `json:"authentication,omitempty"`
	AssertionMethod    []string             `json:"assertionMethod,omitempty"`
}

Document is a did document that describes a did subject. See https://www.w3.org/TR/did-core/#dfn-did-documents.

type Option

type Option func(*config) error

func WithContentClaimsOptions added in v0.10.4

func WithContentClaimsOptions(options ...server.Option) Option

func WithIPNI added in v0.10.4

func WithIPNI(provider peer.AddrInfo, metadata metadata.Metadata) Option

func WithIPNIPublisherStore added in v0.10.4

func WithIPNIPublisherStore(store store.PublisherStore) Option

func WithIdentity

func WithIdentity(s principal.Signer) Option

WithIdentity specifies the server DID.

func WithTelemetry added in v0.10.4

func WithTelemetry() Option

type VerificationMethod added in v0.10.4

type VerificationMethod struct {
	ID                 string `json:"id,omitempty"`
	Type               string `json:"type,omitempty"`
	Controller         string `json:"controller,omitempty"`
	PublicKeyMultibase string `json:"publicKeyMultibase,omitempty"`
}

VerificationMethod describes how to authenticate or authorize interactions with a did subject. See https://www.w3.org/TR/did-core/#dfn-verification-method.

Jump to

Keyboard shortcuts

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