api

package
v0.0.0-...-3c5d65d Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PageSize = 20
)

Pagination params

Variables

View Source
var (
	// Cache cache
	Cache store.Cache
)

Functions

func BlockFile

func BlockFile(c *gin.Context)

BlockFile translate block data in file

func BlockRaw

func BlockRaw(c *gin.Context)

BlockRaw translate block data in base64 format

func CollectRouter

func CollectRouter(mode, static string) *gin.Engine

CollectRouter return gin router

func LedgerBlocks

func LedgerBlocks(c *gin.Context)

LedgerBlocks get blocks by pagination

func LedgerFile

func LedgerFile(c *gin.Context)

LedgerFile retrive ledger file into blocks

Types

type Ledger

type Ledger struct {
	Pagination bool          `json:"pagination" db:"pagination"`
	Key        string        `json:"key,omitempty" db:"key"`
	Blocks     []*block.Desc `json:"blocks" db:"blocks"`
	CurPage    int           `json:"cur_page" db:"cur_page"`
	Total      int           `json:"total" db:"total"`
}

Ledger ledger data

Jump to

Keyboard shortcuts

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