{"id":15930653,"url":"https://github.com/milerius/sza","last_synced_at":"2025-04-03T14:19:06.015Z","repository":{"id":111555217,"uuid":"114747990","full_name":"Milerius/sza","owner":"Milerius","description":"Simple Zia Api","archived":false,"fork":false,"pushed_at":"2019-04-06T17:23:40.000Z","size":223,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-01T21:52:35.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":false,"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/Milerius.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":"2017-12-19T09:51:29.000Z","updated_at":"2022-10-25T14:20:20.000Z","dependencies_parsed_at":"2023-05-29T10:10:13.715Z","dependency_job_id":null,"html_url":"https://github.com/Milerius/sza","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/Milerius%2Fsza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milerius%2Fsza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milerius%2Fsza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milerius%2Fsza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milerius","download_url":"https://codeload.github.com/Milerius/sza/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247014518,"owners_count":20869376,"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":[],"created_at":"2024-10-07T00:42:57.599Z","updated_at":"2025-04-03T14:19:05.984Z","avatar_url":"https://github.com/Milerius.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿## SZA (Simple Zia Api)\n\nHi and welcome to this minimalist API. The point of this API is to restrict in no way your conception or design choices.\n\nBy giving a simple Module interface, we believe that every group will be able to build its own Zia and not just the Zia that our API requires you to create.\n\n### Dependencies\n\n - C++ 17\n\n### How to build\n\nSimply clone this repository and include the .h files in the **api** folder.\n\n### What does SZA do :\n\nIt introduces four header files, each commented to show explicit usage :\n#### - conf.h\nConf is a simple map used to configure your module, it is inspired by the JSON format.\nBy making ConfValue a std::variant we allow users to choose themselves how they want to configure their module.\n\n#### - net.h\nContains :\n - The NetInfo struct and its components, used to provide infos on the client \n - The Net Interface for multithreaded network abstraction\n\n#### - http.h\nContains :\n - The HttpMessage struct, it contains the version, the headers and the packets\n - The HttpRequest struct, it inherits from HttpMessage and adds a Method enum class and an Uri as a String\n - The HttpResponse struct, it inherits from HttpMessage and adds a Status enum class\n\n - The **HttpDuplex** struct, it contains :\n\t1. A NetInfo struct,\n\t2. A packets vector for req and another for resp\n\t3. An HttpRequest struct and an HttpResponse struct.\n This struct is the **core** of our API and should be the one used during the entire processing of the request.\n\n#### - module.h\n Module is the interface to use for your module, it contains two method :\n - config, it takes a const Conf\u0026 and is used to configure your module depending on the state of your Conf\n - exec, it takes an HttpDuplex and should be the method that **applies** your module to the current HttpDuplex\n\n### How to use it :\n\nAfter loading your modules, just simply use something like :\n\n```C++\nmoduleReceive.config(conf);\nmoduleTreatRequest.config(conf);\nmoduleSend.config(conf);\nfor each request :\n\tHttpDuplex http;\n\tmoduleReceive.exec(http);\n\tmoduleTreatRequest.exec(http);\n\tmoduleSend.exec(http);\n```\n\nAbsolutely no need for any complicated conception when you can just use SZA.\n\n### Doxygen :\n\n[link](docs/doxygen/annotated.html)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilerius%2Fsza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilerius%2Fsza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilerius%2Fsza/lists"}