Skip to content

1. Project layout

Adam S Levy edited this page Oct 22, 2019 · 2 revisions

The daemon is laid out with the following directory structure:

fatd/            [fatd package main]
├── api/      [types, methods, and client for querying the JSON RPC API]
├── cli/       [fat-cli package main]
├── fat/      [base FAT types and signature validation]
├── fat0/         [FAT0 types and data validation]
├── fat1/         [FAT1 types and data validation]
├── fat103/  [FAT103 signing and validation functions]
└── internal/
    ├── db/                                [high level database functions]
    │   ├── addresses/              [functions for addresses table]
    │   ├── eblocks/              [functions for eblocks table]
    │   ├── entries/              [functions for entries table]
    │   ├── metadata/              [functions for metadata table]
    │   ├── nftokens/             [functions for nf_tokens table]
    │   ├── sqlbuilder/           [tool for building dynamic queries]
    │   └── test-fatd.db/        [test databases for validation of package db]
    ├── engine/        [goroutine that scans for new FAT chain entries and updates databases]
    ├── flag/             [contains all flags globally]
    ├── jsonlen/      [efficiently compute the len of the json encoding for various types]
    ├── log/              [simple wrapper for an external logger library]
    └── srv/              [jsonrpc server and methods, runs concurrently with engine]
Clone this wiki locally