Documentation ¶
Index ¶
- Constants
- type DIDDocService
- func (DIDDocService) GetDIDFragment(fragmentId string, didDoc types.DidDoc) types.ContentStreamI
- func (dds DIDDocService) ProcessDIDRequest(did string, fragmentId string, queries url.Values, flag *string, ...) (types.ResolutionResultI, *types.IdentityError)
- func (dds DIDDocService) Resolve(did string, version string, contentType types.ContentType) (*types.DidResolution, *types.IdentityError)
- type LedgerService
- func (ls LedgerService) GetNamespaces() []string
- func (ls LedgerService) QueryCollectionResources(did string) ([]*resource.Metadata, *types.IdentityError)
- func (ls LedgerService) QueryDIDDoc(did string, version string) (*didTypes.DidDocWithMetadata, *types.IdentityError)
- func (ls LedgerService) QueryResource(did string, resourceId string) (*resource.ResourceWithMetadata, *types.IdentityError)
- func (ls *LedgerService) RegisterLedger(method string, endpoint types.Network) error
- type LedgerServiceI
- type RequestService
- type ResourceService
- func (rds ResourceService) DereferenceCollectionResources(did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
- func (rds ResourceService) DereferenceResourceData(resourceId string, did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
- func (rds ResourceService) DereferenceResourceMetadata(resourceId string, did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
Constants ¶
View Source
const (
DELIMITER = ":"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DIDDocService ¶
type DIDDocService struct {
// contains filtered or unexported fields
}
func NewDIDDocService ¶ added in v1.2.0
func NewDIDDocService(didMethod string, ledgerService LedgerServiceI) DIDDocService
func (DIDDocService) GetDIDFragment ¶
func (DIDDocService) GetDIDFragment(fragmentId string, didDoc types.DidDoc) types.ContentStreamI
func (DIDDocService) ProcessDIDRequest ¶ added in v1.2.0
func (dds DIDDocService) ProcessDIDRequest(did string, fragmentId string, queries url.Values, flag *string, contentType types.ContentType) (types.ResolutionResultI, *types.IdentityError)
func (DIDDocService) Resolve ¶ added in v1.2.0
func (dds DIDDocService) Resolve(did string, version string, contentType types.ContentType) (*types.DidResolution, *types.IdentityError)
type LedgerService ¶
type LedgerService struct {
// contains filtered or unexported fields
}
func NewLedgerService ¶
func NewLedgerService() LedgerService
func (LedgerService) GetNamespaces ¶
func (ls LedgerService) GetNamespaces() []string
func (LedgerService) QueryCollectionResources ¶ added in v1.2.0
func (ls LedgerService) QueryCollectionResources(did string) ([]*resource.Metadata, *types.IdentityError)
QueryCollectionResources godoc
@Summary Fetch metadata for all Resources @Description Get metadata for all Resources within a DID Resource Collection @Tags Resource Resolution @Accept application/did+ld+json,application/ld+json,application/did+json @Produce application/did+ld+json,application/ld+json,application/did+json @Param did path string true "Full DID with unique identifier" @Success 200 {object} types.DidDereferencing @Failure 400 {object} types.IdentityError @Failure 404 {object} types.IdentityError @Failure 406 {object} types.IdentityError @Failure 500 {object} types.IdentityError @Router /{did}/resources/all [get]
func (LedgerService) QueryDIDDoc ¶
func (ls LedgerService) QueryDIDDoc(did string, version string) (*didTypes.DidDocWithMetadata, *types.IdentityError)
QueryDIDDoc godoc
@Summary Resolve DID Document on did:cheqd @Description Fetch DID Document ("DIDDoc") from cheqd network @Tags DID Resolution @Accept application/did+ld+json,application/ld+json,application/did+json @Produce application/did+ld+json,application/ld+json,application/did+json @Param did path string true "Full DID with unique identifier" @Param service query string false "Service Type" @Param fragmentId query string false "#Fragment" @Param versionId query string false "Version" @Success 200 {object} types.DidResolution @Failure 400 {object} types.IdentityError @Failure 404 {object} types.IdentityError @Failure 406 {object} types.IdentityError @Failure 500 {object} types.IdentityError @Router /{did} [get]
func (LedgerService) QueryResource ¶
func (ls LedgerService) QueryResource(did string, resourceId string) (*resource.ResourceWithMetadata, *types.IdentityError)
QueryResource godoc
@Summary Fetch specific Resource @Description Get specific Resource within a DID Resource Collection @Tags Resource Resolution @Accept */* @Produce */* @Param did path string true "Full DID with unique identifier" @Param resourceId path string true "Resource-specific unique-identifier" @Success 200 {object} []byte @Failure 400 {object} types.IdentityError @Failure 404 {object} types.IdentityError @Failure 406 {object} types.IdentityError @Failure 500 {object} types.IdentityError @Router /{did}/resources/{resourceId} [get]
func (*LedgerService) RegisterLedger ¶
func (ls *LedgerService) RegisterLedger(method string, endpoint types.Network) error
type LedgerServiceI ¶
type LedgerServiceI interface { QueryDIDDoc(did string, version string) (*didTypes.DidDocWithMetadata, *types.IdentityError) QueryResource(collectionDid string, resourceId string) (*resource.ResourceWithMetadata, *types.IdentityError) QueryCollectionResources(did string) ([]*resource.Metadata, *types.IdentityError) GetNamespaces() []string }
type RequestService ¶
type RequestService struct {
// contains filtered or unexported fields
}
func NewRequestService ¶
func NewRequestService(didMethod string, ledgerService LedgerServiceI) RequestService
func (RequestService) DereferenceCollectionResources ¶ added in v1.2.0
func (rs RequestService) DereferenceCollectionResources(c echo.Context) error
func (RequestService) DereferenceResourceData ¶ added in v1.2.0
func (rs RequestService) DereferenceResourceData(c echo.Context) error
func (RequestService) DereferenceResourceMetadata ¶ added in v1.2.0
func (rs RequestService) DereferenceResourceMetadata(c echo.Context) error
DereferenceResourceMetadata godoc
@Summary Fetch Resource-specific metadata @Description Get metadata for a specific Resource within a DID Resource Collection @Tags Resource Resolution @Accept application/did+ld+json,application/ld+json,application/did+json @Produce application/did+ld+json,application/ld+json,application/did+json @Param did path string true "Full DID with unique identifier" @Param resourceId path string true "Resource-specific unique identifier" @Success 200 {object} types.DidDereferencing @Failure 400 {object} types.IdentityError @Failure 404 {object} types.IdentityError @Failure 406 {object} types.IdentityError @Failure 500 {object} types.IdentityError @Router /{did}/resources/{resourceId}/metadata [get]
func (RequestService) ResolveDIDDoc ¶ added in v1.2.0
func (rs RequestService) ResolveDIDDoc(c echo.Context) error
type ResourceService ¶ added in v1.2.0
type ResourceService struct {
// contains filtered or unexported fields
}
func NewResourceService ¶ added in v1.2.0
func NewResourceService(didMethod string, ledgerService LedgerServiceI) ResourceService
func (ResourceService) DereferenceCollectionResources ¶ added in v1.2.0
func (rds ResourceService) DereferenceCollectionResources(did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
func (ResourceService) DereferenceResourceData ¶ added in v1.2.0
func (rds ResourceService) DereferenceResourceData(resourceId string, did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
func (ResourceService) DereferenceResourceMetadata ¶ added in v1.2.0
func (rds ResourceService) DereferenceResourceMetadata(resourceId string, did string, contentType types.ContentType) (*types.DidDereferencing, *types.IdentityError)
Click to show internal directories.
Click to hide internal directories.