Skip to content

A proxy server convert from any sources to iCalendar via OPA/Rego

License

Notifications You must be signed in to change notification settings

ryodocx/ical-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ical-proxy

lint CodeQL Go Report Card GoDoc

A proxy server convert from any sources to iCalendar via OPA/Rego

architecture

Feature

Usage

  • Docker Image is here
    • docker pull ghcr.io/ryodocx/ical-proxy:v1

Redmine Source

# show help
$ docker run --rm -it ghcr.io/ryodocx/ical-proxy redmine -h

# edit .env
$ cat .env
ICALPROXY_REDMINE_URL="https://redmine.example.com/path/"
ICALPROXY_REDMINE_APIKEY="<redacted>"
ICALPROXY_REDMINE_QUERY="query_id=xxx"

# edit ./configs/ical.simple.rego

# run
$ docker compose up -d
$ curl http://localhost:8080

Subscribe

Convert & Filtering

expected data after through OPA

{
    "allowed": true, // if false, event is ignored
    "event": {
        "UID": "<UniqID>",
        "SUMMARY": "<title>",
        "DTSTART;VALUE=DATE": "YYYYMMDD"
        
    }
}

iCal output example

BEGIN:VCALENDAR
BEGIN:VEVENT
UID:https://redmine.example.com/issues/1
SUMMARY:subject1
DESCRIPTION:description1
DTSTART;VALUE=DATE:20220717
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
UID:https://redmine.example.com/issues/2
SUMMARY:subject2
DESCRIPTION:description2
DTSTART;VALUE=DATE:20220718
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR