All Projects โ†’ ruilisi โ†’ go-pangu

ruilisi / go-pangu

Licence: MIT license
rest api web server based on go(High availability, high security, high performance)

Programming Languages

go
31211 projects - #10 most used programming language
typescript
32286 projects
shell
77523 projects
HTML
75241 projects
Makefile
30231 projects
CSS
56736 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to go-pangu

wine
A lightweight and flexible framework to help build elegant web API
Stars: โœญ 39 (-13.33%)
Mutual labels:  api-server, restful-api
Json Server Heroku
Deploy json-server to Heroku & Azure ๐Ÿ†™ ๐Ÿ†“
Stars: โœญ 310 (+588.89%)
Mutual labels:  api-server, restful-api
serverless-rest-api
Building RESTful Web APIs with Firebase Cloud Function, Firestore, Express and TypeScript
Stars: โœญ 103 (+128.89%)
Mutual labels:  api-server, restful-api
gothic
๐Ÿฆ‡ Gothic is a user registration and authentication SWT/JWT microservice. It supports REST, gRPC, and gRPC Web API, reCAPTCHA & a variety of DBs with Gorm.
Stars: โœญ 65 (+44.44%)
Mutual labels:  gorm, restful-api
Apiproject
[https://www.sofineday.com], golang้กน็›ฎๅผ€ๅ‘่„šๆ‰‹ๆžถ,้›†ๆˆๆœ€ไฝณๅฎž่ทต(gin+gorm+go-redis+mongo+cors+jwt+jsonๆ—ฅๅฟ—ๅบ“zap(ๆ”ฏๆŒๆ—ฅๅฟ—ๆ”ถ้›†ๅˆฐkafkaๆˆ–mongo)+ๆถˆๆฏ้˜Ÿๅˆ—kafka+ๅพฎไฟกๆ”ฏไป˜ๅฎๆ”ฏไป˜gopay+apiๅŠ ๅฏ†+apiๅๅ‘ไปฃ็†+go modulesไพ่ต–็ฎก็†+headless็ˆฌ่™ซchromedp+makefile+ไบŒ่ฟ›ๅˆถๅŽ‹็ผฉ+livereload็ƒญๅŠ ่ฝฝ)
Stars: โœญ 124 (+175.56%)
Mutual labels:  api-server, gorm
golang api
This is a source code of my golang restful api series on youtube.
Stars: โœญ 36 (-20%)
Mutual labels:  gorm, restful-api
node-server
๏ผˆ@nestjs refactoring๏ผ‰โšก๏ธMy personal website's api server, a RESTful application that powered by @eggjs
Stars: โœญ 17 (-62.22%)
Mutual labels:  api-server, restful-api
drowsy
๐Ÿ˜ช Lazy integrations tool for RESTful interfaces to aid POC development and streamline integrations
Stars: โœญ 19 (-57.78%)
Mutual labels:  api-server, rest-server
Appy Backend
A user system to bootstrap your app.
Stars: โœญ 96 (+113.33%)
Mutual labels:  api-server, restful-api
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: โœญ 10,634 (+23531.11%)
Mutual labels:  api-server, restful-api
codeigniter-rest
CodeIgniter 3 RESTful API Resource Base Controller
Stars: โœญ 71 (+57.78%)
Mutual labels:  restful-api, rest-server
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: โœญ 178 (+295.56%)
Mutual labels:  api-server, restful-api
grapevine
Fast, unopinionated, embeddable, minimalist web framework for .NET
Stars: โœญ 72 (+60%)
Mutual labels:  restful-api, rest-server
Gen
Converts a database into gorm structs and RESTful api
Stars: โœญ 825 (+1733.33%)
Mutual labels:  gorm, restful-api
Thinkphp5 Restfulapi
restful-api้ฃŽๆ ผๆŽฅๅฃ APPๆŽฅๅฃ APPๆŽฅๅฃๆƒ้™ oauth2.0 ๆŽฅๅฃ็‰ˆๆœฌ็ฎก็† ๆŽฅๅฃ้‰ดๆƒ
Stars: โœญ 949 (+2008.89%)
Mutual labels:  api-server, restful-api
Appkernel
API development made easy: a smart Python 3 API framework
Stars: โœญ 152 (+237.78%)
Mutual labels:  api-server, restful-api
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: โœญ 181 (+302.22%)
Mutual labels:  api-server, restful-api
Nei
NEI ๆŽฅๅฃ็ฎก็†ๅนณๅฐ ๆบไปฃ็ 
Stars: โœญ 198 (+340%)
Mutual labels:  api-server
monero-merchant
Monero Merchant is a RESTful API wrapper for the official Monero wallet RPC. This project is mainly for merchants who hope to accept Monero as payment, which is currently the most robust and privacy-oriented cryptocurrency with extremely low transaction fees.
Stars: โœญ 27 (-40%)
Mutual labels:  restful-api
Elli
Simple, robust and performant Erlang web server
Stars: โœญ 194 (+331.11%)
Mutual labels:  api-server

Golang-pangu

ไธญๆ–‡ๆ–‡ๆกฃ

Go-pangu is a Go boilerplate which follows cutting-edge solutions already adopted by the industry, JWT(JSON Web Tokens), Postgres, Redis, Docker, Gin, Ginkgo, Gorm. It is a solid production-ready starting point for your new backend projects.

Features

Golang-pangu is based on following tools

name description
Go an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gin web struct based on Go, flexible middleware๏ผŒstrong data binding and outstanding performance.
Gorm The fantastic ORM library for Golang aims to be developer friendly.
Ginkgo Ginkgo builds on Go's testing package, allowing expressive Behavior-Driven Development ("BDD") style tests.
JWT JSON Web Tokens. An open, industry standard RFC 7519 method for representing claims securely between two parties.
Postgres The world's most advanced open source relational database
Redis An open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.
Docker Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.

Struct

.
โ”œโ”€โ”€ application.yml  
โ”œโ”€โ”€ args
โ”‚   โ”œโ”€โ”€ args.go
โ”‚   โ””โ”€โ”€ cmd.go
โ”œโ”€โ”€ conf  
โ”‚   โ”œโ”€โ”€ conf_debug.go
โ”‚   โ”œโ”€โ”€ conf.go
โ”‚   โ””โ”€โ”€ conf_release.go
โ”œโ”€โ”€ controller
โ”‚   โ”œโ”€โ”€ application.go
โ”‚   โ”œโ”€โ”€ auth.go
โ”‚   โ”œโ”€โ”€ error.go
โ”‚   โ””โ”€โ”€ session.go
โ”œโ”€โ”€ db  
โ”‚   โ””โ”€โ”€ db.go
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ go.mod
โ”œโ”€โ”€ go.sum
โ”œโ”€โ”€ jwt  
โ”‚   โ””โ”€โ”€ jwt.go
โ”œโ”€โ”€ main.go
โ”œโ”€โ”€ Makefile  
โ”œโ”€โ”€ middleware  
โ”‚   โ””โ”€โ”€ middleware.go
โ”œโ”€โ”€ models  
โ”‚   โ”œโ”€โ”€ base_model.go
โ”‚   โ””โ”€โ”€ user.go
โ”œโ”€โ”€ params  
โ”‚   โ””โ”€โ”€ params.go
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ redis
โ”‚   โ””โ”€โ”€ redis.go
โ”œโ”€โ”€ routers  
โ”‚   โ””โ”€โ”€ router.go
โ”œโ”€โ”€ test
โ”‚   โ”œโ”€โ”€ sign_in_test.go
โ”‚   โ””โ”€โ”€ test_suite_test.go
โ””โ”€โ”€ util
    โ””โ”€โ”€ util.go
file function
application.yml config file
args functions which can fetch params from request url
conf functions which can get configurations
controller handlers
db database operations like migrating database
jwt fuctions to create and check jwt
main.go main function.Call function with "--db" parameter, "create" to create database, "migrate" to migrate tables, "dorp" to delete database
middleware middleware
models base models and basic database operations
params struct used in data binding
redis redis connection and operations
router router
test test
i18n internationalization
influx influx operations include read/save point

Start

  1. install postgres, redis
  2. config application.yml
`make create`(create database) or `go run main.go -db=create`
`make migrate`(migrate tables) or `go run main.go -db=migrate`
`make watch`(with hot reload) or `go run main.go`
  1. open http://localhost:3002/ping in web browser, and then you will get a "pong" response

Api examples

  • sign_up

    Post http://localhost:3002/users/sign_up

    params: email, password, password_confirm

    Register user

  • sign_in

    Post http://localhost:3002/users/sign_in

    params: email, password, DEVICE_TYPE, login_type

    You will get a header with authorization parameter from response after logging in successfully

  • auth_ping

    Get http://localhost:3002/auth_ping

    Should add a valid user token to request this api

  • change_password

    Post http://localhost:3002/users/change_password

    params: origin_password, password, password_confirm

    Modify user's password, which needs authorization

  • cities

    Post http://localhost:3002/cities

    params: language

    set language to en, return cities in English. set language to zh, return cities in Chinese.

sms api

(Tencent service, need to set your key in application.yml )

  • sms

    Get http://localhost:3002/sms

    params: mobile

    send sms

influx apis

(need to install influxdb and modify main.go)

  • influx_save

    Post http://localhost:3002/influx_save

    params: user_name, local, version

    save struct in influxdb

  • influx_show

    Post http://localhost:3002/influx_save

    get struct message in influxdb

pay apis

(Alipay service, need to set you key in application.yml)

  • alipay

    Post http://localhost:3002/alipay

    create alipay bill

  • alipay_notify

    Post http://localhost:3002/alipay_notify

    receive pay details notify

other public library

Rails-pangu is a Rails 6(API Only) boilerplate which follows cutting-edge solutions already adopted by the industry, notablly, Devise, JWT(JSON Web Tokens), Postgres, Redis, Docker, Rspec, RuboCop, CircleCI. It is a solid production-ready starting point for your new backend projects.

Projects using Go-pangu

product description
eSheep Network booster which helps global users access better entertainment content from China.
cs-server agent server(Comming soon!)
soda-server Comming soon!

License

Code and documentation copyright 2020 the Golang-pangu Authors and ruilisi Network Code released under the MIT License.

hophacker

Contributors

Thanks goes to these wonderful people (emoji key):

hophacker
hophacker

๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡
tony
Tony

๐Ÿ’ป ๐Ÿ“–
Ganggou
Ganggou

๐Ÿ’ป ๐Ÿ“–
Xingo
ExcitingFrog

๐Ÿ’ป ๐Ÿ“–
Leo7991
Leo7991

๐Ÿ’ป ๐Ÿ“–
Daxigua443
Daxigua443

๐Ÿ’ป ๐Ÿ“–
Soryu23
Soryu23

๐Ÿ’ป ๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

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