{"id":21455661,"url":"https://github.com/skyl/pango","last_synced_at":"2025-03-17T03:24:59.596Z","repository":{"id":66826837,"uuid":"136674055","full_name":"skyl/pango","owner":"skyl","description":"Playground and boilerplate for building Go microservices using Bazel build, Docker, etc","archived":false,"fork":false,"pushed_at":"2018-07-22T18:54:58.000Z","size":42,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T13:13:50.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-06-08T23:14:55.000Z","updated_at":"2023-03-10T09:17:18.000Z","dependencies_parsed_at":"2023-03-07T05:45:57.720Z","dependency_job_id":null,"html_url":"https://github.com/skyl/pango","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/skyl%2Fpango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyl%2Fpango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyl%2Fpango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyl%2Fpango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyl","download_url":"https://codeload.github.com/skyl/pango/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243966247,"owners_count":20376029,"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-11-23T05:13:02.926Z","updated_at":"2025-03-17T03:24:59.587Z","avatar_url":"https://github.com/skyl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prerequisites\n\nYou must first install the following:\n\n* Bazel\n* dep (TODO: wrap with Bazel)\n\n## Install Bazel\n\nOn a Mac:\n\n```\nbrew install bazel\n```\n\nOn a fresh install of Ubuntu 18.04 this might look like:\n\n```\nsudo apt update\nsudo apt upgrade\nsudo apt-get install pkg-config zip g++ zlib1g-dev unzip python\ncurl -L https://github.com/bazelbuild/bazel/releases/download/0.14.1/bazel-0.14.1-installer-linux-x86_64.sh \u003e bazel-installer.sh\nchmod +x bazel-installer.sh\n./bazel-installer.sh --user\necho \"export PATH=$HOME/bin:\\$PATH\" \u003e\u003e ~/.bashrc\n```\n\n## Install dep\n\nOn a Mac:\n\n```\nbrew install dep\n```\n\nOn Ubuntu:\n\n```\nsudo apt install go-dep\n```\n\n# Clone, Install dependencies and Bazel BUILD files\n\nClone this repository:\n\n```\ngit clone https://github.com/skyl/pango\ncd pango\n```\n\nSet your GOPATH to the root of this repository:\n\n```\nexport GOPATH=`pwd`\n```\n\nInstall 3rd party dependencies with dep:\n\n```\n# TODO wrap this up completely within Bazel?\ncd src/pango\ndep ensure\ncd ../..\n```\n\nUse Gazelle to add Bazel build files in the vendor directory:\n\n```\nbazel run //:gazelle\n```\n\n# Test\n\n```\n# TODO: the vendor directory messes this up a little bit\nbazel test //src/pango/lib/...\nbazel test //src/pango/services/...\n```\n\n# Build\n\n```\n# TODO: the vendor directory messes this up a little bit\nbazel build //src/pango/lib/...\nbazel build //src/pango/services/...\n```\n\n# Run Hello World\n\n```\nbazel run //src/pango/services/hello\n```\n\n# Run the Goa Service example\n\n```\nbazel run //src/pango/services/cellar\n```\n\n# Run the JWT token authorization service\n\n```\nbazel run //src/pango/services/auth\n```\n\n# Run a resource that requires the auth bearer token\n\n```\nbazel run //src/pango/services/aresource\n```\n\n# Work with `goagen`\n\nWe haven't quite figured out how we are going to handle dependencies,\nespecially dev tools outside of Bazel.\nIdeally we are going to use eg dep and/or bazel to have locked dependencies\nwithout checking in the 3rd party libraries into the git history. However,\nwe need to figure out how this works for binary dev tools such as goagen.\nFor now, use `go get` as described here: https://goa.design/learn/guide/\n. Then, check in the goa artifacts.\n\n# Installing new (Go) dependencies\n\nAll 3rd party deps are managed with `dep`.\n\n```\ncd src/pango\ndep ensure -add foo/bar\n# or, if already imported, just:\ndep ensure\n```\n\nThese are then translated to Bazel with Gazelle:\n\n```\nbazel run //:gazelle\n```\n\n# Updating the Bazel build files for Go packages\n\nWhen you add a service or dependency to the monorepo, you need to create\nbuild files so that Bazel will know how to build yourthing and what will\nneed to be rebuilt when yourthing changes. Luckily this can be automated\nwith Gazelle:\n\n```\nbazel run //:gazelle\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyl%2Fpango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyl%2Fpango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyl%2Fpango/lists"}