server

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClaimHandler added in v1.0.0

func GetClaimHandler(service types.Getter) http.HandlerFunc

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

func GetClaimsHandler added in v1.0.0

func GetClaimsHandler(service types.Querier) http.HandlerFunc

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

func GetRootHandler added in v1.0.0

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

NewServer creates a new indexing service HTTP server.

func PostClaimsHandler added in v1.0.0

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 Option

type Option func(*config)

func WithContentClaimsOptions added in v1.0.0

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

func WithIdentity

func WithIdentity(s principal.Signer) Option

WithIdentity specifies the server DID.

Jump to

Keyboard shortcuts

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