{"id":18909963,"url":"https://github.com/jonasbn/pxy-redirect-ow-function","last_synced_at":"2026-03-07T12:30:19.025Z","repository":{"id":136289437,"uuid":"557344778","full_name":"jonasbn/pxy-redirect-ow-function","owner":"jonasbn","description":"Experimental open whisk function for deployment on DigitalOceans function platform","archived":false,"fork":false,"pushed_at":"2025-01-14T05:43:39.000Z","size":109,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T05:27:21.306Z","etag":null,"topics":["digitalocean","do","experiment","experimental","function","go","serverless"],"latest_commit_sha":null,"homepage":"https://pxy.fi/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonasbn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-25T14:16:55.000Z","updated_at":"2025-01-14T05:43:43.000Z","dependencies_parsed_at":"2024-04-26T09:37:44.695Z","dependency_job_id":"115bd905-77aa-476f-b98b-e7d940173ebb","html_url":"https://github.com/jonasbn/pxy-redirect-ow-function","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fpxy-redirect-ow-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fpxy-redirect-ow-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fpxy-redirect-ow-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fpxy-redirect-ow-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/pxy-redirect-ow-function/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239898462,"owners_count":19715212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digitalocean","do","experiment","experimental","function","go","serverless"],"created_at":"2024-11-08T09:38:49.790Z","updated_at":"2026-03-07T12:30:18.975Z","avatar_url":"https://github.com/jonasbn.png","language":"Go","readme":"# pxy-redirect-ow-function\n\n## Introduction\n\nThis is an experimental serverless implementation of the [pxy-redirect service][SERVICE] I have created for deployment on [DigitalOcean][DO].\n\nIt's goal is to take a short URL following a required format and redirect to the designated URL.\n\nThe scheme is:\n\n```text\n\u003cdomain\u003e/\u003cversion\u003e/\u003cfragment\u003e\n```\n\nRedirects to:\n\n```text\nhttps://\u003cdomain\u003e/\u003cversion\u003e/tools/clang/docs/DiagnosticsReference.html#\u003cfragment\u003e\n```\n\nExample:\n\n```text\nhttps://pxy.fi/5/rsanitize-address\n```\n\nRedirects to:\n\n```text\nhttps://releases.llvm.org/5.0.0/tools/clang/docs/DiagnosticsReference.html#rsanitize-address\n```\n\nDo note the version number is expanded from a single digit to a 3 part version number.\n\nThis scheme is used by [clang diagnostic flags matrix generator][GENERATOR]. Please see my [blog post][BLOG] for the long version.\n\n**pxy-redirect-ow-function** is transparent, so introduction of a version `16.0.0` would work out of the box. The pages utilizing the service and the generator however rely on human interaction in order to be updated.\n\n- [clang diagnostic flags matrix generator][GENERATOR]\n- [My TIL collection: clang diagnostic flags](http://jonasbn.github.io/til/clang/diagnostic_flags.html) (website)\n\n## Diagnostics\n\nThis is a collection of errors which can be emitted from the service. Not all are visible to the end user and not all error scenarios are documented.\n\nThis section and documentation is primarily aimed and what can be recovered from.\n\n### Unable to assemble URL (`400`)\n\nThis is the most common error it will provide additional information as to why the request was regarded as a bad request.\n\n#### **insufficient parts in provided url**\n\nThe the request does not contain enough parts to assemble the redirect target URL.\n\nThe URL should consist of 2 parts.\n\n1. Version number\n2. Fragment\n\n```text\nhttps://pxy.fi/\u003cversion number\u003e/\u003cfragment\u003e\n```\n\nDo note the version number is expanded from a single digit to a 3 part version number.\n\nLuckily command line options (fragments) are only introduced or removed in major versions (X.0.0).\n\n#### **first part of url is not a number**\n\nThe first part of the URL should be a number (integer), which is translated to a version number.\n\n```text\nhttps://pxy.fi/\u003cversion number\u003e/\u003cfragment\u003e\n```\n\nDo note the version number is expanded from a single digit to a 3 part version number.\n\nNot all numbers are supported since documentation for all versions is not available.\n\nTo my knowledge version ranging from `4.0.0` to `18.1.0` are supported, for reference these would be `4` and `18`.\n\nPlease visit the [releases.llvm.org][LLVM] website for more details and try the service, since the documentation might now be up to date with the service as for the supported versions.\n\n#### **second part of url is not a string**\n\nThe second part of the URL should be a string.\n\n```text\nhttps://pxy.fi/\u003cversion number\u003e/\u003cfragment\u003e\n```\n\nThe second part is the fragment.\n\nPlease visit the [releases.llvm.org][LLVM] website for more details.\n\nAn example of a good fragment, which is available in all versions is: `wall`\n\n```text\nhttps://pxy.fi/4/wall\n```\n\nRedirects to:\n\n```text\nhttps://releases.llvm.org/4.0.0/tools/clang/docs/DiagnosticsReference.html#wall\n```\n\nThe version number can be exchanged for a number between `4` and `15`.\n\n## Logging\n\nThe default log level is `INFO`\n\nIt can be set to `DEBUG` via an environment variable, see below.\n\nSee the article on [log levels][LOGLEVELS] for more information.\n\nThe logging is currently collected on [logtail](https://betterstack.com/logtail), from [Better Stack](https://betterstack.com/).\n\n## Monitoring\n\nCurrently the service is monitored using [Better Uptime](https://betteruptime.com/) from [Better Stack](https://betterstack.com/).\n\nA public status page is [available](https://status.pxy.fi/).\n\nIt monitors the following:\n\n- The reverse proxy (Nginx) via a health check\n- Calling a redirectable URL and checking the response code. The URL goes via the reverse proxy (Nginx) and the service (OpenWhisk)\n- The service (OpenWhisk) via a heartbeat\n\n## Environment Variables\n\nIf the environment variable `LOG_LEVEL` is specified as `debug` the log level will be set to `DEBUG`.\n\n## Resources and References\n\n- [DigitalOcean][DO]\n- [clang diagnostic flags matrix generator][GENERATOR]\n- [My TIL collection: clang diagnostic flags](https://github.com/jonasbn/til/blob/master/clang/diagnostic_flags.md) (GitHub)\n- [My TIL collection: clang diagnostic flags](http://jonasbn.github.io/til/clang/diagnostic_flags.html) (website)\n- [pxy-redirect][SERVICE] service\n- [pxy.fi][PXYFI] site\n- [llvm releases documentation site][LLVM]\n- [Log Levels][LOGLEVELS]\n\n[GENERATOR]: https://github.com/jonasbn/clang-diagnostic-flags-matrix\n[SERVICE]: https://github.com/jonasbn/pxy-redirect\n[BLOG]: https://dev.to/jonasbn/challenges-solutions-and-more-challenges-and-more-solutions-4j3f\n[DO]: https://www.digitalocean.com/\n[PXYFI]: https://pxy.fi/p/r/\n[LLVM]: https://releases.llvm.org/\n[LOGLEVELS]: https://betterstack.com/community/guides/logging/log-levels-explained/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fpxy-redirect-ow-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fpxy-redirect-ow-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fpxy-redirect-ow-function/lists"}