All Projects โ†’ learning-cloud-native-go โ†’ Myapp

learning-cloud-native-go / Myapp

Licence: mit
๐Ÿ–ฅ๏ธ How to build a Dockerized RESTful API application using Go.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Myapp

Go Zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
Stars: โœญ 13,156 (+7593.57%)
Mutual labels:  microservice, restful-api, cloud-native
Spring Boot Microservices
This repo is part of a tutorial about writing microservices using Spring Boot
Stars: โœญ 79 (-53.8%)
Mutual labels:  microservice, tutorial
Jina Hub
An open-registry for hosting Jina executors via container images
Stars: โœญ 71 (-58.48%)
Mutual labels:  microservice, cloud-native
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes โšก Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: โœญ 2,559 (+1396.49%)
Mutual labels:  microservice, cloud-native
Html Pdf Service
LGPL V3. Java Spring Boot microservice with RESTful webconsole and service endpoints that convert HTML to PDF, optionally styling with CSS and templating with JSON using Flying Saucer, PDF Box and Jackson libraries. Available on Docker Hub.
Stars: โœญ 12 (-92.98%)
Mutual labels:  microservice, restful-api
Kong
๐Ÿฆ The Cloud-Native API Gateway
Stars: โœญ 30,838 (+17933.92%)
Mutual labels:  microservice, cloud-native
Staffjoy
ๅพฎๆœๅŠก(Microservices)ๅ’Œไบ‘ๅŽŸ็”Ÿๆžถๆž„ๆ•™ๅญฆๆกˆไพ‹้กน็›ฎ๏ผŒๅŸบไบŽSpring Bootๅ’ŒKubernetesๆŠ€ๆœฏๆ ˆ
Stars: โœญ 1,391 (+713.45%)
Mutual labels:  microservice, cloud-native
Django Rest Framework Tutorial
Django-REST-framework ๅŸบๆœฌๆ•™ๅญธ - ๅพž็„กๅˆฐๆœ‰ DRF-Beginners-Guide ๐Ÿ“
Stars: โœญ 630 (+268.42%)
Mutual labels:  restful-api, tutorial
Microservice Rs
Tutorial codebase for writing a microservice in Rust
Stars: โœญ 114 (-33.33%)
Mutual labels:  microservice, tutorial
Motan Openresty
A cross-language RPC framework for rapid development of high performance distributed services based on OpenResty.
Stars: โœญ 117 (-31.58%)
Mutual labels:  microservice, cloud-native
Dubbo Go Pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: โœญ 124 (-27.49%)
Mutual labels:  microservice, cloud-native
Kratos
A modular-designed and easy-to-use microservices framework in Go.
Stars: โœญ 15,844 (+9165.5%)
Mutual labels:  microservice, cloud-native
Quarkus Microservices Poc
Very simplified shop sales system made in a microservices architecture using quarkus
Stars: โœญ 16 (-90.64%)
Mutual labels:  microservice, cloud-native
Awesome Cloud Native Tutorials
A curated list of tutorials and labs for learning cloud native concepts
Stars: โœญ 70 (-59.06%)
Mutual labels:  cloud-native, tutorial
Hemera
๐Ÿ”ฌ Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: โœญ 773 (+352.05%)
Mutual labels:  microservice, cloud-native
Grpcjsontranscoder
A filter which allows a RESTful JSON API client to send requests to .NET web server over HTTP and get proxied to a gRPC service
Stars: โœญ 97 (-43.27%)
Mutual labels:  restful-api, cloud-native
Kubernetes Handbook
Kubernetes Handbook ๏ผˆKubernetesๆŒ‡ๅ—๏ผ‰ https://kubernetes.feisky.xyz
Stars: โœญ 4,511 (+2538.01%)
Mutual labels:  microservice, cloud-native
Awesome Fenix
่ฎจ่ฎบๅฆ‚ไฝ•ๆž„็ญ‘ไธ€ๅฅ—ๅฏ้ ็š„ๅˆ†ๅธƒๅผๅคงๅž‹่ฝฏไปถ็ณป็ปŸ
Stars: โœญ 530 (+209.94%)
Mutual labels:  microservice, cloud-native
Sentinel Golang
Sentinel Go version (Reliability & Resilience)
Stars: โœญ 1,817 (+962.57%)
Mutual labels:  microservice, cloud-native
Appkernel
API development made easy: a smart Python 3 API framework
Stars: โœญ 152 (-11.11%)
Mutual labels:  microservice, restful-api

Learning Cloud Native Go - myapp

Cloud Native Application Development is a one way of speeding up building web applications, using micro-services, containers and orchestration tools.

As the first step, this repository shows How to build a Dockerized RESTful API application using Go.

๐Ÿ’ก Refer learning-cloud-native-go.github.io or commit messages and step- branches for a step by step guild.

Points to Highlight

๐Ÿ’ญ Hope to use Wire for Compile-time Dependency Injection in the future.

Endpoints

endpoints

Docker Image Sizes

  • DB: 217MB
  • App
    • Development environment: 650MB
    • Production environment: 20.9MB

๐Ÿ’ก Building Docker image for production docker build -f docker/app/prod.Dockerfile . -t myapp_app

Design Decisions & Project Folder Structure

  • Store Docker related files inside the docker folder. But keep the docker-compose.yml file in the project root.
  • Store executable packages inside the cmd folder.
  • Store database migrations inside the migrations folder.
  • Store main application code inside the app folder.
  • Store reusable packages like configs, utils, models and repositories in separate folders. This will be helpful if you are adding more executable applications to support web front-ends, publish/subscribe systems, document stores and etc.
.
โ”œโ”€โ”€ docker
โ”‚  โ””โ”€โ”€ app
โ”‚     โ”œโ”€โ”€ bin
โ”‚     โ”‚  โ”œโ”€โ”€ init.sh
โ”‚     โ”‚  โ””โ”€โ”€ wait-for-mysql.sh
โ”‚     โ””โ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ”‚
โ”œโ”€โ”€ cmd
โ”‚  โ”œโ”€โ”€ app
โ”‚  โ”‚  โ””โ”€โ”€ main.go
โ”‚  โ””โ”€โ”€ migrate
โ”‚     โ””โ”€โ”€ main.go
โ”‚
โ”œโ”€โ”€ migrations
โ”‚  โ””โ”€โ”€ 20190805170000_create_books_table.sql
โ”‚
โ”œโ”€โ”€ app
โ”‚  โ”œโ”€โ”€ app
โ”‚  โ”‚  โ”œโ”€โ”€ app.go
โ”‚  โ”‚  โ”œโ”€โ”€ book_handler.go
โ”‚  โ”‚  โ”œโ”€โ”€ health_handler.go
โ”‚  โ”‚  โ””โ”€โ”€ index_handler.go
โ”‚  โ”œโ”€โ”€ requestlog
โ”‚  โ”‚  โ”œโ”€โ”€ handler.go
โ”‚  โ”‚  โ””โ”€โ”€ log_entry.go
โ”‚  โ””โ”€โ”€ router
โ”‚     โ”œโ”€โ”€ middleware
โ”‚     โ”‚  โ”œโ”€โ”€ content_type_json.go
โ”‚     โ”‚  โ””โ”€โ”€ content_type_json_test.go
โ”‚     โ””โ”€โ”€ router.go
โ”‚
โ”œโ”€โ”€ config
โ”‚  โ””โ”€โ”€ config.go
โ”‚
โ”œโ”€โ”€ adapter
โ”‚  โ”œโ”€โ”€ db
โ”‚  โ”‚  โ””โ”€โ”€ db.go
โ”‚  โ””โ”€โ”€ gorm
โ”‚     โ””โ”€โ”€ gorm.go
โ”‚
โ”œโ”€โ”€ util
โ”‚  โ”œโ”€โ”€ logger
โ”‚  โ”‚  โ”œโ”€โ”€ logger.go
โ”‚  โ”‚  โ””โ”€โ”€ logger_test.go
โ”‚  โ””โ”€โ”€ validator
โ”‚     โ””โ”€โ”€ validator.go
โ”‚     โ””โ”€โ”€ validator_test.go
โ”‚
โ”œโ”€โ”€ model
โ”‚  โ””โ”€โ”€ book.go
โ”œโ”€โ”€ repository
โ”‚  โ””โ”€โ”€ book.go
โ”‚
โ”œโ”€โ”€ go.mod
โ””โ”€โ”€ go.sum

๐Ÿ’ก About app/app/app.go; Some prefer app/server/server.go or http/app/app.go

Form Validation

Form validation

Logs

Logs in app init Logs in crud

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].