addons

package
v0.30.72 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Package addons includes ledger addons.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indy added in v0.3.5

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

Indy is a ledger addon which implements real Indy ledger pool client. The machine which uses it must have indy pool named FINDY_LEDGER. Also it's important that memory or file ledger is used same time because both writing and reading to addon is done asynchronously.

func (*Indy) Close added in v0.3.5

func (ao *Indy) Close()

func (*Indy) Open added in v0.3.5

func (ao *Indy) Open(name ...string) (ok bool)

func (*Indy) Read added in v0.3.5

func (ao *Indy) Read(tx plugin.TxInfo, ID string) (name string, value string, err error)

func (*Indy) ReadCredDef added in v0.3.5

func (ao *Indy) ReadCredDef(
	tx plugin.TxInfo,
	credDefID string,
) (name string, value string, err error)

func (*Indy) ReadSchema added in v0.3.5

func (ao *Indy) ReadSchema(
	tx plugin.TxInfo,
	ID string,
) (name string, value string, err error)

func (*Indy) Write added in v0.3.5

func (ao *Indy) Write(tx plugin.TxInfo, ID, data string) error

func (*Indy) WriteCredDef added in v0.3.5

func (ao *Indy) WriteCredDef(
	tx plugin.TxInfo,
	_ string,
	data string,
) (err error)

func (*Indy) WriteDID added in v0.3.5

func (ao *Indy) WriteDID(
	tx plugin.TxInfo,
	_ string,
	data string,
) (err error)

func (*Indy) WriteSchema added in v0.3.5

func (ao *Indy) WriteSchema(
	tx plugin.TxInfo,
	_ string,
	data string,
) (err error)

type Mem

type Mem struct {
	Mem struct {
		sync.Mutex
		Ory map[string]string
	}

	// Seq is seqNo in real Indy ledger, by this we get correct behaviour
	Seq struct {
		sync.Mutex
		No uint
	}
	// contains filtered or unexported fields
}

Mem is a ledger addon which implements transient ledger. It writes ledger data to memory and reads it from there. It's convenient for unit test and some development cases.

func (*Mem) Close

func (m *Mem) Close()

func (*Mem) IncSeqNo added in v0.3.5

func (m *Mem) IncSeqNo()

func (*Mem) Open

func (m *Mem) Open(name ...string) bool

func (*Mem) Read

func (m *Mem) Read(
	tx plugin.TxInfo,
	ID string,
) (
	name string,
	value string,
	err error,
)

Read reads ID specific data from memory ledger. If data doesn't exist plugin.ErrNotExist error value is returned.

func (*Mem) SeqNo added in v0.3.5

func (m *Mem) SeqNo() uint

func (*Mem) Write

func (m *Mem) Write(ti plugin.TxInfo, ID, data string) error

Jump to

Keyboard shortcuts

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