define api calls response

This commit is contained in:
Carlosokumu 2024-08-26 13:31:20 +03:00
parent ee649dc79e
commit 430c5d32c8
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953
3 changed files with 37 additions and 10 deletions

View File

@ -2,19 +2,14 @@ package models
import ( import (
"encoding/json" "encoding/json"
"time"
) )
type AccountResponse struct {
type trackStatusResponse struct {
Ok bool `json:"ok"` Ok bool `json:"ok"`
Result struct { Result struct {
Transaction struct { CustodialId json.Number `json:"custodialId"`
CreatedAt time.Time `json:"createdAt"` PublicKey string `json:"publicKey"`
Status string `json:"status"` TrackingId string `json:"trackingId"`
TransferValue json.Number `json:"transferValue"`
TxHash string `json:"txHash"`
TxType string `json:"txType"`
}
} `json:"result"` } `json:"result"`
} }

View File

@ -0,0 +1,12 @@
package models
import "encoding/json"
type BalanceResponse struct {
Ok bool `json:"ok"`
Result struct {
Balance string `json:"balance"`
Nonce json.Number `json:"nonce"`
} `json:"result"`
}

View File

@ -0,0 +1,20 @@
package models
import (
"encoding/json"
"time"
)
type TrackStatusResponse struct {
Ok bool `json:"ok"`
Result struct {
Transaction struct {
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status"`
TransferValue json.Number `json:"transferValue"`
TxHash string `json:"txHash"`
TxType string `json:"txType"`
}
} `json:"result"`
}