transaction

package
v0.0.0-...-7e89744 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Get(hash string) (interface{}, error)
	Put(val interface{}) (string, error)
	GetData(hash string) (uint64, []byte, error)
	PutData(typ uint64, data []byte) (string, error)
	Resolve(addr string) (string, error)
	Publish(addr, path string) error
	KeyGen() (string, error)
	KeyList() ([]string, error)
}

type Object

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

func (*Object) Append

func (o *Object) Append() *Object

func (*Object) Bool

func (o *Object) Bool() bool

func (*Object) Bytes

func (o *Object) Bytes() []byte

func (*Object) Cid

func (o *Object) Cid() *cid.Cid

func (*Object) Class

func (o *Object) Class() *Object

func (*Object) Delete

func (o *Object) Delete() error

func (*Object) Each

func (o *Object) Each(callback func(interface{}, *Object) error) error

func (*Object) EachSimple

func (o *Object) EachSimple(callback func(*Object, *Object) error) error

func (*Object) Get

func (o *Object) Get(key interface{}) *Object

func (*Object) Int

func (o *Object) Int() int

func (*Object) Int64

func (o *Object) Int64() int64

func (*Object) Len

func (o *Object) Len() int

func (*Object) Set

func (o *Object) Set(value interface{}) error

func (*Object) String

func (o *Object) String() string

func (*Object) Type

func (o *Object) Type() pathing.Type

func (*Object) Uint64

func (o *Object) Uint64() uint64

type Signer

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

func NewSigner

func NewSigner(ctx context.Context,
	db Database, addr string) (*Signer, error)

func (*Signer) Address

func (s *Signer) Address() string

func (*Signer) Commit

func (s *Signer) Commit(addr string) error

func (*Signer) Hash

func (s *Signer) Hash() string

func (*Signer) Root

func (s *Signer) Root() *Object

type Transaction

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

func New

func New(ctx context.Context, db Database, hash string) *Transaction

func (*Transaction) Hash

func (tx *Transaction) Hash() string

func (*Transaction) Root

func (tx *Transaction) Root() *Object

Jump to

Keyboard shortcuts

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