transactions

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Create() Builder
	WithTransactions(list []Transaction) Builder
	IsAtomic() Builder
	Now() (Transactions, error)
}

Builder represents a transaction builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type Repository

type Repository interface {
	Retrieve(chain *uuid.UUID, link hash.Hash, hash hash.Hash) (Transaction, error)
	RetrieveList(chain *uuid.UUID, link hash.Hash) (Transactions, error)
}

Repository represents a transaction repository

type Service

type Service interface {
	Save(trx Transaction) error
	SaveAll(atomicTrx Transactions) error
}

Service represents a transaction service

type Transaction

type Transaction interface {
	Hash() hash.Hash
	Body() bodies.Body
	Signature() signature.RingSignature
}

Transaction represents a transaction

type TransactionBuilder

type TransactionBuilder interface {
	Create() TransactionBuilder
	WithBody(body bodies.Body) TransactionBuilder
	WithSignature(sig signature.RingSignature) TransactionBuilder
	Now() (Transaction, error)
}

TransactionBuilder represents a transaction builder

func NewTransactionBuilder

func NewTransactionBuilder() TransactionBuilder

NewTransactionBuilder creates a new transaction builder

type TransactionProcessor

type TransactionProcessor interface {
	Execute(trx Transaction) ([]structures.Structure, error)
}

TransactionProcessor represents a transaction processor

type Transactions

type Transactions interface {
	Hash() hash.Hash
	All() []Transaction
	IsAtomic() bool
}

Transactions represents transactions

Jump to

Keyboard shortcuts

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