module
Version:
v0.0.0-...-a9a04e4
Opens a new window with list of versions in this module.
Published: Apr 28, 2020
License: Apache-2.0
Opens a new window with license information.
README
¶
GinApiServer
GinApiServer is a HTTP apiserver framework based on Gin.
Replacement
You can get another ApiServer instance by executing following command:
grep -rl GinApiServer . | xargs sed -i 's/GinApiServer/youapiserver/g'
Usage
bash start.sh
tailf GinApiServer.log
Structure
pkg/
├── config
│ ├── config.go
│ ├── key.go
│ ├── model.go
│ └── opt_defs.go
├── controller
│ ├── ping.go
│ ├── todo.go
│ └── version.go
├── log
│ └── log.go
├── middleware
│ ├── basic_auth_middleware.go
├── models
│ └── common.go
├── route
│ └── routes.go
├── service
│ └── todo.go
├── store
└── util
- config: configuration
- controller: achieve function by calling relevant service(MVC-Controller)
- service: achieve application-specific logic
- log: log module
- middleware: responsible for auth and common-middleware logic
- models: model(MVC-Model)
- route: gin-route
- store: storage(eg: MySQL, Redis)
- util: basic library
Feature
- Support configmap reload api
- Support ping-pong health&version check
- Support dump-goroutine-stack-traces
Image
make dockerfiles.build
Refs
Directories
¶
|
|
|
|
pkg
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.