Versions in this module Expand all Collapse all v1 v1.4.2 May 30, 2023 v1.4.0 May 30, 2023 Changes in this version + const ErrCodeDefault + const ErrCodeInternalError + const ErrCodeInvalidInput + const ErrCodeInvalidParams + const ErrCodeInvalidRequest + const ErrCodeLimitExceeded + const ErrCodeMethodNotFound + const ErrCodeMethodNotSupported + const ErrCodeNotFound + const ErrCodeParamsInvalid + const ErrCodeParseError + const ErrCodeResourceNotFound + const ErrCodeResourceUnavailable + const ErrCodeTransactionRejected + const ErrCodeUnauthorized + const ErrCodeUnknownUID + const JsonRPCVersion + const NamespaceAdmin + const NamespaceDebug + const NamespaceIBAX + const NamespaceNet + func ContextRequestTimeout(ctx context.Context) (time.Duration, bool) + func GetNamespace(name space) string + func GetStructValue(structObject any) reflect.Value + func InitJwtSecret(secret []byte) + func NewAccountsApi(m Mode) *accountsApi + func NewAuthApi(mode Mode) *authApi + func NewBlockChainApi() *blockChainApi + func NewCommonApi(m Mode) *commonApi + func NewDataApi() *dataApi + func NewMiddlewares(srv http.Handler, m Mode) http.Handler + func NewNetworkApi() *networkApi + func NewTransactionApi() *transactionApi + func RequestHandlerFunc(fn requestHandlerFunc) *requestHandlerFunc + func WriteBatchResponse(w http.ResponseWriter, resp any) + func WriteResponse(w http.ResponseWriter, request *Request, result any, e *Error) + type AccountOrKeyId struct + Account string + KeyId int64 + func (bh *AccountOrKeyId) UnmarshalJSON(data []byte) error + func (bh *AccountOrKeyId) Validate(r *http.Request) error + type AppContentResult struct + Contracts []sqldb.Contract + Pages []sqldb.Page + Snippets []sqldb.Snippet + type AppParamsForm struct + func (f *AppParamsForm) AcceptNames(names string) + func (f *AppParamsForm) Validate(r *http.Request) error + type AppParamsResult struct + App int64 + List []ParamResult + type Auth struct + type AuthStatusResponse struct + ExpiresAt int64 + IsActive bool + type BalanceResult struct + Amount string + Digits int64 + TokenSymbol string + Total string + Utxo string + type BatchRequest []*Request + type BatchResponse []*Response + type BlockDetailedInfo struct + BinData string + EcosystemID int64 + GenBlock bool + Hash string + Header BlockHeaderInfo + KeyID int64 + MerkleRoot string + NodePosition int64 + RollbacksHash string + Size string + StopCount int + SysUpdate bool + Time int64 + Transactions []TxDetailedInfo + Tx int32 + type BlockHeaderInfo struct + BlockID int64 + EcosystemID int64 + Hash string + KeyID int64 + NodePosition int64 + Sign []byte + Time int64 + Version int + type BlockIdOrHash struct + Hash string + Id int64 + func (bh *BlockIdOrHash) GetBlock() (int64, bool) + func (bh *BlockIdOrHash) GetHash() ([]byte, bool) + func (bh *BlockIdOrHash) UnmarshalJSON(data []byte) error + func (bh *BlockIdOrHash) Validate(r *http.Request) error + type BlockInfoResult struct + ConsensusMode int32 + EcosystemID int64 + Hash string + KeyID int64 + NodePosition int64 + RollbacksHash string + Time int64 + Tx int32 + type ContentResult struct + Menu string + MenuTree json.RawMessage + NodesCount int64 + Title string + Tree json.RawMessage + type DebugApi struct + func NewDebugApi() *DebugApi + func (p *DebugApi) GetApis() []any + type EcosystemInfo struct + Creator string + Digits int64 + Emission string + Id int64 + Introduction string + IsEmission bool + IsWithdraw bool + Logo int64 + Name string + TokenName string + TokenSymbol string + TotalAmount string + Withdraw string + type Error struct + Code ErrorCode + Data map[string]any + Message string + func DefaultError(message string) *Error + func InternalError(message string, data ...map[string]any) *Error + func InvalidInput(message string, data ...map[string]any) *Error + func InvalidParamsError(message string, data ...map[string]any) *Error + func InvalidRequest(message string, data ...map[string]any) *Error + func LimitExceeded(message string, data ...map[string]any) *Error + func MethodNotFound(method string, data ...map[string]any) *Error + func MethodNotSupported(method string, data ...map[string]any) *Error + func NewError(code ErrorCode, message string, data ...map[string]any) *Error + func NotFoundError() *Error + func ParseError(message string) *Error + func ResourceNotFound(message string, data ...map[string]any) *Error + func ResourceUnavailable(message string, data ...map[string]any) *Error + func TransactionRejected(message string, data ...map[string]any) *Error + func UnUnknownUIDError() *Error + func UnauthorizedError() *Error + func (e *Error) Error() string + type ErrorCode int + type GetContractResult struct + Address string + AppId uint32 + Conditions string + Ecosystem uint32 + Fields []contractField + ID uint32 + Name string + StateID uint32 + TableID string + TokenID string + WalletID string + type GetUIDResult struct + Address string + Cryptoer string + EcosystemID string + Expire string + Hasher string + KeyID string + NetworkID string + Token string + UID string + type HistoryResult struct + List []map[string]string + type HonorNodeJSON struct + APIAddress string + PublicKey string + Stopped bool + TCPAddress string + UnbanTime string + type ID struct + IsString bool + Num uint64 + Str string + func IntID(i uint64) ID + func StringID(s string) ID + func (id *ID) UnmarshalJSON(data []byte) error + func (id ID) MarshalJSON() ([]byte, error) + func (id ID) String() string + type IbaxApi struct + func NewIbaxApi(m Mode) *IbaxApi + func (p *IbaxApi) GetApis() []any + type JWTClaims struct + AccountID string + EcosystemID string + KeyID string + RoleID string + UID string + type KeyInfoResult struct + Account string + Ecosystems []*keyEcosystemInfo + type ListForm struct + Name string + func (f *ListForm) Validate(r *http.Request) error + type ListResult struct + Count int64 + List []map[string]string + type ListWhereForm struct + Order string + Where any + func (f *ListWhereForm) Validate(r *http.Request) error + type LoginResult struct + Account string + EcosystemID string + IsCLB bool + IsNode bool + IsOwner bool + KeyID string + NotifyKey string + Roles []rolesResult + Timestamp string + Token string + type MemberInfo struct + ID int64 + ImageID *int64 + MemberInfo string + MemberName string + type Method struct + func (a *Method) Delete(name string) + func (a *Method) New(structObject any) (name string) + type Mode struct + ClientTxProcessor types.ClientTxPreprocessor + ContractRunner types.SmartContractRunner + EcosystemGetter types.EcosystemGetter + type MultiTxInfoResult struct + Results map[string]*TxInfoResult + type NetApi struct + func NewNetApi() *NetApi + func (p *NetApi) GetApis() []any + type NetworkResult struct + CentrifugoURL string + HonorNodes []HonorNodeJSON + NetworkID string + Private bool + Test bool + type NewApiService interface + Delete func(name string) + New func(structObject any) (name string) + type NotSingle struct + type Param json.RawMessage + func (m *Param) UnmarshalJSON(data []byte) error + func (m Param) MarshalJSON() ([]byte, error) + type ParamResult struct + Conditions string + ID string + Name string + Value string + type Params []Param + func MakeParams(params ...any) (Params, error) + func MustParams(params ...any) Params + func (p Params) UnmarshalInto(receivers ...any) error + func (p Params) UnmarshalSingleParam(pos int, receiver any) error + func (p Params) UnmarshalValue(types []reflect.Type) (args []reflect.Value, err error) + type ParamsResult struct + List []ParamResult + type PartModel interface + Get func(name string) (bool, error) + SetTablePrefix func(prefix string) + type RawResponse struct + Error *json.RawMessage + ID ID + JSONRPC string + Result json.RawMessage + func (r *RawResponse) UnmarshalJSON(data []byte) error + func (r RawResponse) MarshalJSON() ([]byte, error) + type Request struct + ID ID + JSONRPC string + Method string + Params Params + func MakeRequest(id int, method string, params ...any) (*Request, error) + func MustRequest(id int, method string, params ...any) *Request + func NewRequest() *Request + func (r *Request) UnmarshalJSON(data []byte) error + func (r Request) MarshalJSON() ([]byte, error) + type RequestContext struct + func (rc *RequestContext) HTTPRequest() *http.Request + func (rc *RequestContext) HTTPResponseWriter() http.ResponseWriter + func (rc *RequestContext) RawJSON() json.RawMessage + type RequestWithNetwork struct + Network string + func (r *RequestWithNetwork) UnmarshalJSON(data []byte) error + func (r RequestWithNetwork) MarshalJSON() ([]byte, error) + type Response struct + Error any + ID ID + JSONRPC string + Result any + func NewResponse() *Response + func (r *Response) UnmarshalJSON(data []byte) error + func (r Response) MarshalJSON() ([]byte, error) + type RowResult struct + Value map[string]string + type RpcApis interface + GetApis func() []any + type RpcServers struct + func (r *RpcServers) Modules() ([]string, *Error) + type SectionsForm struct + Lang string + func (f *SectionsForm) Validate(r *http.Request) error + type Server struct + func NewServer(m Mode) *Server + func (s *Server) RegisterName(namespace string, function any) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) Stop() + type TableCountResult struct + Count int64 + List []tableInfo + type TableResult struct + AppID string + Columns []columnInfo + Conditions string + Filter string + Insert string + Name string + NewColumn string + Read string + Update string + type TxDetailResult struct + type TxDetailedInfo struct + ContractName string + Hash string + KeyID int64 + Params map[string]any + Size string + Time int64 + Type byte + type TxInfo struct + ContractName string + Hash string + KeyID int64 + Params map[string]any + type TxInfoResult struct + BlockID int64 + Confirm int + Data *smart.TxInfo + type UserClient struct + AccountID string + EcosystemID int64 + EcosystemName string + KeyID int64 + RoleID int64 + func (c *UserClient) Prefix() string