protect

package
v0.0.0-...-7b7c10a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StoreProvider storage.Provider
	VaultClient   vaultClient
	VDR           vdrRegistry
	VCIssuer      vcIssuer
}

Config defines dependencies for Service.

type ProtectedData

type ProtectedData struct {
	DID      string `json:"did"`
	VCDocID  string `json:"vc_doc_id,omitempty"`
	PolicyID string `json:"policy_id,omitempty"`
}

ProtectedData defines the model for protected data.

type Service

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

Service is a service for converting sensitive data into DID.

func NewService

func NewService(config *Config) (*Service, error)

NewService returns a new instance of Service.

func (*Service) Get

func (s *Service) Get(_ context.Context, targetDID string) (*ProtectedData, error)

Get gets protected data for target DID.

func (*Service) Protect

func (s *Service) Protect(ctx context.Context, target, policyID string) (*ProtectedData, error)

Protect converts sensitive data into DID.

Jump to

Keyboard shortcuts

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