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 ¶
func GetClaimHandler(service types.Getter) http.HandlerFunc
GetClaimHandler retrieves a single content claim by it's root CID.
func GetClaimsHandler ¶
func GetClaimsHandler(service types.Querier) http.HandlerFunc
GetClaimsHandler retrieves content claims when a GET request is sent to "/claims?multihash={multihash}".
func GetDIDDocument ¶
func GetDIDDocument(id principal.Signer) http.HandlerFunc
GetDIDDocument returns the DID document for did:web resolution.
func GetIPNICIDHandler ¶
func GetIPNICIDHandler(service types.Querier, config *ipniConfig) http.HandlerFunc
func GetRootHandler ¶
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 ¶
func PostAdHandler(sk crypto.PrivKey, store store.PublisherStore) http.HandlerFunc
func PostClaimsHandler ¶
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 ¶
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 WithIPNIPublisherStore ¶
func WithIPNIPublisherStore(store store.PublisherStore) Option
func WithIdentity ¶
WithIdentity specifies the server DID.
func WithTelemetry ¶
func WithTelemetry() Option
type VerificationMethod ¶
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.