infohub

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(ctx context.Context, key, namespace, scope string) ([]byte, error)
	Set(ctx context.Context, key, namespace, scope string, value []byte) error
}

type Credentials

type Credentials interface {
	ParsePresentation(vpBytes []byte) (*verifiable.Presentation, error)
}

type Policy

type Policy interface {
	Evaluate(ctx context.Context, policy string, data interface{}, evaluationID string, ttl *int) ([]byte, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(storage Storage, policy Policy, cache Cache, cred Credentials, signer Signer, logger *zap.Logger) *Service

func (*Service) Export

func (s *Service) Export(ctx context.Context, req *infohub.ExportRequest) (interface{}, error)

func (*Service) Import

func (s *Service) Import(ctx context.Context, req *infohub.ImportRequest) (res *infohub.ImportResult, err error)

Import the given data wrapped as Verifiable Presentation into the Cache.

type Signer

type Signer interface {
	CreatePresentation(ctx context.Context, issuer, namespace, key string, data []map[string]interface{}) (map[string]interface{}, error)
	VerifyPresentation(ctx context.Context, vp []byte) error
}

type Storage

type Storage interface {
	ExportConfiguration(ctx context.Context, exportName string) (*storage.ExportConfiguration, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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