Documentation
¶
Index ¶
- func GetClaimHandler(service types.Getter) http.HandlerFunc
- func GetClaimsHandler(service types.Querier) http.HandlerFunc
- func GetDIDDocument(id principal.Signer) http.HandlerFunc
- func GetIPNICIDHandler(service types.Querier, config *ipniConfig) http.HandlerFunc
- func GetRootHandler(id principal.Signer) http.HandlerFunc
- func ListenAndServe(addr string, indexer types.Service, opts ...Option) error
- func NewServer(indexer types.Service, opts ...Option) (*http.ServeMux, error)
- func PostAdHandler(sk crypto.PrivKey, store store.PublisherStore) http.HandlerFunc
- func PostClaimsHandler(id principal.Signer, service types.Publisher, options ...server.Option) http.HandlerFunc
- type Document
- type Option
- type VerificationMethod
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 ¶
ListenAndServe creates a new indexing service HTTP server, and starts it up.
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 WithIPNIPublisherStore ¶ added in v0.10.4
func WithIPNIPublisherStore(store store.PublisherStore) Option
func WithIdentity ¶
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.