plugin

package
v0.30.75 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package plugin is an interface package for ledger addons.

Index

Constants

This section is empty.

Variables

View Source
var (
	TxDID     = TxInfo{TxType: TxTypeDID}
	TxSchema  = TxInfo{TxType: TxTypeSchema}
	TxCredDef = TxInfo{TxType: TxTypeCredDef}

	ErrNotExist = errors.New("Ledger element doesn't exist")
)

Functions

This section is empty.

Types

type Ledger

type Ledger interface {
	Plugin
	Mapper
}

Ledger is a plugin interface used to offer implementations of addon ledgers. See pool package for more information.

type Mapper

type Mapper interface {
	Write(tx TxInfo, ID, data string) error

	// Read follows ErrNotExist semantics
	Read(tx TxInfo, ID string) (string, string, error)
}

Mapper is an property getter/setter interface for addon ledger implementations.

type Plugin

type Plugin interface {
	Open(name ...string) bool
	Close()
}

Plugin is a plugin interface for addon ledger implementations.

type TxInfo added in v0.3.5

type TxInfo struct {
	TxType

	Wallet       int
	SubmitterDID string
	VerKey       string
	Alias        string
	Role         string

	Update bool
}

func (TxInfo) String added in v0.3.5

func (ti TxInfo) String() string

type TxType added in v0.3.5

type TxType int
const (
	TxTypeDID TxType = iota
	TxTypeSchema
	TxTypeCredDef
)

func (TxType) String added in v0.3.5

func (t TxType) String() string

Jump to

Keyboard shortcuts

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