{"id":38802846,"url":"https://github.com/procyon-projects/procyon-web","last_synced_at":"2026-01-17T12:48:10.217Z","repository":{"id":49959721,"uuid":"265021351","full_name":"procyon-projects/procyon-web","owner":"procyon-projects","description":"It provides web support for Procyon Framework","archived":false,"fork":false,"pushed_at":"2022-03-21T19:21:45.000Z","size":205,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T08:18:00.228Z","etag":null,"topics":["go","golang","golang-library","http","procyon-web","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/procyon-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-18T18:07:22.000Z","updated_at":"2024-06-20T08:18:00.230Z","dependencies_parsed_at":"2022-09-22T13:23:26.265Z","dependency_job_id":null,"html_url":"https://github.com/procyon-projects/procyon-web","commit_stats":null,"previous_names":["rollcomp/procyon-web"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/procyon-projects/procyon-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procyon-projects%2Fprocyon-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procyon-projects%2Fprocyon-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procyon-projects%2Fprocyon-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procyon-projects%2Fprocyon-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/procyon-projects","download_url":"https://codeload.github.com/procyon-projects/procyon-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/procyon-projects%2Fprocyon-web/sbom","scorecard":{"id":745888,"data":{"date":"2025-08-11","repo":{"name":"github.com/procyon-projects/procyon-web","commit":"3385245aa8e322bf0ca6e9cbba8b019ca5ebbcd4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0355 / GHSA-fx95-883v-4q4h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T18:42:31.386Z","repository_id":49959721,"created_at":"2025-08-22T18:42:31.386Z","updated_at":"2025-08-22T18:42:31.386Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","golang","golang-library","http","procyon-web","web"],"created_at":"2026-01-17T12:48:10.101Z","updated_at":"2026-01-17T12:48:10.183Z","avatar_url":"https://github.com/procyon-projects.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"https://procyon-projects.github.io/img/logo.png\" width=\"128\"\u003e\n\n# Procyon Web\n[![Go Report Card](https://goreportcard.com/badge/github.com/procyon-projects/procyon-web)](https://goreportcard.com/report/github.com/procyon-projects/procyon-web)\n[![codecov](https://codecov.io/gh/procyon-projects/procyon-web/branch/master/graph/badge.svg?token=VDY94TAEKE)](https://codecov.io/gh/procyon-projects/procyon-web)\n[![Build Status](https://travis-ci.com/procyon-projects/procyon-web.svg?branch=master)](https://travis-ci.com/procyon-projects/procyon-web)\n[![Gitter](https://badges.gitter.im/procyon-projects/community.svg)](https://gitter.im/procyon-projects/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![PkgGoDev](https://pkg.go.dev/badge/procyon-projects/procyon)](https://pkg.go.dev/github.com/procyon-projects/procyon-web)\n\n\nThis gives you a basic understanding of Procyon Web Module. It covers\ncomponents provided by the framework, such as Controller, Handler Registry, Web Request Context\nand Interceptors.\n\n\nNote that you need to register your components by using the function **core.Register**.\n\n## Controller\nIt's used to define a struct as a **Controller Component** and register handler methods. If it is implemented by your struct,\nyour struct will be considered as a **Controller**.\n\n```go\ntype Controller interface {\n\tRegisterHandlers(registry HandlerRegistry)\n}\n```\n\n## Handler Registry\nIt's used to register handler methods.\n```go\ntype HandlerRegistry interface {\n\tRegister(info ...RequestHandler)\n\tRegisterGroup(prefix string, info ...RequestHandler)\n}\n```\n\n* **Register** is used to register a Request Handler.\n\n* **RegisterGroup** are used to register multiple Request Handlers.\n\n### Request Handler\nThey are used to get an instance of a request handler by request method.\n```go\nfunc Get(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\nfunc Post(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler \nfunc Put(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\nfunc Delete(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\nfunc Patch(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\nfunc Options(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\nfunc Head(handler RequestHandlerFunction, options ...RequestHandlerOption) RequestHandler\n```\n\n### Request Handler Options\nOptions are used to specify handler's properties like Path and Request Object.\n```go\nfunc RequestObject(requestObject RequestHandlerObject) RequestHandlerOption\nfunc Path(path string) RequestHandlerOption\n```\n\n* **RequestObject** is used to specify the request object. If you have a request type, you have to register it.\nOtherwise, **GetRequest** will throw an error.\n* **Path** is used to specify the path.\n\n## Web Request Context\n**WebRequestContext** implements the interface **context.Context** in procyon-context. That's why\nit has the methods the following.\n\n```go\nfunc (ctx *WebRequestContext) GetContextId() context.ContextId\nfunc (ctx *WebRequestContext) Get(key string) interface{}\nfunc (ctx *WebRequestContext) Put(key string, value interface{})\n```\n* **GetContextId** returns a Context Id. It is unique and consists of **UUID**. It can be used\nfor logging. \n* **Get** returns the value from context by the given key. If it is not found, it returns nil.\n* **Put** an key-value pair into context.\n\n\n```go\nfunc (ctx *WebRequestContext) Next()\n```\n* **Next** can only be invoked from **HandleBefore**. If you call it from other methods or\nfunctions, nothing will happen. When **Next** is invoked, it calls next interceptor implementing \n**HandlerInterceptorBefore**.\n\n```go\nfunc (ctx *WebRequestContext) GetRequest(request interface{})\nfunc (ctx *WebRequestContext) GetPathVariable(name string) string\nfunc (ctx *WebRequestContext) GetRequestParameter(name string) string\nfunc (ctx *WebRequestContext) GetHeaderValue(key string) string\n```\n\n* **GetRequest** is used to bind the request data to the instance of the request object.\n* **GetPathVariable** is used to get the path variable by name\n* **GetRequestParameter** is used to get the request parameter by name.\n* **GetHeaderValue** is used to get the header value by name.\n\n```go\nfunc (ctx *WebRequestContext) GetStatus() int\nfunc (ctx *WebRequestContext) SetStatus(status int) ResponseBodyBuilder\n\nfunc (ctx *WebRequestContext) SetBody(body interface{}) ResponseBodyBuilder\nfunc (ctx *WebRequestContext) GetBody() interface{}\n\nfunc (ctx *WebRequestContext) GetContentType() MediaType \nfunc (ctx *WebRequestContext) SetContentType(mediaType MediaType) ResponseBodyBuilder\n\nfunc (ctx *WebRequestContext) AddHeader(key string, value string) ResponseHeaderBuilder\n```\n* **GetStatus** is used to get the status.\n* **SetStatus** is used to set the status of response.\n* **SetBody** is used to set the body of response.\n* **GetBody** is used to get the body of response.\n* **GetContentType** is used to get the content type.\n* **SetContentType** is used to set the content type\n\n```go\nfunc (ctx *WebRequestContext) Ok() ResponseBodyBuilder\nfunc (ctx *WebRequestContext) NotFound() ResponseHeaderBuilder\nfunc (ctx *WebRequestContext) NoContent() ResponseHeaderBuilder\nfunc (ctx *WebRequestContext) BadRequest() ResponseBodyBuilder\nfunc (ctx *WebRequestContext) Accepted() ResponseBodyBuilder\nfunc (ctx *WebRequestContext) Created(location string) ResponseBodyBuilder\n```\n\n* **Ok** sets the status to 200.\n* **NotFound** sets the status to 404.\n* **NoContent** sets the status to 204.\n* **BadRequest** sets the status to 400.\n* **Accepted** sets the status to 202.\n* **Created** sets the status to 201.\n\n```go\nfunc (ctx *WebRequestContext) GetError() error\nfunc (ctx *WebRequestContext) SetError(err error)\nfunc (ctx *WebRequestContext) ThrowError(err error)\n```\n\n* **GetError** is used to get the error.\n* **SetError** is used to put the error into context.\n* **ThrowError** is used to throw an error. It's an alternative to **SetError**\n\n## Interceptors\nInterceptors are used to manipulate requests and responses. \n\n**HandlerBefore**,Handler Method and **HandlerAfter**, **HandleAfterCompletion** are invoked\nrespectively.\n\n### Interceptor Before\nIf you want to do something before handler method is executed, implement the interface \n**HandlerInterceptorBefore**.\n```go\ntype HandlerInterceptorBefore interface {\n\tHandleBefore(requestContext *WebRequestContext)\n}\n```\n### Interceptor After\nIf you want to do something after handler method is executed, implement the interface\n**HandlerInterceptorAfter**.\n```go\ntype HandlerInterceptorAfter interface {\n\tHandleAfter(requestContext *WebRequestContext)\n}\n```\n\n### Interceptor After Completion\nIf you want to do something after the request process is completed, implement the interface\n**HandlerInterceptorAfterCompletion**. **HandlerAfterCompletion** is invoked after response is\nreturned successfully or when any error occurs while request is processed. In case of an error,\nYou can get the error from request context.\n```go\ntype HandlerInterceptorAfterCompletion interface {\n\tHandleAfterCompletion(requestContext *WebRequestContext)\n}\n```\n\n## License\nProcyon Framework is released under version 2.0 of the Apache License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocyon-projects%2Fprocyon-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprocyon-projects%2Fprocyon-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprocyon-projects%2Fprocyon-web/lists"}