Documentation ¶
Index ¶
- Constants
- Variables
- func GetValidBootNodeIP() (string, error)
- func StatusCheck(ip string) error
- type ChainClient
- func (cc *ChainClient) GetAccountMeta(userAddr string) (*account.Account, error)
- func (cc *ChainClient) GetBlockByIdx(nonce *big.Int) (*block.Block, error)
- func (cc *ChainClient) GetFriendsOf(userAddr string) (*account.FriendRelation, error)
- func (cc *ChainClient) GetGroupMeta(gid string) (*account.ChatGroup, error)
- func (cc *ChainClient) GetGroupsOf(userAddr string) (*account.GroupRelation, error)
- func (cc *ChainClient) GetLatestBlock() (*block.Block, error)
- func (cc *ChainClient) GetOneFriendOf(userAddr, friend string) (*account.Contact, error)
- func (cc *ChainClient) RawChainTransaction(path string, raw, sig []byte) (string, error)
- func (cc *ChainClient) SetBasUrl(newIP string)
- type CliCallBack
- type WSClient
Constants ¶
View Source
const (
HttpTimeOut = time.Second * 15
)
Variables ¶
View Source
var ( ErrInvalidProtoData = fmt.Errorf("invalid proto data") ErrNotFound = fmt.Errorf("not found") )
Functions ¶
func GetValidBootNodeIP ¶ added in v1.2.2
func StatusCheck ¶
Types ¶
type ChainClient ¶ added in v1.2.2
type ChainClient struct {
// contains filtered or unexported fields
}
func NewChainClient ¶ added in v1.2.2
func NewChainClient(base string) *ChainClient
func (*ChainClient) GetAccountMeta ¶ added in v1.2.2
func (cc *ChainClient) GetAccountMeta(userAddr string) (*account.Account, error)
func (*ChainClient) GetBlockByIdx ¶ added in v1.2.2
func (*ChainClient) GetFriendsOf ¶ added in v1.2.2
func (cc *ChainClient) GetFriendsOf(userAddr string) (*account.FriendRelation, error)
func (*ChainClient) GetGroupMeta ¶ added in v1.2.2
func (cc *ChainClient) GetGroupMeta(gid string) (*account.ChatGroup, error)
func (*ChainClient) GetGroupsOf ¶ added in v1.2.2
func (cc *ChainClient) GetGroupsOf(userAddr string) (*account.GroupRelation, error)
func (*ChainClient) GetLatestBlock ¶ added in v1.2.2
func (cc *ChainClient) GetLatestBlock() (*block.Block, error)
func (*ChainClient) GetOneFriendOf ¶ added in v1.2.2
func (cc *ChainClient) GetOneFriendOf(userAddr, friend string) (*account.Contact, error)
func (*ChainClient) RawChainTransaction ¶ added in v1.2.2
func (cc *ChainClient) RawChainTransaction(path string, raw, sig []byte) (string, error)
func (*ChainClient) SetBasUrl ¶ added in v1.2.2
func (cc *ChainClient) SetBasUrl(newIP string)
type CliCallBack ¶
type CliCallBack interface { ImmediateMessage(msg *pbs.WSCryptoMsg) error WebSocketClosed() OnlineSuccess() NoRightTips(tips *pbs.WSNoRightTips) }
type WSClient ¶
func NewWSClient ¶
func NewWSClient(nodeIP string, cb CliCallBack) (*WSClient, error)
func (*WSClient) PullUnreadMsg ¶
Click to show internal directories.
Click to hide internal directories.