Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Friend ¶
type Friend struct { Status FriendStatus UserStatus UserStatus PublicKey *[crypto.PublicKeySize]byte RequestMessage string Name string StatusMessage string Nospam uint32 LastSeen uint64 }
Friend represents the structure of friends that can be found inside a Tox state file.
type FriendStatus ¶
type FriendStatus byte
FriendStatus represents the status of a friend request. As you move down the list the current friend status also assumes the previous ones.
const ( // FriendStatusNone indicates that this friend. FriendStatusNone FriendStatus = iota // FriendStatusAdded indicates that this friend has been added to the // friend list. However, no friend request has been sent yet. FriendStatusAdded // FriendStatusRequestSent indicates that a friend request has been sent to // this friend. FriendStatusRequestSent // FriendStatusConfirmed indicates that the friend request has been // accepted. This friend is now a confirmed friend. FriendStatusConfirmed // FriendStatusOnline indicates that this friend is currently online. FriendStatusOnline )
type GlobalCookieError ¶
type GlobalCookieError struct {
// contains filtered or unexported fields
}
GlobalCookieError represents an error that occurs during a magic number check. It provides the value it expected and the value that it actually found.
func (GlobalCookieError) Error ¶
func (e GlobalCookieError) Error() string
type InnerCookieError ¶
type InnerCookieError struct {
// contains filtered or unexported fields
}
InnerCookieError represents an error that occurs during a magic number check. It provides the value it expected and the value that it actually found.
func (InnerCookieError) Error ¶
func (e InnerCookieError) Error() string
type State ¶
type State struct { PublicKey *[crypto.PublicKeySize]byte SecretKey *[crypto.PublicKeySize]byte Nospam uint32 Name string StatusMessage string Status UserStatus Friends []*Friend Nodes []*dht.Node TCPRelays []*dht.Node PathNodes []*dht.Node }
State represents a Tox state file.
func (*State) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (*State) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
type UserStatus ¶
type UserStatus byte
UserStatus represents the user status.
const ( // UserStatusNone indicates that this person didn't specify a status. UserStatusNone UserStatus = iota // UserStatusAway indicates that this person is away. UserStatusAway // UserStatusBusy indicates that this person is busy. UserStatusBusy )