testutils

package
v0.0.0-...-b7abf87 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendResponder

func SendResponder(ctx context.Context,
	result <-chan interface{}) (httpmock.Responder, <-chan ReceivedMessage)

SendResponder helps to test telegram api. Returns received message to out channel, Waits for result channel with object to return in API. If result channel is nil, then returns empty telegram.Message. If result channel has error, then returns APIResponse with Ok False and Description.

func UpdatesResponder

func UpdatesResponder(ctx context.Context, ch <-chan []telegram.Update) httpmock.Responder

UpdatesResponder provides a useful responder that returns updates from ch

Types

type ReceivedMessage

type ReceivedMessage struct {
	Values url.Values
	URL    url.URL
}

ReceivedMessage contains information about message that are sent by api

Jump to

Keyboard shortcuts

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