Documentation
¶
Index ¶
- Constants
- Variables
- func AccountDetail(addr string) []byte
- func AccountNonce(nonce int64)
- func ActiveWallet(cipherTxt, auth string) error
- func AddFriend(friAddr, alias, remark string) error
- func AddGroupMembers(gid string, data []byte) (string, error)
- func AllFriendIDs() []byte
- func ChangeGroupName(gid, name string) (string, error)
- func CreateGroup(name string, data []byte) (string, error)
- func DecryptGroupPayload(from string, cryptKey, payload []byte) ([]byte, error)
- func DecryptPeerPayload(peer string, payload []byte) ([]byte, error)
- func DeleteFriend(friAddr string) error
- func DismissGroup(gid string) (string, error)
- func FriendDetail(fid string) []byte
- func GroupMeta(gid string) []byte
- func GroupNonce(gid string, nonce int64)
- func IconIndex(id string, mod int) int64
- func InitAPP(endIP string, infura string, call UICallBack, devToken string, devType int, ...)
- func IsValidNinjaAddr(addr string) bool
- func KickOutMembers(gid string, data []byte) (string, error)
- func LatestBlock() []byte
- func NewWallet(auth string) string
- func QuitFromGroup(gid string) (string, error)
- func Send(msgID int64, to string, data []byte, isGrp bool) ([]byte, error)
- func SyncFriendWithDetails() []byte
- func SyncGroupIDs() []byte
- func SyncGroupWithDetails() []byte
- func TransferLicense(toAddr string, aMount int) error
- func UnmarshalGoByte(s string) []byte
- func UpdateAlias(friAddr, alias string) error
- func UpdateAvatar(avatar []byte) error
- func UpdateNickName(nick string) error
- func UpdateRemark(friAddr, remark string) error
- func Version() string
- func WSOffline()
- func WSOnline() error
- func WalletAddress() string
- func WalletIsOpen() bool
- func WrapFile(n, s string, l int, c []byte) []byte
- func WrapImg(img []byte) []byte
- func WrapLocation(n string, lo, la float64) []byte
- func WrapTxt(s string) []byte
- func WrapVoice(l int, c []byte) []byte
- type CacheItem
- type File
- type Image
- type Location
- type MobileAPP
- type MsgMediaTyp
- type PlainTxt
- type UICallBack
- type Voice
Constants ¶
View Source
const ( MsgFailedThreshold = time.Minute * 5 NoRightCodeNo = -1 )
View Source
const ( MMTTxt = 1 MMTImg = 2 MMTVoice = 3 MMTLcl = 4 MMTFile = 5 )
Variables ¶
View Source
var ( ErrNick = fmt.Errorf("too short nick name") ErrAvatar = fmt.Errorf("nil avatar") )
View Source
var (
ErrWallet = fmt.Errorf("open wallet first please")
)
Functions ¶
func AccountDetail ¶ added in v1.2.2
func AccountNonce ¶ added in v1.2.2
func AccountNonce(nonce int64)
func ActiveWallet ¶
func AddGroupMembers ¶ added in v1.2.2
func AllFriendIDs ¶ added in v1.2.2
func AllFriendIDs() []byte
func ChangeGroupName ¶ added in v1.2.2
func DecryptGroupPayload ¶ added in v1.2.2
func DecryptPeerPayload ¶ added in v1.2.2
func DeleteFriend ¶ added in v1.2.2
func DismissGroup ¶ added in v1.2.2
func FriendDetail ¶ added in v1.2.2
func GroupNonce ¶ added in v1.2.2
func IsValidNinjaAddr ¶
func LatestBlock ¶ added in v1.2.2
func LatestBlock() []byte
func QuitFromGroup ¶ added in v1.2.2
func SyncFriendWithDetails ¶ added in v1.2.2
func SyncFriendWithDetails() []byte
func SyncGroupIDs ¶ added in v1.2.2
func SyncGroupIDs() []byte
func SyncGroupWithDetails ¶ added in v1.2.2
func SyncGroupWithDetails() []byte
func TransferLicense ¶
func UnmarshalGoByte ¶
func UpdateAlias ¶ added in v1.2.2
func UpdateAvatar ¶ added in v1.2.2
func UpdateNickName ¶ added in v1.2.2
func UpdateRemark ¶ added in v1.2.2
func WalletAddress ¶ added in v1.2.2
func WalletAddress() string
func WalletIsOpen ¶
func WalletIsOpen() bool
func WrapLocation ¶ added in v1.2.2
Types ¶
type CacheItem ¶ added in v1.2.2
type CacheItem struct {
ID int64
// contains filtered or unexported fields
}
type MobileAPP ¶
func (*MobileAPP) ImmediateMessage ¶
func (a *MobileAPP) ImmediateMessage(msg *pbs.WSCryptoMsg) error
func (*MobileAPP) NoRightTips ¶ added in v1.2.2
func (a *MobileAPP) NoRightTips(tips *pbs.WSNoRightTips)
func (*MobileAPP) OnlineSuccess ¶
func (a *MobileAPP) OnlineSuccess()
func (*MobileAPP) WebSocketClosed ¶
func (a *MobileAPP) WebSocketClosed()
type MsgMediaTyp ¶ added in v1.2.2
type MsgMediaTyp byte
type UICallBack ¶
type UICallBack interface {
PeerIM(from string, decoded, payload []byte, time int64) error
GrpIM(from, gid string, cryptKey, decoded, payload []byte, time int64) error
WebSocketClosed()
WebSocketDidOnline()
GetMembersOfGroup(string) []byte
NodeIPChanged(string)
AccountUpdate([]byte)
GroupUpdate([]byte)
MsgResult(int64, string, bool)
}
Click to show internal directories.
Click to hide internal directories.