Documentation ¶
Index ¶
- Constants
- func CheckAndGetPhoneNumber(number string) (phoneNumber string, err error)
- func MakePhoneNumberUtil(number, region string) (*phoneNumberUtil, error)
- func NextSnowflakeId() int64
- func ToPeerByTypeAndID(peerType int8, peerId int32) (peer *mtproto.Peer)
- type PeerUtil
- func FromInputNotifyPeer(peer *mtproto.InputNotifyPeer) (p *PeerUtil)
- func FromInputPeer(peer *mtproto.InputPeer) (p *PeerUtil)
- func FromInputPeer2(selfId int32, peer *mtproto.InputPeer) (p *PeerUtil)
- func FromNotifyPeer(peer *mtproto.NotifyPeer) (p *PeerUtil)
- func FromPeer(peer *mtproto.Peer) (p *PeerUtil)
- type ReportReasonType
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 CheckAndGetPhoneNumber ¶
Check number 客户端发送的手机号格式为: "+86 111 1111 1111",归一化
func MakePhoneNumberUtil ¶
func NextSnowflakeId ¶
func NextSnowflakeId() int64
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 FromNotifyPeer ¶
func FromNotifyPeer(peer *mtproto.NotifyPeer) (p *PeerUtil)
func (*PeerUtil) ToInputNotifyPeer ¶
func (p *PeerUtil) ToInputNotifyPeer(peer *mtproto.InputNotifyPeer)
func (*PeerUtil) ToInputPeer ¶
func (*PeerUtil) ToNotifyPeer ¶
func (p *PeerUtil) ToNotifyPeer() (peer *mtproto.NotifyPeer)
type ReportReasonType ¶
type ReportReasonType int8
const ( //inputReportReasonOther#e1746d0a text:string = ReportReason; REASON_OTHER ReportReasonType = 0 // 其它 //inputReportReasonSpam#58dbcab8 = ReportReason; REASON_SPAM ReportReasonType = 1 // 垃圾 //inputReportReasonViolence#1e22c78d = ReportReason; REASON_VIOLENCE ReportReasonType = 2 // 暴力 //inputReportReasonPornography#2e59d922 = ReportReason; REASON_PORNOGRAPHY ReportReasonType = 3 // 色情 )
func FromReportReason ¶
func FromReportReason(reason *mtproto.ReportReason) (i ReportReasonType)
func (ReportReasonType) String ¶
func (i ReportReasonType) String() (s string)
func (ReportReasonType) ToReportReason ¶
func (i ReportReasonType) ToReportReason(text string) (reason *mtproto.ReportReason)
Click to show internal directories.
Click to hide internal directories.