services

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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, contentType types.ContentType) (*types.DidResolution, *types.IdentityError)

https://w3c-ccg.github.io/did-resolution/#resolving

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.ResourceHeader, *types.IdentityError)

func (LedgerService) QueryDIDDoc

func (ls LedgerService) QueryDIDDoc(did string) (*cheqd.Did, *cheqd.Metadata, *types.IdentityError)

func (LedgerService) QueryResource

func (ls LedgerService) QueryResource(did string, resourceId string) (*resource.Resource, *types.IdentityError)

func (*LedgerService) RegisterLedger

func (ls *LedgerService) RegisterLedger(method string, endpoint types.Network) error

type LedgerServiceI

type LedgerServiceI interface {
	QueryDIDDoc(did string) (*cheqd.Did, *cheqd.Metadata, *types.IdentityError)
	QueryResource(collectionDid string, resourceId string) (*resource.Resource, *types.IdentityError)
	QueryCollectionResources(did string) ([]*resource.ResourceHeader, *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

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)

Jump to

Keyboard shortcuts

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