{"id":18067563,"url":"https://github.com/geertjohan/ango","last_synced_at":"2025-03-28T11:30:39.620Z","repository":{"id":14041957,"uuid":"16744510","full_name":"GeertJohan/ango","owner":"GeertJohan","description":"ango is a tool that generates a protocol for communication between Go and AngularJS over http/websockets.","archived":true,"fork":false,"pushed_at":"2014-11-24T15:25:48.000Z","size":895,"stargazers_count":15,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T12:53:24.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeertJohan.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}},"created_at":"2014-02-11T20:33:16.000Z","updated_at":"2024-08-26T07:08:18.000Z","dependencies_parsed_at":"2022-09-26T20:00:54.077Z","dependency_job_id":null,"html_url":"https://github.com/GeertJohan/ango","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/GeertJohan%2Fango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeertJohan%2Fango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeertJohan%2Fango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeertJohan%2Fango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeertJohan","download_url":"https://codeload.github.com/GeertJohan/ango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246020723,"owners_count":20710806,"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-31T07:09:47.545Z","updated_at":"2025-03-28T11:30:39.311Z","avatar_url":"https://github.com/GeertJohan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Build Status](https://drone.io/github.com/GeertJohan/ango/status.png)](https://drone.io/github.com/GeertJohan/ango/latest)\n[![Issues](http://img.shields.io/github/issues/GeertJohan/ango.svg?style=flat-square)](https://github.com/GeertJohan/ango/issues)\n\n## Ango: AngularJS \u003c-\u003e Go communication\n\n`ango` is a tool that generates a protocol and API's for communication between [Go](http://golang.org) and [AngularJS](http://angularjs.org) over websockets.\n\n**This project is under development and API's are likely to break.**\n\n### Goals\n\nThe main goals are:\n - async server \u003e client RPC.\n - async client \u003e server RPC.\n - typed arguments and return values (see types below).\n - compatibility with Go packages `net/http` and `encoding/json`.\n - integrate into AngularJS as includable `module` providing a `service`.\n - underlying protocol and communication is not directly visible for user. Calls feel native/local.\n\nWhat I don't want to do (not goals):\n - runtime discovery of available procedures.\n - A generic protocol designed for multiple languages/frameworks.\n\nI chose to create a tool that generates Go and Angular/javascript without external dependencies, so the generated server and client code contain all information to communicate.\n\nGenerated Go code is a self-contained package without external imports. The generated code/package is to be imported by the application implementing/using the ango service.\n\nFor the client side a single `.js` file is generated containing an angular module. The module can be included by any other angular module.\n\n### Terminology\nA **service** exists of one or more **procedures** defined on the server- and/or client-side.\nA **procedure** within a service is implemented on either the client- or server-side, and can be called by the other side.\nA procedure can have zero or more arguments and zero or more return values.\n\n### Notes\nSeveral files describe the working of ango.\n\n - read [ango-definitions.md](notes/ango-definitions.md) about the .ango definition statements\n - read [types.md](notes/types.md) about the available types with ango procedures\n - read [protocol.md](notes/protocol.md) about the websockets/json protocol\n - read [thoughts.md](notes/thoughts.md) for idea's and upcomming features.\n\n### Development\n\n#### Devtool\nThis project involves several packages. There's a simple tool to automatically run and update the workspace as you go.\nTo run the tool, cd into the root folder (ango) and run: `sh tools/dev/run.sh`.\nThe devtool performs the following:\n - Watch ango cmd source (and imported packages) and re-build ango cmd on change.\n - Watch example source (and imported packages) and re-build on change.\n - Re-generate example ango service when ango tool was re-build or when .ango file changes or when a template changes.\n\n#### Packages \u0026 directories\nThe ango source is divided into seperate packages:\n - `ango/definitions` contains types and strucutures defining an ango service. ([view godoc](http://godoc.org/github.com/GeertJohan/ango/definitions))\n - `ango/parser` implements a simple `.ango` definition file parser. The package provides functions and methods that are to be used directly by the generator and/or templates.\n - `ango` (main) is the cmd utilizing the above packages and contains the generators.\n\nThese packages exist to seperate logic and make it easier to create a more advanced parser (maybe using [yacc](http://golang.org/cmd/yacc/) and [nex](https://github.com/blynn/nex)).\n\nSome other directories exist:\n - `ango/example` contains an example using ango. ([more info](example/README.md))\n - `ango/idea` old folder, marked for removal.\n - `ango/notes` documentation and ideas for this project.\n - `ango/templates` contains the templates used by the generators and are included by [go.rice](https://github.com/GeertJohan/go.rice).\n - `ango/tools/dev` contains the dev tool described above.\n - `ango/tools/publish` contains a tool ran by drone.io to build and preserve standalone binaries (linked in the download section below).\n\n### TODO\nThere are still lots of things to do. Check out the [issues](https://github.com/GeertJohan/ango/issues) list. Please contact me if you would like to contribute.\n\n### Download\nAt this time, automated builds are only available for linux_amd64. Download [release](https://drone.io/github.com/GeertJohan/ango/files/ango-release) for production. Or get the [latest](https://drone.io/github.com/GeertJohan/ango/files/ango-latest) build (nightly).\n\n**Note on pretty javascript:** When [js-beautify](https://github.com/einars/js-beautify) is installed, it is used to clean up the generated javascript.\n\n### License\nThis project is licensed under a Simplified BSD license. Please read the [LICENSE file](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeertjohan%2Fango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeertjohan%2Fango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeertjohan%2Fango/lists"}