{"id":18875497,"url":"https://github.com/bygui86/go-cassandra","last_synced_at":"2026-02-17T12:30:17.404Z","repository":{"id":57708873,"uuid":"177299961","full_name":"bygui86/go-cassandra","owner":"bygui86","description":"Application with REST APIs persisted on Cassandra","archived":false,"fork":false,"pushed_at":"2020-03-15T16:05:09.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-31T01:43:24.631Z","etag":null,"topics":["cassandra","cassandra-database","go","golang","rest","rest-api","tutorial","tutorial-code"],"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/bygui86.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}},"created_at":"2019-03-23T14:37:51.000Z","updated_at":"2020-03-15T16:05:11.000Z","dependencies_parsed_at":"2022-09-26T21:20:42.900Z","dependency_job_id":null,"html_url":"https://github.com/bygui86/go-cassandra","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/bygui86%2Fgo-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bygui86%2Fgo-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bygui86%2Fgo-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bygui86%2Fgo-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bygui86","download_url":"https://codeload.github.com/bygui86/go-cassandra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239829204,"owners_count":19704030,"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":["cassandra","cassandra-database","go","golang","rest","rest-api","tutorial","tutorial-code"],"created_at":"2024-11-08T06:07:48.689Z","updated_at":"2026-02-17T12:30:17.366Z","avatar_url":"https://github.com/bygui86.png","language":"Go","readme":"\n# Go REST on Cassandra\n\n## Instructions\n\n1. Prepare environment\n\t```\n\tcd $GOPATH/src/github.com\n\tgit clone git@github.com:bygui86/go-cassandra.git\n\tcd bygui86/go-cassandra\n\tgo get ./...\n\t```\n\n2. Run cassandra\n\t```\n\tdocker run -d --name cassandra -p 7199:7199 -p 7000:7000 -p 7001:7001 -p 9160:9160 -p 9042:9042 cassandra\n\t```\n\n3. Create Cassandra keyspace and table\n   1. Open CQL connection\n\t\t```\n\t\tdocker exec -it cassandra cqlsh $(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cassandra)\n\t\t```\n   2. Create Cassandra keyspace\n\t\t```\n\t\tCREATE KEYSPACE golang WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};\n\t\t```\n   3. Create Cassandra table\n\t\t```\n\t\tUSE golang;\n\t\tCREATE TABLE users ( id UUID, firstname text, lastname text, age int, email text, city text, PRIMARY KEY (id) );\n\t\t```\n\n4. Run application\n\t```\n\tcd $GOPATH/src/github.com/bygui86/go-cassandra\n\tgo run main.go\n\t```\n\n5. Test some REST calls (see endpoints list below)\n\n---\n\n## REST endpoints\n\n* `GET http://localhost:8080/` heart beat\n* `POST http://localhost:8080/users/new` insert new user\n* `GET http://localhost:8080/users` get all users\n* `GET http://localhost:8080/users/{uuid}` get user by uuid\n\n`PLEASE NOTE`: See the postman collection for samples of the user JSON structure\n\n---\n\n## Links\n\n* [Tutorial](https://getstream.io/blog/building-a-performant-api-using-go-and-cassandra/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbygui86%2Fgo-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbygui86%2Fgo-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbygui86%2Fgo-cassandra/lists"}