daily-indexer

command module
v0.0.0-...-ace8a2a Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 17 Imported by: 0

README

Description

The Daily Indexer saves all PBFT Blocks, DAG Blocks and Transactions on the Daily chain and exposes an API on top of that data that can be used on the Daily Explorer.

Structure

.
├── api
│   ├── api_handler.go
│   ├── openapi.yaml
│   ├── server.cfg.yaml
│   └── server.gen.go
├── go.mod
├── go.sum
├── internal
│   ├── address
│   │   └── address.go
│   ├── dag
│   │   └── dag.go
│   ├── pbft
│   │   └── pbft.go
│   ├── storage
│   │   └── storage.go
│   └── tx
│       └── tx.go
├── main.go
├── models
│   └── models.gen.go
├── models.cfg.yaml
  1. /api - contains all (http) API specs and routes

openapi.yaml - the OpenAPI definition that is used to generate the models and server boilerplate

api_handler.go - where we implement the endpoints

server.cfg.yaml - the config file for oapi-codegen

server.gen.go - the generated code for the API server

  1. /internal - should contain all most of the code. each dir is a component that can include data models, actions to be called from the api, etc.

  2. /models - stucts used both for the API and storage layers

models.gen.go - the generated code for types used in both the API and storage layers

  1. /models.cfg.yaml - the config file for oapi-codegen

Develop

go generate ./... will regenerate the server.gen.go and models.gen.go files

make lint before each commit

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
internal
Package models provides primitives to interact with the openapi HTTP API.
Package models provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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