bot

package
v0.0.0-...-fe38571 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const FirestoreEmulatorHost = "FIRESTORE_EMULATOR_HOST"

Variables

This section is empty.

Functions

func Config

func Config(w http.ResponseWriter, r *http.Request)

func Cron

func Cron(w http.ResponseWriter, r *http.Request)

Cron makes matches for pairing, and messages those people to notify them of their match it runs once per day at 8am (it's triggered with app engine's Cron service)

func MessagePairs

func MessagePairs(client *firestore.Client, ctx context.Context)

func MessageSolo

func MessageSolo(client *firestore.Client, ctx context.Context)

func PostDaily

func PostDaily(client *firestore.Client, ctx context.Context)

func Webhook

func Webhook(w http.ResponseWriter, r *http.Request)

TODO: Docstring here!

Types

type Messenger

type Messenger struct {
	Help          string `json:"help"`
	Subscribe     string `json:"subscribe"`
	Unsubscribe   string `json:"unsubscribe"`
	NotSubscribed string `json:"notSubscribed"`
	NotConfigured string `json:"notConfigured"`
	OddOneOut     string `json:"oddOneOut"`
	Matched       string `json:"matched"`
	WriteError    string `json:"writeError"`
	ReadError     string `json:"readError"`
}

func InitMessenger

func InitMessenger(filename string) Messenger

type Path

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

type Recurser

type Recurser struct {
	Id                 string     `structs:"id" firestore:"id"`
	Name               string     `structs:"name" firestore:"name"`
	Email              string     `structs:"email" firestore:"email"`
	IsSkippingTomorrow bool       `structs:"isSkippingTomorrow" firestore:"isSkippingTomorrow"`
	IsPairingTomorrow  bool       `structs:"isPairingTomorrow" firestore:"isPairingTomorrow"`
	Config             UserConfig `structs:"config" firestore:"config"`
}

type UserConfig

type UserConfig struct {
	Comments          string   `structs:"comments" firestore:"comments"`
	Environment       string   `structs:"environment" firestore:"environment"`
	Experience        string   `structs:"experience" firestore:"experience"`
	ProblemSet        string   `structs:"problemSet" firestore:"problemSet"`
	Topics            []string `structs:"topics" firestore:"topics"`
	SoloDays          []string `structs:"soloDays" firestore:"soloDays"`
	SoloDifficulty    []string `structs:"soloDifficulty" firestore:"soloDifficulty"`
	PairingDifficulty []string `structs:"pairingDifficulty" firestore:"pairingDifficulty"`
	ManualQuestion    bool     `structs:"manualQuestion" firestore:"manualQuestion"`
}

Jump to

Keyboard shortcuts

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