file

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileNotBlock = errors.New("文件同步中")

Functions

func InitRouter

func InitRouter(router gin.IRouter, dbread *rpcutils.DBRead, cfg *proto.ConfigNew)

InitRouter 初始化proofrpc接口的router路由表

Types

type File

type File struct {
	*rpcutils.DBRead
	// contains filtered or unexported fields
}

File handler

func (*File) CleanCache

func (f *File) CleanCache(c *gin.Context)

CleanCache 清理文件缓存 @Summary 清理文件缓存 @Description clean file cache @Tags File @Produce json @Success 200 {string} string "ok" @Failure 500 {string} string @Router /v1/file-clean-cache [get]

func (*File) GetFile

func (f *File) GetFile(c *gin.Context)

GetFile 获取上链文件 @Summary 获取上链文件 @Description get file @Tags File @Produce json @Param hash query string true "文件哈希" @Param name path string true "文件名称" @Success 200 {array} byte @Failure 500 {string} string @Router /v1/file/{hash} [get]

func (*File) NewChainGRPCConnect

func (f *File) NewChainGRPCConnect() (types.Chain33Client, error)

func (*File) NewESShortConnect

func (f *File) NewESShortConnect() (escli.ESClient, error)

func (*File) ServerFile

func (f *File) ServerFile(c *gin.Context, file *fdb.File, name string)

Jump to

Keyboard shortcuts

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