All Projects → crwgregory → golang-api-skeleton

crwgregory / golang-api-skeleton

Licence: GPL-3.0 license
Go Golang API Skeleton

Programming Languages

go
31211 projects - #10 most used programming language
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to golang-api-skeleton

SkeletonMatching
This repository implements skeleton matching algorithm.
Stars: ✭ 30 (+25%)
Mutual labels:  skeleton
msk-STAPLE
STAPLE (Shared Tools for Automatic Personalised Lower Extremity modelling) consists of a collection of methods for generating skeletal models from three-dimensional bone geometries, usually segmented from medical images. The methods are currently being expanded to create complete musculoskeletal models.
Stars: ✭ 39 (+62.5%)
Mutual labels:  skeleton
ExpressQL
A Ready-to-Go API Skeleton using Node.js + Express.js + GraphQL + MongoDB + JWT Authentication
Stars: ✭ 12 (-50%)
Mutual labels:  skeleton
nixkell
A simple Nix-Haskell skeleton
Stars: ✭ 63 (+162.5%)
Mutual labels:  skeleton
tb-grid
tb-grid is a super simple and lightweight 12 column responsive grid system utilizing css grid.
Stars: ✭ 19 (-20.83%)
Mutual labels:  skeleton
angular-cli-skeleton
angular-cli skeleton to quickly start a new project with advanced features and best practices. All features are described in README.md.
Stars: ✭ 32 (+33.33%)
Mutual labels:  skeleton
grav-skeleton-knowledge-base
Skeleton package of the Knowledge Base theme for Grav CMS
Stars: ✭ 22 (-8.33%)
Mutual labels:  skeleton
SemartSkeleton
Symfony Skeleton
Stars: ✭ 49 (+104.17%)
Mutual labels:  skeleton
aurelia-typescript-boilerplate
A starter kit for building a standard navigation-style app with Aurelia, typescript and webpack by @w3tecch
Stars: ✭ 18 (-25%)
Mutual labels:  skeleton
app
Aplus Framework App Project
Stars: ✭ 338 (+1308.33%)
Mutual labels:  skeleton
Skeleton-EJS
A front-end template build upon Rosid.
Stars: ✭ 13 (-45.83%)
Mutual labels:  skeleton
pose2action
experiments on classifying actions using poses
Stars: ✭ 24 (+0%)
Mutual labels:  skeleton
nova-skeletons
CSS Utility library to create beautiful skeleton screens
Stars: ✭ 28 (+16.67%)
Mutual labels:  skeleton
glfw-skeleton
💀 A skeleton OpenGL C++ app bootstrapped with glfw, glad, and glm.
Stars: ✭ 24 (+0%)
Mutual labels:  skeleton
Skeleton
Skeleton is a Social Engineering tool attack switcher
Stars: ✭ 44 (+83.33%)
Mutual labels:  skeleton
grav-skeleton-gravcart
The Grav Shopping Cart skeleton
Stars: ✭ 11 (-54.17%)
Mutual labels:  skeleton
skinner
Skin export / import tools for Autodesk Maya
Stars: ✭ 68 (+183.33%)
Mutual labels:  skeleton
SlimREST
An app skeleton for building a REST API with the Slim PHP Micro-Framework
Stars: ✭ 22 (-8.33%)
Mutual labels:  skeleton
phalcon-micro-rest-api-skeleton
This is a basic API REST skeleton written on Phalcon PHP. Great For building an MVP for your frontend app (Vue, react, angular, or anything that can consume an API)
Stars: ✭ 57 (+137.5%)
Mutual labels:  skeleton
larapi
Opinated API Skeleton created with Laravel
Stars: ✭ 47 (+95.83%)
Mutual labels:  skeleton

Golang Skeleton API

This is a project to help you get up an running fast with a secure, light weight, extensible api structure.

Skill level

Intermediate This project gives you a basic structure to work with.

Prerequisites:

  • Docker
  • Secret Key Generation and handling (for JWT's)
  • MySQL

Features

  • Built in load balancer
  • MC (MVC with out the view) esc structure
  • Request logging to NoSql DynamoDB
  • JWT Generation for user authentication

Application Structure

Routing & Request workflow:

Routing in the API takes a slightly different approach from an MVC architecture. Step by step:

  1. Initial Request: Request comes in and a handler is found that maps to the base request. See main.go's routes.
  2. Handlers: The handler registers it's own routes and passes them to a routing function that parses the path and determines which callback function to call.
  3. Handler Functions: The called handler function instantiates the proper record and calls the associated functions and returns the resulting response.
  4. Records: A Record is a representation of a database table in the form a struct. It holds all the necessary Queries.
  5. Connection: A connection is a connection to a data source.

Other Things

Request Logging

The api is set up to log requests to a dynamodb on AWS. You must supply the proper credentails for the api to connect to the service. See amazons credential documentation. You can comment out where the log is pushed to the log channel in the RouteController function in the handler.go file if you want to disable logging.

Creating a super secret key

If you need to generate a key for your server: run the script in the templates folder in the docker folder, that will generate a byte key that will then be copied to the docker container and be used for generating jwt's and hashing passwords.

Verbose

Verbose can be turned off in the Dockerfile under API_VERBOSE. Verbose will print err's and stack traces when set in the api response.

External libraries

SHA3

Contributing

Feel free to open any and all pull requests. :D

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].