modulepackage
0.1.38
Repository: https://github.com/polarpanda611/trinitygo.git
Documentation: pkg.go.dev
# README
trinitygo
golang restframework plugin with gin+gorm, fast and high scalable
Installation
$ go get github.com/PolarPanda611/trinitygo/trinitygo
$ trinitygo NewHttp [Your Project Name]
$ cd [Your Project Name]
$ trinitygo NewCrud [Your Model Name]
$ swag init
// start your journey in Trinity
// you can check the demo under example folder
Overview
- Declarative router
- IOC container & Dependency Injection
- customize middleware
- customize runtime (Tracing Analysis, user authentication , event bus ...)
- support atomic request
- support customize validator ( API permission , data validation ...)
- support URL query analyze (search , filter , order by , preload ...)
- integrate gorm
- integrate gin
Getting Started
- Trinity Guides wiki
Contributing
Feel free to create the Issue and PR . We need your help !
# Packages
* @Author: Daniel TAN
* @Description:
* @Date: 2021-03-03 15:46:55
* @LastEditTime: 2021-03-17 01:47:28
* @LastEditors: Daniel TAN
* @FilePath: /trinitygo/application/context_pool.go
*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* @Author: Daniel TAN
* @Description:
* @Date: 2020-09-01 09:15:45
* @LastEditTime: 2021-01-22 17:02:48
* @LastEditors: Daniel TAN
* @FilePath: /trinitygo/httputil/httputil.go
*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
* @Author: Daniel TAN
* @Description:
* @Date: 2021-03-03 15:46:55
* @LastEditTime: 2021-06-28 19:22:28
* @LastEditors: Daniel TAN
* @FilePath: /tcs/Users/01444547/IdeaProjects/trinitygo/testutil/util.go
*/.
No description provided by the author
No description provided by the author
# Functions
DefaultGRPC default grpc server.
DefaultHTTP default http server.
EnableHealthCheckURL set config path.
New new application.
RegisterController register service @controllerName basic request path of the controller @instance controller instance ,should be ptr @requestMaps optional ,register the request based on the basic path of controller.
RegisterInitSQL register init sql @instance should be ptr instance @defaultValues should be ptr instance default value will create the instance and will not update .
RegisterInstance register instance @instance instance of the class , should be ptr @tags the tags for the instance to specify.
RegisterModel register model @instance should be ptr instance @defaultValues should be ptr instance default value will create the instance and will not update .
SetCasbinConfPath set config path.
SetConfigPath set config path.
SetFuncGetWhoAmI set _funcToGetWhoAmI.
SetHealthCheckDefaultHandler set default health check handler.
SetIsLogSelfCheck set is log self check by default , it is true.
SetKeyword set keywork list.
SetResponseFactory set response factory.
# Structs
Application core of trinity.