bot

package
v0.0.0-...-84009fb Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoQuestion = Question{Term: string(rune(21))} // 21 is the NAK ASCII character

Functions

func Start

func Start()

Types

type Answer

type Answer struct {
	ID     string
	Text   string
	Author string
	Score  int
}

type AnswerProvider

type AnswerProvider interface {
	Ask(Question) ([]Answer, error)
}

func NewGoogleSheetAnswerProvider

func NewGoogleSheetAnswerProvider(srv *sheets.Service) AnswerProvider

type FeedbackProvider

type FeedbackProvider interface {
	Upvote(Answer) error
	Downvote(Answer) error
}

func NewGoogleSheetFeedbackProvider

func NewGoogleSheetFeedbackProvider(srv *sheets.Service) FeedbackProvider

type Question

type Question struct {
	Term string
}

type QuestionMatcher

type QuestionMatcher interface {
	Match(msg string) (Question, error)
}

func NewBasicQuestionMatcher

func NewBasicQuestionMatcher() QuestionMatcher

Jump to

Keyboard shortcuts

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