Code Monkey home page Code Monkey logo

savannah's Introduction

Savannah

This is a minimal order api using OpenID Connect

Prerequisite

  • go
  • docker
  • make
  • migrate

To get started:

git clone https://github.com/wxmbugu/savannah

build :

go build ./cmd/app/

setp postgres local:

make postgres

creatdb :

make creatdb

migrations:

make migrateup

run server:

./app

env setup:

 - Check the .env.example for reference

Routes

1. Authentication
1.1 Login

    URI: /login
    Method: GET, OPTIONS
    Description: Initiates the OpenID Connect login process and sets a callback cookie.

1.2 Google Callback

    URI: /auth/google/callback
    Method: GET, OPTIONS
    Description: Handles the callback from Google authentication.

2. Authenticated Routes

All authenticated routes are under the /v1 prefix and require authentication through OpenID Connect.
2.1 Create Customer

    URI: /v1/customers
    Method: POST, OPTIONS
    Description: Creates a new customer.

2.2 Get Customer

    URI: /v1/customers/{id}
    Method: GET, OPTIONS
    Description: Retrieves customer details based on the provided id.

2.3 Create Order

    URI: /v1/orders
    Method: POST, OPTIONS
    Description: Creates a new order.

2.4 Get Order

    URI: /v1/orders/{id}
    Method: GET, OPTIONS
    Description: Retrieves order details based on the provided id.

2.5 Get Item

    URI: /v1/items/{id}
    Method: GET, OPTIONS
    Description: Retrieves item details based on the provided id.

savannah's People

Contributors

wxmbugu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.