Documentation ¶
Index ¶
- Variables
- func OpenapiV1AuthRegisterPost(c *gin.Context)
- func OpenapiV1AuthTokenGet(c *gin.Context)
- func OpenapiV1AuthTokenPost(c *gin.Context)
- func OpenapiV1BestStateGet(c *gin.Context)
- func OpenapiV1EventOrphanGet(c *gin.Context)
- func OpenapiV1Index(c *gin.Context)
- func OpenapiV1PeerGet(c *gin.Context)
- func OpenapiV1RevisionGet(c *gin.Context)
- func OpenapiV1SnapshotGet(c *gin.Context)
- func OpenapiV1TimelineGet(c *gin.Context)
- func QueryBestStateBySID(peerTag string, snapshotID string, snapshotType int) ([]model.BestState, error)
- func QueryEventOrphanByBHA(peerTag string, blockHash string) ([]model.EventOrphan, error)
- func QueryEventOrphanByPBHA(peerTag string, parentBlockHash string) ([]model.EventOrphan, error)
- func QueryEventOrphanBySID(peerTag string, snapshotID string, eventOrphanType int) ([]model.EventOrphan, error)
- func QueryPeer() ([]string, error)
- func QueryRevisionBySID(peerTag string, snapshotID string, revisionType int, initTimestamp string) ([]model.Revision, error)
- func QuerySnapshotByBHA(peerTag string, blockHash string, pageSize, pageNumber int) ([]model.Snapshot, error)
- func QuerySnapshotByCIN(peerTag string, targetChainID int, targetChainHeight int32, ...) ([]model.Snapshot, error)
- func QuerySnapshotBySID(peerTag string, snapshotID string, pageSize, pageNumber int) ([]model.Snapshot, error)
- func QuerySnapshotByTRA(peerTag string, leftTimestamp, rightTimestamp string, pageSize, pageNumber int) ([]model.Snapshot, error)
- func RunOpenAPIServer(addr string) error
- type IndexType
- type OpenAPIServer
- type Route
- type Routes
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParamInvalid = errors.New("error param invalid") ErrParamNotSet = errors.New("error param not set") ErrQueryFailed = errors.New("error query failed") ErrUIDInvalid = errors.New("error uid invalid") ErrTokenInvalid = errors.New("error token invalid") ErrUnknown = errors.New("error unknown") )
Functions ¶
func OpenapiV1AuthRegisterPost ¶
OpenapiV1AuthRegisterPost TODO
func OpenapiV1AuthTokenGet ¶
OpenapiV1AuthTokenGet 目前暂时用这个
func OpenapiV1AuthTokenPost ¶
OpenapiV1AuthTokenPost TODO
func OpenapiV1BestStateGet ¶
OpenapiV1BestStateGet - BestState
func OpenapiV1EventOrphanGet ¶
OpenapiV1EventOrphanGet - Event_Orphan
func OpenapiV1RevisionGet ¶
OpenapiV1RevisionGet - Revision
func OpenapiV1SnapshotGet ¶
OpenapiV1SnapshotGet - Snapshot
func OpenapiV1TimelineGet ¶
OpenapiV1TimelineGet - Timeline
func QueryBestStateBySID ¶
func QueryEventOrphanByBHA ¶
func QueryEventOrphanByBHA(peerTag string, blockHash string) ([]model.EventOrphan, error)
func QueryEventOrphanByPBHA ¶
func QueryEventOrphanByPBHA(peerTag string, parentBlockHash string) ([]model.EventOrphan, error)
func QueryEventOrphanBySID ¶
func QueryRevisionBySID ¶
func QuerySnapshotByBHA ¶
func QuerySnapshotByCIN ¶
func QuerySnapshotBySID ¶
func QuerySnapshotByTRA ¶
func RunOpenAPIServer ¶
Types ¶
type OpenAPIServer ¶
func InitOpenAPIServer ¶
func InitOpenAPIServer(dbConf config.DatabaseConfig) *OpenAPIServer
InitOpenAPIServer init and returns the openapi server.
type Route ¶
type Route struct { // Name is the name of this Route. Name string // Method is the string for the HTTP method. ex) GET, POST etc.. Method string // Pattern is the pattern of the URI. Pattern string // HandlerFunc is the handler function of this route. HandlerFunc gin.HandlerFunc }
Route is the information for every URI.
Click to show internal directories.
Click to hide internal directories.