interactive

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificationClient

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

CertificationClient scans the vault for tokens not yet certified and asks the certification.

func NewCertificationClient

func NewCertificationClient(
	ctx context.Context,
	channel string,
	namespace string,
	v Vault,
	qe QueryEngine,
	cm CertificationStorage,
	fm ViewManager,
	certifiers []view2.Identity,
) *CertificationClient

func (*CertificationClient) IsCertified

func (d *CertificationClient) IsCertified(id *token.ID) bool

func (*CertificationClient) RequestCertification

func (d *CertificationClient) RequestCertification(ids ...*token.ID) error

func (*CertificationClient) Scan

func (d *CertificationClient) Scan()

func (*CertificationClient) Start

func (d *CertificationClient) Start() error

type CertificationRequest

type CertificationRequest struct {
	Network, Channel, Namespace string
	IDs                         []*token.ID
	Request                     []byte
}

func (*CertificationRequest) String

func (cr *CertificationRequest) String() string

type CertificationRequestView

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

func NewCertificationRequestView

func NewCertificationRequestView(channel, ns string, certifier view.Identity, ids ...*token.ID) *CertificationRequestView

func (*CertificationRequestView) Call

func (i *CertificationRequestView) Call(context view.Context) (interface{}, error)

type CertificationService

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

func NewCertificationService

func NewCertificationService(sp view2.ServiceProvider) *CertificationService

func (*CertificationService) Call

func (c *CertificationService) Call(context view.Context) (interface{}, error)

func (*CertificationService) SetWallet

func (c *CertificationService) SetWallet(network string, channel string, namespace string, wallet string)

func (*CertificationService) Start

func (c *CertificationService) Start() error

type CertificationStorage

type CertificationStorage interface {
	Exists(id *token.ID) bool
	Store(certifications map[*token.ID][]byte) error
}

type ConfigService

type ConfigService interface {
	GetStringSlice(key string) []string
}

type Driver

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

func NewDriver

func NewDriver() *Driver

func (*Driver) NewCertificationClient

func (d *Driver) NewCertificationClient(sp view2.ServiceProvider, networkID, channel, namespace string) (driver.CertificationClient, error)

func (*Driver) NewCertificationService

func (d *Driver) NewCertificationService(sp view2.ServiceProvider, network, channel, namespace, wallet string) (driver.CertificationService, error)

type QueryEngine

type QueryEngine interface {
	UnspentTokensIterator() (network.UnspentTokensIterator, error)
}

type Resolver

type Resolver interface {
	ResolveIdentities(endpoints ...string) []view.Identity
}

type Vault

type Vault interface {
	GetLastTxID() (string, error)
}

type ViewManager

type ViewManager interface {
	InitiateView(view view.View) (interface{}, error)
}

Jump to

Keyboard shortcuts

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