首次提交APIPark代码,面向开源

This commit is contained in:
Liujian
2024-08-12 21:38:09 +08:00
parent 34dc99ff23
commit 215b87f83c
751 changed files with 66335 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package common
import (
"github.com/eolinker/go-common/autowire"
"github.com/gin-gonic/gin"
"reflect"
)
type ICommonController interface {
Version(ctx *gin.Context) (string, string, error)
}
func init() {
autowire.Auto[ICommonController](func() reflect.Value {
return reflect.ValueOf(new(imlCommonController))
})
}
+14
View File
@@ -0,0 +1,14 @@
package common
import (
"github.com/APIParkLab/APIPark/common/version"
"github.com/gin-gonic/gin"
)
var _ ICommonController = (*imlCommonController)(nil)
type imlCommonController struct{}
func (i imlCommonController) Version(ctx *gin.Context) (string, string, error) {
return version.Version, version.BuildTime, nil
}