metadata

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package metadata provides functions and SQL fragments for working with the "factom_chain" and "fat_chain" metadata tables, which store the sync height, sync DBKeyMR, factom.NetworkID, and factom.Identity.

Index

Constants

View Source
const CreateTableFATChain = `` /* 398-byte string literal not displayed */

CreateTableFATChain is a SQL string that creates the "fat_chain" metadata table.

The "fat_chain" table has a foreign key reference to the "entry" table, which must exist first.

View Source
const CreateTableFactomChain = `` /* 269-byte string literal not displayed */

CreateTableFactomChain is a SQL string that creates the "factom_chain" metadata table.

Variables

This section is empty.

Functions

func AddNumIssued

func AddNumIssued(conn *sqlite.Conn, add uint64) error

func InsertFATChain added in v1.1.0

func InsertFATChain(conn *sqlite.Conn, tokenID string, issuer *factom.Bytes32) error

Insert the TokenID and issuer Chain ID into the first row of the "fat_chain" table. This may only ever be called once for a given database.

func InsertFactomChain added in v1.1.0

func InsertFactomChain(conn *sqlite.Conn,
	networkID factom.NetworkID,
	chainID *factom.Bytes32) error

Insert the syncHeight, syncDBKeyMR, and networkID into the first row of the "factom_chain" table. This may only ever be called once for a given database.

func SelectFATChain added in v1.1.0

func SelectFATChain(conn *sqlite.Conn) (numIssued uint64,
	tokenID string,
	identity factom.Identity,
	issuance fat.Issuance,
	err error)

func SelectFactomChain added in v1.1.0

func SelectFactomChain(conn *sqlite.Conn) (syncHeight uint32,
	syncDBKeyMR factom.Bytes32,
	networkID factom.NetworkID,
	err error)

func SetInitEntryID

func SetInitEntryID(conn *sqlite.Conn, id int64) error

SetInitEntryID updates the "init_entry_id"

func SetSync

func SetSync(conn *sqlite.Conn, height uint32, dbKeyMR *factom.Bytes32) error

SetSync updates the "sync_height" and "sync_db_key_mr".

func UpdateIdentity added in v1.1.0

func UpdateIdentity(conn *sqlite.Conn, identity factom.Identity) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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