{"id":38169175,"url":"https://github.com/sleep2death/gotham","last_synced_at":"2026-01-16T23:24:25.515Z","repository":{"id":40373273,"uuid":"161037140","full_name":"sleep2death/gotham","owner":"sleep2death","description":"Gotham is a simple\u0026pure protobuffers tcp server written in go(Golang). It features a Gin-like API for easy access.","archived":false,"fork":false,"pushed_at":"2022-06-12T02:06:59.000Z","size":194,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T18:48:41.004Z","etag":null,"topics":["go","protobuf","server","socket","tcp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/sleep2death.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":"2018-12-09T12:30:43.000Z","updated_at":"2022-11-26T17:54:42.000Z","dependencies_parsed_at":"2022-08-09T18:42:21.414Z","dependency_job_id":null,"html_url":"https://github.com/sleep2death/gotham","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sleep2death/gotham","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleep2death%2Fgotham","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleep2death%2Fgotham/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleep2death%2Fgotham/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleep2death%2Fgotham/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleep2death","download_url":"https://codeload.github.com/sleep2death/gotham/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleep2death%2Fgotham/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28487586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T22:54:02.790Z","status":"ssl_error","status_checked_at":"2026-01-16T22:50:10.344Z","response_time":107,"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","protobuf","server","socket","tcp"],"created_at":"2026-01-16T23:24:25.286Z","updated_at":"2026-01-16T23:24:25.496Z","avatar_url":"https://github.com/sleep2death.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotham\n\n[![Build Status](https://travis-ci.com/sleep2death/gotham.svg?branch=master)](https://travis-ci.com/sleep2death/gotham)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sleep2death/gotham)](https://goreportcard.com/report/github.com/sleep2death/gotham)\n[![codecov](https://codecov.io/gh/sleep2death/gotham/branch/master/graph/badge.svg)](https://codecov.io/gh/sleep2death/gotham)\n\nA well-tested/high-performace tcp/protobuf router written in go, highly inspired by [Gin](https://github.com/gin-gonic/gin), and the source of standard http library:[net/http/server.go](https://github.com/golang/go/blob/master/src/net/http/server.go).\n\n## content\n\n-   [Installation](#installation)\n-   [Quick start](#quick-start)\n\n## Installation\n\nTo install gotham package, you need to install Go and set your Go workspace first.\n\n1. The first need [Go](https://golang.org/) installed (**version 1.11+ is required**), then you can use the below Go command to install Gotham.\n\n```sh\n$ go get -u github.com/sleep2death/gotham\n```\n\n2. Import it in your code:\n\n```go\nimport \"github.com/sleep2death/gotham\"\n```\n\n## Quick start\n\nAll examples you can find are in `/examples` folder.\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/golang/protobuf/proto\"\n\t\"github.com/golang/protobuf/ptypes\"\n\n\t\"github.com/sleep2death/gotham\"\n\t\"github.com/sleep2death/gotham/examples/pb\"\n)\n\nfunc main() {\n\t// SERVER\n\t// Starts a new gotham instance without any middleware attached.\n\trouter := gotham.New()\n\n\t// Define your handlers.\n\trouter.Handle(\"/pb/EchoMessage\", func(c *gotham.Context) {\n\t\tmessage := new(pb.EchoMessage)\n\n\t\t// If some error fires, you can abort the request.\n\t\tif err := proto.Unmarshal(c.Data(), message); err != nil {\n\t\t\tc.AbortWithStatus(http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\n\t\t// log.Printf(\"Ping request received at %s\", ptypes.TimestampString(message.Ts))\n\t\tmessage.Message = \"Pong\"\n\t\tmessage.Ts = ptypes.TimestampNow()\n\t\tc.Write(message)\n\t})\n\n\t// Run, gotham, Run...\n\taddr := \":9090\"\n\tlog.Fatal(router.Run(addr))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleep2death%2Fgotham","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleep2death%2Fgotham","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleep2death%2Fgotham/lists"}