Documentation ¶
Index ¶
- func CompressZCAP(zcap *zcapld.Capability) ([]byte, error)
- type Service
- func (s *Service) CreateDIDKey(ctx context.Context) (string, error)
- func (s *Service) Crypto() cryptoapi.Crypto
- func (s *Service) KMS() kms.KeyManager
- func (s *Service) NewCapability(ctx context.Context, options ...zcapld.CapabilityOption) (*zcapld.Capability, error)
- func (s *Service) Resolve(uri string) (*zcapld.Capability, error)
- func (s *Service) SignHeader(req *http.Request, capabilityBytes []byte) (*http.Header, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressZCAP ¶
func CompressZCAP(zcap *zcapld.Capability) ([]byte, error)
CompressZCAP gzips the zcap, then base64URL-encodes it.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service to provide zcapld functionality.
func New ¶
func New(keyManager kms.KeyManager, crypto cryptoapi.Crypto, sp storage.Provider, jsonLDLoader ld.DocumentLoader) (*Service, error)
New return zcap service.
func (*Service) CreateDIDKey ¶
CreateDIDKey create did key.
func (*Service) NewCapability ¶
func (s *Service) NewCapability(ctx context.Context, options ...zcapld.CapabilityOption) (*zcapld.Capability, error)
NewCapability creates a new capability and puts it in storage.
Click to show internal directories.
Click to hide internal directories.