peer

package
v0.0.0-...-6e21e7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PEER_EMPTY   = 0
	PEER_SELF    = 1
	PEER_USER    = 2
	PEER_CHAT    = 3
	PEER_CHANNEL = 4
	PEER_USERS   = 5
	PEER_CHATS   = 6
	PEER_ALL     = 7
	PEER_UNKNOWN = -1
)

Variables

This section is empty.

Functions

func CheckPeerInvalid

func CheckPeerInvalid() bool

func ToPeerByTypeAndID

func ToPeerByTypeAndID(peerType int8, peerId int32) (peer *mtproto.Peer)

Types

type PeerUtil

type PeerUtil struct {
	PeerType   int32
	PeerId     int32
	AccessHash int64
	// contains filtered or unexported fields
}

func FromInputNotifyPeer

func FromInputNotifyPeer(peer *mtproto.InputNotifyPeer) (p *PeerUtil)

func FromInputPeer

func FromInputPeer(peer *mtproto.InputPeer) (p *PeerUtil)

func FromInputPeer2

func FromInputPeer2(selfId int32, peer *mtproto.InputPeer) (p *PeerUtil)

func FromNotifyPeer

func FromNotifyPeer(peer *mtproto.NotifyPeer) (p *PeerUtil)

func FromPeer

func FromPeer(peer *mtproto.Peer) (p *PeerUtil)

func (PeerUtil) String

func (p PeerUtil) String() (s string)

func (*PeerUtil) ToInputNotifyPeer

func (p *PeerUtil) ToInputNotifyPeer(peer *mtproto.InputNotifyPeer)

func (*PeerUtil) ToInputPeer

func (p *PeerUtil) ToInputPeer() (peer *mtproto.InputPeer)

func (*PeerUtil) ToNotifyPeer

func (p *PeerUtil) ToNotifyPeer() (peer *mtproto.NotifyPeer)

func (*PeerUtil) ToPeer

func (p *PeerUtil) ToPeer() (peer *mtproto.Peer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL