proxy

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUpdateStreamerServer

func RegisterUpdateStreamerServer(s *grpc.Server, srv UpdateStreamerServer)

Types

type Client

type Client struct {
	mtproto.MtprotoClient
	UpdateStreamerClient
}

func NewClient

func NewClient(addr string) (*Client, error)

type ListenRequest

type ListenRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListenRequest) Descriptor

func (*ListenRequest) Descriptor() ([]byte, []int)

func (*ListenRequest) ProtoMessage

func (*ListenRequest) ProtoMessage()

func (*ListenRequest) Reset

func (m *ListenRequest) Reset()

func (*ListenRequest) String

func (m *ListenRequest) String() string

func (*ListenRequest) XXX_DiscardUnknown added in v0.4.1

func (m *ListenRequest) XXX_DiscardUnknown()

func (*ListenRequest) XXX_Marshal added in v0.4.1

func (m *ListenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListenRequest) XXX_Merge added in v0.4.1

func (dst *ListenRequest) XXX_Merge(src proto.Message)

func (*ListenRequest) XXX_Size added in v0.4.1

func (m *ListenRequest) XXX_Size() int

func (*ListenRequest) XXX_Unmarshal added in v0.4.1

func (m *ListenRequest) XXX_Unmarshal(b []byte) error

type Server

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

func NewServer

func NewServer(port int) *Server

func (*Server) AddUpdateCallback added in v0.2.1

func (p *Server) AddUpdateCallback(callback mtproto.UpdateCallback)

func (*Server) InvokeBlocked

func (p *Server) InvokeBlocked(msg mtproto.TL) (interface{}, error)

func (*Server) ListenOnUpdates

func (p *Server) ListenOnUpdates(req *ListenRequest, stream UpdateStreamer_ListenOnUpdatesServer) error

func (*Server) LogPrefix

func (p *Server) LogPrefix() string

func (*Server) OnUpdate

func (p *Server) OnUpdate(mu mtproto.Update)

func (*Server) Start

func (p *Server) Start(config mtproto.Configuration) error

func (*Server) Stop

func (p *Server) Stop()

func (*Server) Wait added in v0.2.2

func (p *Server) Wait()

type Update

type Update struct {
	// Types that are valid to be assigned to Value:
	//	*Update_UpdatesState
	//	*Update_UpdateShortMessage
	//	*Update_UpdateShortChatMessage
	//	*Update_UpdateShort
	//	*Update_Updates
	//	*Update_UpdateShortSentMessage
	//	*Update_UpdatesDifference
	//	*Update_UpdatesDifferenceSlice
	//	*Update_UpdateNewMessage
	//	*Update_UpdateReadMessagesContents
	//	*Update_UpdateDeleteMessages
	//	*Update_UpdateNewEncryptedMessage
	//	*Update_UpdateChannel
	//	*Update_UpdateChannelMessageViews
	//	*Update_UpdateChannelTooLong
	//	*Update_UpdateReadChannelInbox
	//	*Update_UpdateReadChannelOutbox
	//	*Update_UpdateNewChannelMessage
	Value                isUpdate_Value `protobuf_oneof:"Value"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Update) Descriptor

func (*Update) Descriptor() ([]byte, []int)

func (*Update) GetUpdateChannel

func (m *Update) GetUpdateChannel() *mtproto.PredUpdateChannel

func (*Update) GetUpdateChannelMessageViews

func (m *Update) GetUpdateChannelMessageViews() *mtproto.PredUpdateChannelMessageViews

func (*Update) GetUpdateChannelTooLong

func (m *Update) GetUpdateChannelTooLong() *mtproto.PredUpdateChannelTooLong

func (*Update) GetUpdateDeleteMessages

func (m *Update) GetUpdateDeleteMessages() *mtproto.PredUpdateDeleteMessages

func (*Update) GetUpdateNewChannelMessage

func (m *Update) GetUpdateNewChannelMessage() *mtproto.PredUpdateNewChannelMessage

func (*Update) GetUpdateNewEncryptedMessage

func (m *Update) GetUpdateNewEncryptedMessage() *mtproto.PredUpdateNewEncryptedMessage

func (*Update) GetUpdateNewMessage

func (m *Update) GetUpdateNewMessage() *mtproto.PredUpdateNewMessage

func (*Update) GetUpdateReadChannelInbox

func (m *Update) GetUpdateReadChannelInbox() *mtproto.PredUpdateReadChannelInbox

func (*Update) GetUpdateReadChannelOutbox

func (m *Update) GetUpdateReadChannelOutbox() *mtproto.PredUpdateReadChannelOutbox

func (*Update) GetUpdateReadMessagesContents

func (m *Update) GetUpdateReadMessagesContents() *mtproto.PredUpdateReadMessagesContents

func (*Update) GetUpdateShort

func (m *Update) GetUpdateShort() *mtproto.PredUpdateShort

func (*Update) GetUpdateShortChatMessage

func (m *Update) GetUpdateShortChatMessage() *mtproto.PredUpdateShortChatMessage

func (*Update) GetUpdateShortMessage

func (m *Update) GetUpdateShortMessage() *mtproto.PredUpdateShortMessage

func (*Update) GetUpdateShortSentMessage

func (m *Update) GetUpdateShortSentMessage() *mtproto.PredUpdateShortSentMessage

func (*Update) GetUpdates

func (m *Update) GetUpdates() *mtproto.PredUpdates

func (*Update) GetUpdatesDifference

func (m *Update) GetUpdatesDifference() *mtproto.PredUpdatesDifference

func (*Update) GetUpdatesDifferenceSlice

func (m *Update) GetUpdatesDifferenceSlice() *mtproto.PredUpdatesDifferenceSlice

func (*Update) GetUpdatesState

func (m *Update) GetUpdatesState() *mtproto.PredUpdatesState

func (*Update) GetValue

func (m *Update) GetValue() isUpdate_Value

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) Reset

func (m *Update) Reset()

func (*Update) String

func (m *Update) String() string

func (*Update) XXX_DiscardUnknown added in v0.4.1

func (m *Update) XXX_DiscardUnknown()

func (*Update) XXX_Marshal added in v0.4.1

func (m *Update) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Update) XXX_Merge added in v0.4.1

func (dst *Update) XXX_Merge(src proto.Message)

func (*Update) XXX_OneofFuncs

func (*Update) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Update) XXX_Size added in v0.4.1

func (m *Update) XXX_Size() int

func (*Update) XXX_Unmarshal added in v0.4.1

func (m *Update) XXX_Unmarshal(b []byte) error

type UpdateStreamerClient

type UpdateStreamerClient interface {
	ListenOnUpdates(ctx context.Context, in *ListenRequest, opts ...grpc.CallOption) (UpdateStreamer_ListenOnUpdatesClient, error)
}

func NewUpdateStreamerClient

func NewUpdateStreamerClient(cc *grpc.ClientConn) UpdateStreamerClient

type UpdateStreamerServer

type UpdateStreamerServer interface {
	ListenOnUpdates(*ListenRequest, UpdateStreamer_ListenOnUpdatesServer) error
}

type UpdateStreamer_ListenOnUpdatesClient

type UpdateStreamer_ListenOnUpdatesClient interface {
	Recv() (*Update, error)
	grpc.ClientStream
}

type UpdateStreamer_ListenOnUpdatesServer

type UpdateStreamer_ListenOnUpdatesServer interface {
	Send(*Update) error
	grpc.ServerStream
}

type Update_UpdateChannel

type Update_UpdateChannel struct {
	UpdateChannel *mtproto.PredUpdateChannel `protobuf:"bytes,13,opt,name=UpdateChannel,oneof"`
}

type Update_UpdateChannelMessageViews

type Update_UpdateChannelMessageViews struct {
	UpdateChannelMessageViews *mtproto.PredUpdateChannelMessageViews `protobuf:"bytes,14,opt,name=UpdateChannelMessageViews,oneof"`
}

type Update_UpdateChannelTooLong

type Update_UpdateChannelTooLong struct {
	UpdateChannelTooLong *mtproto.PredUpdateChannelTooLong `protobuf:"bytes,15,opt,name=UpdateChannelTooLong,oneof"`
}

type Update_UpdateDeleteMessages

type Update_UpdateDeleteMessages struct {
	UpdateDeleteMessages *mtproto.PredUpdateDeleteMessages `protobuf:"bytes,11,opt,name=UpdateDeleteMessages,oneof"`
}

type Update_UpdateNewChannelMessage

type Update_UpdateNewChannelMessage struct {
	UpdateNewChannelMessage *mtproto.PredUpdateNewChannelMessage `protobuf:"bytes,18,opt,name=UpdateNewChannelMessage,oneof"`
}

type Update_UpdateNewEncryptedMessage

type Update_UpdateNewEncryptedMessage struct {
	UpdateNewEncryptedMessage *mtproto.PredUpdateNewEncryptedMessage `protobuf:"bytes,12,opt,name=UpdateNewEncryptedMessage,oneof"`
}

type Update_UpdateNewMessage

type Update_UpdateNewMessage struct {
	UpdateNewMessage *mtproto.PredUpdateNewMessage `protobuf:"bytes,9,opt,name=UpdateNewMessage,oneof"`
}

type Update_UpdateReadChannelInbox

type Update_UpdateReadChannelInbox struct {
	UpdateReadChannelInbox *mtproto.PredUpdateReadChannelInbox `protobuf:"bytes,16,opt,name=UpdateReadChannelInbox,oneof"`
}

type Update_UpdateReadChannelOutbox

type Update_UpdateReadChannelOutbox struct {
	UpdateReadChannelOutbox *mtproto.PredUpdateReadChannelOutbox `protobuf:"bytes,17,opt,name=UpdateReadChannelOutbox,oneof"`
}

type Update_UpdateReadMessagesContents

type Update_UpdateReadMessagesContents struct {
	UpdateReadMessagesContents *mtproto.PredUpdateReadMessagesContents `protobuf:"bytes,10,opt,name=UpdateReadMessagesContents,oneof"`
}

type Update_UpdateShort

type Update_UpdateShort struct {
	UpdateShort *mtproto.PredUpdateShort `protobuf:"bytes,4,opt,name=UpdateShort,oneof"`
}

type Update_UpdateShortChatMessage

type Update_UpdateShortChatMessage struct {
	UpdateShortChatMessage *mtproto.PredUpdateShortChatMessage `protobuf:"bytes,3,opt,name=UpdateShortChatMessage,oneof"`
}

type Update_UpdateShortMessage

type Update_UpdateShortMessage struct {
	UpdateShortMessage *mtproto.PredUpdateShortMessage `protobuf:"bytes,2,opt,name=UpdateShortMessage,oneof"`
}

type Update_UpdateShortSentMessage

type Update_UpdateShortSentMessage struct {
	UpdateShortSentMessage *mtproto.PredUpdateShortSentMessage `protobuf:"bytes,6,opt,name=UpdateShortSentMessage,oneof"`
}

type Update_Updates

type Update_Updates struct {
	Updates *mtproto.PredUpdates `protobuf:"bytes,5,opt,name=Updates,oneof"`
}

type Update_UpdatesDifference

type Update_UpdatesDifference struct {
	UpdatesDifference *mtproto.PredUpdatesDifference `protobuf:"bytes,7,opt,name=UpdatesDifference,oneof"`
}

type Update_UpdatesDifferenceSlice

type Update_UpdatesDifferenceSlice struct {
	UpdatesDifferenceSlice *mtproto.PredUpdatesDifferenceSlice `protobuf:"bytes,8,opt,name=UpdatesDifferenceSlice,oneof"`
}

type Update_UpdatesState

type Update_UpdatesState struct {
	UpdatesState *mtproto.PredUpdatesState `protobuf:"bytes,1,opt,name=UpdatesState,oneof"`
}

Jump to

Keyboard shortcuts

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