Skip to content

A self contained example Golang API. A project to help me gain experience in writing Go code.

Notifications You must be signed in to change notification settings

dant89/go-sample-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-gopher-api

A lightweight Golang API framework. Aims to be easily extendable and customisable.

Usage

  1. Start the Docker containers: docker-compose up -d
  2. Create a default Cassandra keyspace and table (this will be automated in the future):
CREATE KEYSPACE IF NOT EXISTS go_gopher_api
    WITH replication = {'class': 'SimpleStrategy',
                        'replication_factor' : 1}

CREATE TABLE "go_gopher_api"."user" ("id" TIMEUUID, PRIMARY KEY (id));
ALTER TABLE "go_gopher_api"."user" ADD "name" TEXT;
ALTER TABLE "go_gopher_api"."user" ADD "email" TEXT;
  1. Start the API web server: go run src/api/server/main.go
  2. Run the example queries via the client: go run src/api/client/example/request.go

External libraries

This project is making use of the following third party libraries, check them out!

Why does this exist?

I'm building this to improve my Go programming. If people find it useful, that's a big bonus!

About

A self contained example Golang API. A project to help me gain experience in writing Go code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published