tgRpc

package
v0.0.0-...-9476193 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMonitor

func AddMonitor(handler *ServerHandler, mon *MsgMonitor) int64

func ListenMessages

func ListenMessages(handler *ServerHandler, messageType tdlib.TdMessage)

func NewClient

func NewClient() net.Conn

func RemoveMonitor

func RemoveMonitor(handler *ServerHandler, index int64)

func Serve

func Serve(client *tdlib.Client)

Types

type MsgMonitor

type MsgMonitor struct {
	ChatId       int64
	SenderId     int32
	ReplyToMsgId int64
	OldMsgId     int64
	CallbackData chan *tdlib.Message
}

func (MsgMonitor) Match

func (mon MsgMonitor) Match(message *tdlib.Message, oldMsgId int64) bool

func (MsgMonitor) Process

func (mon MsgMonitor) Process(message *tdlib.Message)

type Request

type Request struct {
	ChatId       int64  `json:"chat_id"`
	TalkToUserId int32  `json:"talk_to_user_id"`
	ReplyToMsgId int64  `json:"reply_to_msg_id"`
	Content      string `json:"content"`
	NoResponse   bool   `json:"no_response"`
}

type ServerHandler

type ServerHandler struct {
	// contains filtered or unexported fields
}

func (*ServerHandler) Request

func (handler *ServerHandler) Request(requestJson string, responseJson *string) error

Jump to

Keyboard shortcuts

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