freetext_fetcher

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextActionKey  = "id"
	ContextMessageKey = "message"
	ContextPayloadKey = "payload"

	ContextNewMessage = "new_message"
	ContextNewPayload = "new_payload"

	CancelAction = "cancel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FreetextFetcher

type FreetextFetcher interface {
	MessageHasBeenPosted(c *plugin.Context, post *model.Post, api plugin.API, loggerBot logger.Logger, botUserID string, pluginURL string)
	StartFetching(userID string, payload string)
	UpdateHooks(validate func(string) string, onFetch func(string, string), onCancel func(string))
	URL() string
}

func NewFreetextFetcher added in v0.1.10

func NewFreetextFetcher(baseURL string, store FreetextStore, validate func(string) string, onFetch func(string, string), onCancel func(string), r *mux.Router, posterBot poster.Poster) FreetextFetcher

type FreetextStore

type FreetextStore interface {
	StartFetching(userID, fetcherID string, payload string) error
	StopFetching(userID, fetcherID string) error
	ShouldProcessFreetext(userID, fetcherID string) (bool, string, error)
}

type Manager

type Manager interface {
	MessageHasBeenPosted(c *plugin.Context, post *model.Post, api plugin.API, loggerBot logger.Logger, botUserID string, pluginURL string)
	Clear()
}

func GetManager

func GetManager() Manager

Directories

Path Synopsis
Package mock_freetext_fetcher is a generated GoMock package.
Package mock_freetext_fetcher is a generated GoMock package.

Jump to

Keyboard shortcuts

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