From 10d981974cf59f4e408e481de8c28b8a1ead3f69 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 31 May 2013 15:19:34 -0500 Subject: [PATCH] Add documentation for functions and types. --- db.go | 6 ++++++ log.go | 1 + 2 files changed, 7 insertions(+) diff --git a/db.go b/db.go index e6ef8e87..13c369aa 100644 --- a/db.go +++ b/db.go @@ -133,6 +133,8 @@ type Db interface { Sync() } +// BlockIterator defines a generic interface for an iterator through the block +// chain. type BlockIterator interface { // Close shuts down the iterator when done walking blocks in the database. Close() @@ -144,12 +146,16 @@ type BlockIterator interface { Row() (key *btcwire.ShaHash, pver uint32, buf []byte, err error) } +// DriverDB defines a structure for backend drivers to use when they registered +// themselves as a backend which implements the Db interface. type DriverDB struct { DbType string Create func(argstr string) (pbdb Db, err error) Open func(filepath string) (pbdb Db, err error) } +// TxListReply is used to return individual transaction information when +// data about multiple transactions is requested in a single call. type TxListReply struct { Sha *btcwire.ShaHash Tx *btcwire.MsgTx diff --git a/log.go b/log.go index 7701a92e..667e0bcb 100644 --- a/log.go +++ b/log.go @@ -51,6 +51,7 @@ func SetLogWriter(w io.Writer) error { return nil } +// GetLog returns the currently active logger. func GetLog() seelog.LoggerInterface { return log }