{"id":36496742,"url":"https://github.com/cheikhshift/momentum","last_synced_at":"2026-01-12T02:04:42.824Z","repository":{"id":82236267,"uuid":"110858316","full_name":"cheikhshift/momentum","owner":"cheikhshift","description":"GopherSauce.com RPC auto-gen 📦 . Etymology of name : Angular + momentum [DEPRECATED]","archived":false,"fork":false,"pushed_at":"2018-11-03T12:23:28.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-05T22:39:59.463Z","etag":null,"topics":["rpc-framework","rpc-service"],"latest_commit_sha":null,"homepage":"http://gophersauce.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheikhshift.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-11-15T16:28:49.000Z","updated_at":"2018-11-03T12:23:29.000Z","dependencies_parsed_at":"2023-03-09T19:00:41.130Z","dependency_job_id":null,"html_url":"https://github.com/cheikhshift/momentum","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cheikhshift/momentum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheikhshift%2Fmomentum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheikhshift%2Fmomentum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheikhshift%2Fmomentum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheikhshift%2Fmomentum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheikhshift","download_url":"https://codeload.github.com/cheikhshift/momentum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheikhshift%2Fmomentum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rpc-framework","rpc-service"],"created_at":"2026-01-12T02:02:31.515Z","updated_at":"2026-01-12T02:04:42.814Z","avatar_url":"https://github.com/cheikhshift.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [DEPRECATED]\nIncompatible with Gopher Sauce +v0.6.0\n\n### Momentum\n\nA GopherSauce package to convert template and func tags into accessible Javascript functions. The goal of this project is to be able to: 1) generate your templates on your server  2) Ease access to server side functionality.\n\n## Without GopherSauce\nDownload the CLI to build RPC functions without GopherSauce. Find it [here](https://github.com/cheikhshift/momentum/tree/master/cmd/momentum-cli)\n\n## Requirements\n- [GopherSauce](http://gophersauce.com)\n\n## How it works\n\n### Install\nAdd this import tag to the root of your `gos.gxml` file. Within the `\u003cgos\u003e` tag. This will activate momentum within your project. Remember to include the funcfactory within the pages you wish to use these functions. `\u003cscript src=\"/funcfactory.js\"\u003e\u003c/script\u003e`\n\n\t\u003cimport src=\"github.com/cheikhshift/momentum/gos.gxml\"\u003e\n\n### Templates\nEach template created will have a JS function equivalent with the same name. The format of the generated functions are as follows :\t\n\n\tfunction TemplateName(ObjectWithInterfaceFields, function callback(StringOfRenderedTemplate) {} )\n\nNotes :  Replace TemplateName with the string specified as the name attribute of your template tag. `ObjectWithInterfaceFields` is a JS object that will be converted to the interface specified within your template tag's `struct` attribute. On error, the reason why will be returned instead of the template HTML.\n\n\n### Funcs\nEach `func` tag within your `\u003cmethods\u003e` section will generate a JS equivalent function. To better visualize this follow the example below.\nNotes : Channels are not supported as a valid type within `var` and `return` attributes of your func tag. Using the term `args ...interface` will not work as well. This is why the `\u003cfunc\u003e` tag was introduced, to provide users with a tag to explicitly declare variable types. With this in mind `\u003cmethod\u003e` tags will not work with JS function factory because it relies `args ..interface` to pass variables.\n\nA sample `\u003cfunc\u003e` tag is declared within the methods section of a `gos.gxml` file. The return type specifies names returned values.\n\n\t \u003cfunc name=\"TestAdd\" var=\"varx string,numv int\" return=\"(test string, err error)\"\u003e\n\t\terr = errors.New(\"error test on GOOOO\")\t\n\t\t\ttest  = \"Test\" + varx\n\t\t\treturn \n\t\u003c/func\u003e\n\nThe previous func tag will generate JS function : (The variable definitions carry over to javascript.)\n\n\tfunction TestAdd(Varx,Numv, function callback(ObjectResponse, success) )\n\n\nNotes :  ObjectResponse variable is an object with your function's returned values. With this `\u003cfunc\u003e` tag,  the ObjectResponse will have keys `err` and `test` following the tag's return attribute. Success is an indication of successful method invocation. On error, Object response will have one key : `error`, which is a string explanation of why the request failed.\n\n**More notes : You must specify the names of the return types as well, AKA `Named returned values`. These names will be used as key names to your response oject.\n\n*** Angular notes : If you plan on using Angular JS, use this $scope function to update your data after setting it within your callback `$scope.$apply();`.\n\n#### Api format\nYou can access each of your functions via server URI `/momentum/funcs`.\n\n##### Get Parameters\n- name : specifies the name of the function to invoke.\n\n##### Post Body\nThe body is used to pass a json of your function's variables/parameters. Each json key should match a correponding function variable name, with that variable's data specified as the key's value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheikhshift%2Fmomentum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheikhshift%2Fmomentum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheikhshift%2Fmomentum/lists"}