e2e

package
v0.45.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package e2e contains updates.Engine tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBuilder

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

EventBuilder struct.

func (*EventBuilder) SendMessage

func (e *EventBuilder) SendMessage(from *tg.PeerUser, peer tg.PeerClass, text string)

SendMessage send a new message.

type Handler

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

Handler handles updates.

func NewHandler

func NewHandler() *Handler

NewHandler creates new update handler.

func (*Handler) ChannelTooLong

func (h *Handler) ChannelTooLong(channelID int)

ChannelTooLong handler.

func (*Handler) HandleDiff

func (h *Handler) HandleDiff(diff updates.DiffUpdate) error

HandleDiff handler.

func (*Handler) HandleUpdates

func (h *Handler) HandleUpdates(ents *updates.Entities, upds []tg.UpdateClass) error

HandleUpdates handler.

type Server

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

Server for testing gaps.

func NewServer

func NewServer() *Server

NewServer creates new test server.

func (*Server) CreateEvent

func (s *Server) CreateEvent(f func(ev *EventBuilder)) *tg.Updates

CreateEvent creates new event.

func (*Server) UpdatesGetChannelDifference

func (s *Server) UpdatesGetChannelDifference(
	ctx context.Context, request *tg.UpdatesGetChannelDifferenceRequest,
) (tg.UpdatesChannelDifferenceClass, error)

UpdatesGetChannelDifference returns difference between local and remote channel states.

func (*Server) UpdatesGetDifference

func (s *Server) UpdatesGetDifference(ctx context.Context, request *tg.UpdatesGetDifferenceRequest) (tg.UpdatesDifferenceClass, error)

UpdatesGetDifference returns difference between local and remote states.

func (*Server) UpdatesGetState

func (s *Server) UpdatesGetState(ctx context.Context) (*tg.UpdatesState, error)

UpdatesGetState returns current remote state.

Jump to

Keyboard shortcuts

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