rss2telegram

package module
v0.0.0-...-2050bcf Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 13 Imported by: 0

README

rss2telegram

RSS feed for Telegram using Google Cloud Functions

Deployment

Copy .env.example.yaml to .env.yaml and put your values in there.

gcloud functions deploy RSS2Telegram --env-vars-file .env.yaml --runtime go113 --trigger-topic RSS2Telegram

Testing

gcloud pubsub topics publish RSS2Telegram --message ' '

Local Development

Set environemnt variables:

  • RSS_FEED_URL
  • TELEGRAM_BOT_API_TOKEN
  • TELEGRAM_CHAT_ID
  • GCP_PROJECT

Then run:

go run ./cmd/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RSS2Telegram

func RSS2Telegram(ctx context.Context, m PubSubMessage) error

RSS2Telegram is a background cloud function that retrives RSS feed and post updates to telegram. Uses such environment variables: - RSS_FEED_URL - TELEGRAM_BOT_API_TOKEN - TELEGRAM_CHAT_ID

Types

type PubSubMessage

type PubSubMessage struct{}

PubSubMessage is the payload of a Pub/Sub event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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