Documentation ¶
Index ¶
Constants ¶
const ( // WebFingerEndpoint is the endpoint for WebFinger calls. WebFingerEndpoint = "/.well-known/webfinger" // HostMetaJSONEndpoint is the endpoint for getting the host-meta document. HostMetaJSONEndpoint = "/.well-known/host-meta.json" // ActivityJSONType represents a link type that points to an ActivityPub endpoint. ActivityJSONType = "application/activity+json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorInfo ¶
AnchorInfo contains information about an anchor credential.
type AnchorInfoRetriever ¶
type AnchorInfoRetriever struct {
// contains filtered or unexported fields
}
AnchorInfoRetriever retrieves anchor information about a DID.
func NewAnchorInfoRetriever ¶
func NewAnchorInfoRetriever(r *registry.Registry) *AnchorInfoRetriever
NewAnchorInfoRetriever returns a new AnchorInfoRetriever.
func (*AnchorInfoRetriever) GetAnchorInfo ¶
func (r *AnchorInfoRetriever) GetAnchorInfo(did string) (*AnchorInfo, error)
GetAnchorInfo returns anchor information about the given DID.
type Config ¶
type Config struct { PubKeys []PublicKey HTTPSignPubKeys []PublicKey VerificationMethodType string ResolutionPath string OperationPath string WebCASPath string DiscoveryDomains []string DiscoveryMinimumResolvers int ServiceID *url.URL ServiceEndpointURL *url.URL }
Config defines configuration for discovery operations.
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"errMessage,omitempty"`
}
ErrorResponse to send error message in the response.
type JRD ¶
type JRD struct { Subject string `json:"subject,omitempty"` Properties map[string]interface{} `json:"properties,omitempty"` Links []Link `json:"links,omitempty"` }
JRD is a JSON Resource Descriptor as defined in https://datatracker.ietf.org/doc/html/rfc6415#appendix-A and https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.
type Link ¶
type Link struct { Rel string `json:"rel,omitempty"` Type string `json:"type,omitempty"` Href string `json:"href,omitempty"` Template string `json:"template,omitempty"` }
Link is a link in a JRD. Note that while the host-meta and WebFinger endpoints both use this, only host-meta supports the Template field.
type Operation ¶
type Operation struct {
// contains filtered or unexported fields
}
Operation defines handlers for discovery operations.
func (*Operation) GetRESTHandlers ¶
func (o *Operation) GetRESTHandlers() []common.HTTPHandler
GetRESTHandlers get all controller API handler available for this service.
type Providers ¶
type Providers struct { ResourceRegistry *registry.Registry CAS cas AnchorLinkStore anchorLinkStore WebfingerClient webfingerClient LogEndpointRetriever logEndpointRetriever WebResolver webResolver }
Providers defines the providers for discovery operations.
type WellKnownResponse ¶
type WellKnownResponse struct { ResolutionEndpoint string `json:"resolutionEndpoint,omitempty"` OperationEndpoint string `json:"operationEndpoint,omitempty"` }
WellKnownResponse well known response.