github.com/BlockABC/godash@v0.0.0-20191112120524-f4aa3a32c566/database/ffldb/README.md (about)

     1  ffldb
     2  =====
     3  
     4  [![Build Status](https://travis-ci.org/dashpay/godash.png?branch=master)]
     5  (https://travis-ci.org/dashpay/godash)
     6  
     7  Package ffldb implements a driver for the database package that uses leveldb for
     8  the backing metadata and flat files for block storage.
     9  
    10  This driver is the recommended driver for use with btcd.  It makes use leveldb
    11  for the metadata, flat files for block storage, and checksums in key areas to
    12  ensure data integrity.
    13  
    14  Package ffldb is licensed under the copyfree ISC license.
    15  
    16  ## Usage
    17  
    18  This package is a driver to the database package and provides the database type
    19  of "ffldb".  The parameters the Open and Create functions take are the
    20  database path as a string and the block network.
    21  
    22  ```Go
    23  db, err := database.Open("ffldb", "path/to/database", wire.MainNet)
    24  if err != nil {
    25  	// Handle error
    26  }
    27  ```
    28  
    29  ```Go
    30  db, err := database.Create("ffldb", "path/to/database", wire.MainNet)
    31  if err != nil {
    32  	// Handle error
    33  }
    34  ```
    35  
    36  ## Documentation
    37  
    38  [![GoDoc](https://godoc.org/github.com/dashpay/godash/database/ffldb?status.png)]
    39  (http://godoc.org/github.com/dashpay/godash/database/ffldb)
    40  
    41  Full `go doc` style documentation for the project can be viewed online without
    42  installing this package by using the GoDoc site here:
    43  http://godoc.org/github.com/dashpay/godash/database/ffldb
    44  
    45  You can also view the documentation locally once the package is installed with
    46  the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to
    47  http://localhost:6060/pkg/github.com/dashpay/godash/database/ffldb
    48  
    49  ## License
    50  
    51  Package ffldb is licensed under the [copyfree](http://copyfree.org) ISC
    52  License.