Coder Social home page Coder Social logo

microservice-todolist's Introduction

microservice-toDoList

A golang microservice framework built upon on gin, gorm, redis, grpc, etcd. The project follows the principles of clean architecture.

redis is used to store user tokens as a caching system. gRPC is used to manage communication between the gateway and microservices. etcd is used to handle service registration and discovery.

Main Dependencies

  • gin
  • gorm
  • redis
  • etcd
  • grpc
  • jwt-go
  • logrus
  • viper
  • protobuf

Directory Structure

Overall structure

├── app
│   ├── gateway
│   ├── task
│   └── user
├── config
│   ├── redis
│   └── sql
├── doc
├── global
├── pkg
│   ├── eTcd
│   ├── errmsg
│   ├── pb
│   │   ├── task_pb
│   │   └── user_pb
│   ├── resp
│   └── util
│       └── jwts
├── setting

Gateway structure

/gateway
├── cmd
├── internal
│   ├── cache
│   └── http
├── middleware
├── routes
└── rpc

User/Task service structure

/user
├── cmd
└── internal
    ├── repository
    │   ├── dao
    │   └── model
    └── service

How to run

docker-compose up -d
go run app/user/cmd/main.go
go run app/task/cmd/main.go

4.(gateway must be the final)

go run app/gateway/cmd/main.go

Test API

launch postman

postman postman postman

microservice-todolist's People

Contributors

hoyyul avatar

Stargazers

 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.