🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/devopsfaith/krakend-rss

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/devopsfaith/krakend-rss

v1.4.0
Source
Go
Version published
Created
Source

Krakend RSS

Enable RSS encoding in the KrakenD framework

Notice: this package requires KrakenD >= 0.4

Documentation

For more details, check the auto-generated documentation: https://godoc.org/github.com/devopsfaith/krakend-rss

Using it

Just register the module before parsing your config and everything will work smoothly

rss.Register()

Build the example

Go 1.8 is a requirement

$ make

Run

Running it as a common executable, logs are send to the stdOut and some options are available at the CLI

$ ./krakend_rss_example
Usage of ./krakend_rss_example:
  -c string
    	Path to the configuration filename (default "/etc/krakend/configuration.json")
  -d	Enable the debug
  -p int
    	Port of the service

This is an example of a suitable json configuration

{
    "version": 1,
    "name": "TV shows gateway",
    "port": 8080,
    "cache_ttl": 3600,
    "timeout": "3s",
    "endpoints": [
        {
            "endpoint": "/showrss/{id}",
            "backend": [
                {
                    "host": [
                        "http://showrss.info/"
                    ],
                    "url_pattern": "/user/schedule/{id}.rss",
                    "encoding": "rss",
                    "group": "schedule",
                    "whitelist": ["items", "title"]
                },
                {
                    "host": [
                        "http://showrss.info/"
                    ],
                    "url_pattern": "/user/{id}.rss",
                    "encoding": "rss",
                    "group": "available",
                    "whitelist": ["items", "title"]
                }
            ]
        }
    ]
}

You can see the resulting output with this simple curl command (replace <YOUR_SHOWRSS_USER_ID> with your own id)

$ curl -i http://127.0.0.1:8080/showrss/<YOUR_SHOWRSS_USER_ID>

FAQs

Package last updated on 26 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts