zcapld

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

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

func (s *Service) CreateDIDKey(ctx context.Context) (string, error)

CreateDIDKey create did key.

func (*Service) Crypto

func (s *Service) Crypto() cryptoapi.Crypto

Crypto returns the cryptoapi.Crypto.

func (*Service) KMS

func (s *Service) KMS() kms.KeyManager

KMS returns the kms.KeyManager.

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.

func (*Service) Resolve

func (s *Service) Resolve(uri string) (*zcapld.Capability, error)

Resolve the capability.

func (*Service) SignHeader

func (s *Service) SignHeader(req *http.Request, capabilityBytes []byte) (*http.Header, error)

SignHeader sign header.

Jump to

Keyboard shortcuts

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