Documentation ¶
Overview ¶
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
Index ¶
- Variables
- func InitJwtSecret(secret []byte)
- func SendRawRequest(rtype, url, auth string, form *url.Values) ([]byte, error)
- func SendRequest(rtype, url, auth string, form *url.Values, v any) error
- func SetOtherCommonRoutes(api *mux.Router, m Mode)
- func WithCors(h http.Handler) http.Handler
- type BlockDetailedInfo
- type BlockHeaderInfo
- type Client
- type Connect
- func (connect *Connect) Login() error
- func (connect *Connect) PostTxResult(name string, form *url.Values) (id int64, msg string, err error)
- func (connect *Connect) SendGet(url string, form *url.Values, v any) error
- func (connect *Connect) SendMultipart(url string, files map[string][]byte, v any) error
- func (connect *Connect) SendPost(url string, form *url.Values, v any) error
- func (connect *Connect) WaitTx(hash string) (int64, error)
- func (connect *Connect) WaitTxList(hashes []string) (map[string]WaitResult, error)
- type HonorNodeJSON
- type JWTClaims
- type Mode
- type NetworkResult
- type Router
- type SumWhereForm
- type TxDetailedInfo
- type TxInfo
- type WaitResult
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEcosystemNotFound = errors.New("Ecosystem not found")
)
Functions ¶
func InitJwtSecret ¶
func InitJwtSecret(secret []byte)
func SendRawRequest ¶
func SetOtherCommonRoutes ¶
Types ¶
type BlockDetailedInfo ¶
type BlockDetailedInfo struct { Header BlockHeaderInfo `json:"header"` Hash []byte `json:"hash"` EcosystemID int64 `json:"-"` NodePosition int64 `json:"node_position"` KeyID int64 `json:"key_id"` Time int64 `json:"time"` Tx int32 `json:"tx_count"` Size string `json:"size"` RollbacksHash []byte `json:"rollbacks_hash"` MerkleRoot []byte `json:"merkle_root"` BinData []byte `json:"bin_data"` SysUpdate bool `json:"-"` GenBlock bool `json:"-"` StopCount int `json:"stop_count"` Transactions []TxDetailedInfo `json:"transactions"` }
type BlockHeaderInfo ¶
type Client ¶
type Client struct { KeyID int64 AccountID string EcosystemID int64 EcosystemName string RoleID int64 }
Client represents data of client
type Connect ¶
func (*Connect) PostTxResult ¶
func (*Connect) SendMultipart ¶
func (*Connect) WaitTxList ¶
func (connect *Connect) WaitTxList(hashes []string) (map[string]WaitResult, error)
type HonorNodeJSON ¶
type HonorNodeJSON struct { TCPAddress string `json:"tcp_address"` APIAddress string `json:"api_address"` PublicKey string `json:"public_key"` UnbanTime string `json:"unban_time"` Stopped bool `json:"stopped"` }
func GetNodesJSON ¶
func GetNodesJSON() []HonorNodeJSON
type JWTClaims ¶
type JWTClaims struct { UID string `json:"uid,omitempty"` EcosystemID string `json:"ecosystem_id,omitempty"` KeyID string `json:"key_id,omitempty"` AccountID string `json:"account_id,omitempty"` RoleID string `json:"role_id,omitempty"` jwt.RegisteredClaims }
JWTClaims is storing jwt claims
type Mode ¶
type Mode struct { EcosystemGetter types.EcosystemGetter ContractRunner types.SmartContractRunner ClientTxProcessor types.ClientTxPreprocessor }
func (Mode) GetAppParamHandler ¶
func (m Mode) GetAppParamHandler(w http.ResponseWriter, r *http.Request)
func (Mode) SetBlockchainRoutes ¶
func (Mode) SetSubNodeRoutes ¶
type NetworkResult ¶
type NetworkResult struct { NetworkID string `json:"network_id"` CentrifugoURL string `json:"centrifugo_url"` Test bool `json:"test"` Private bool `json:"private"` HonorNodes []HonorNodeJSON `json:"honor_nodes"` }
type SumWhereForm ¶
type TxDetailedInfo ¶
type WaitResult ¶
Source Files ¶
- api.go
- app_content.go
- appparam.go
- appparams.go
- auth.go
- balance.go
- block.go
- common_forms.go
- config.go
- content.go
- context.go
- contracts.go
- data.go
- ecosystem.go
- ecosystem_params.go
- errors.go
- getcontract.go
- getuid.go
- history.go
- interface.go
- keyinfo.go
- list.go
- login.go
- member.go
- metrics.go
- middlewares.go
- network.go
- node.go
- platform_params.go
- request.go
- route.go
- row.go
- sections.go
- send_tx.go
- table.go
- tables.go
- trash.go
- tx_record.go
- txinfo.go
- txstatus.go
- version.go
Click to show internal directories.
Click to hide internal directories.