dolista

package module
v0.0.0-...-e9c821f Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 17 Imported by: 0

README

dolista-safado

Telegram bot to handle absurd requests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleMessage

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

Types

type ByCreatedDate

type ByCreatedDate []*firestore.DocumentSnapshot

func (ByCreatedDate) Len

func (d ByCreatedDate) Len() int

func (ByCreatedDate) Less

func (d ByCreatedDate) Less(i, j int) bool

func (ByCreatedDate) Swap

func (d ByCreatedDate) Swap(i, j int)

type Chat

type Chat struct {
	Id int `json:"id"`
}

A Telegram Chat indicates the conversation to which the message belongs.

type Config

type Config struct {
	TelegramToken  string `json:"telegramToken"`
	FirebaseConfig struct {
		Type                    string `json:"type"`
		ProjectID               string `json:"project_id"`
		PrivateKeyID            string `json:"private_key_id"`
		PrivateKey              string `json:"private_key"`
		ClientEmail             string `json:"client_email"`
		ClientID                string `json:"client_id"`
		AuthURI                 string `json:"auth_uri"`
		TokenURI                string `json:"token_uri"`
		AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
		ClientX509CertURL       string `json:"client_x509_cert_url"`
	} `json:"firebaseConfig"`
}

Config represents the application config params

type Message

type Message struct {
	Text string `json:"text"`
	Chat Chat   `json:"chat"`
}

Message is a Telegram object that can be found in an update.

type SummaryItem

type SummaryItem struct {
	ChatID  int    `json:"chat_id"`
	Message string `json:"message"`
}

SummaryItem represents one of the items that can be held by a summary

type Update

type Update struct {
	UpdateId int     `json:"update_id"`
	Message  Message `json:"message"`
}

Update is a Telegram object that the handler receives every time an user interacts with the bot.

Jump to

Keyboard shortcuts

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