repositories

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Block() Block
	MinedBlock() MinedBlock
	Link() Link
	MinedLink() MinedLink
	Chain() Chain
}

Application represents a remote application

func NewApplication

func NewApplication(
	block Block,
	minedBlock MinedBlock,
	link Link,
	minedLink MinedLink,
	chain Chain,
) Application

NewApplication creates a new application instance

type Block

type Block interface {
	List() ([]hash.Hash, error)
	Retrieve(hash hash.Hash) (blocks.Block, error)
}

Block represents a block application

type Chain

type Chain interface {
	List() ([]*uuid.UUID, error)
	Retrieve(id *uuid.UUID) (chains.Chain, error)
}

Chain represents a chain application

type Link interface {
	List() ([]hash.Hash, error)
	Retrieve(hash hash.Hash) (links.Link, error)
}

Link represents the link application

type MinedBlock

type MinedBlock interface {
	List() ([]hash.Hash, error)
	Retrieve(hash hash.Hash) (mined_block.Block, error)
}

MinedBlock represents the mined block application

type MinedLink interface {
	List() ([]hash.Hash, error)
	Head() (mined_link.Link, error)
	Retrieve(hash hash.Hash) (mined_link.Link, error)
}

MinedLink represents the mined link application

type RemoteBuilder

type RemoteBuilder interface {
	Create() RemoteBuilder
	WithPeer(peer peers.Peer) RemoteBuilder
	Now() (Application, error)
}

RemoteBuilder represents a remote application builder

Jump to

Keyboard shortcuts

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