@@ -0,0 +1,3 @@
+package api
+
+type Api struct{}
@@ -0,0 +1,4 @@
+package application
+type App struct {
+}
@@ -0,0 +1,9 @@
+package baize
+import (
+ "git.sxidc.com/go-framework/baize.git/application"
+)
+func NewApplication() *application.App {
+ return &application.App{}
@@ -0,0 +1,61 @@
+package main
+//import (
+// DEATH "github.com/vrecan/death"
+// "go-framework/baize"
+// "go-tools/api_binding/http_binding"
+// "go-tools/api_binding/http_binding/binding_context"
+// "syscall"
+//)
+//type Hello struct {
+// What string `json:"what"`
+//}
+func main() {
+ //app, err := baize.NewApplication("10000", baize.NewDBPersistence())
+ //if err != nil {
+ // panic(err)
+ //}
+ //
+ //app.AddRouter("root", middlewares...).
+ // GetRouter("root").
+ // BindRoute(binding, &http_binding.SimpleBindItem[any, map[string]any]{
+ // Path: "/version",
+ // ResponseFunc: response.SendMapResponse,
+ // BusinessFunc: func(c *binding_context.Context, inputModel any) (map[string]any, error) {
+ // return map[string]any{
+ // "version": "v1.0.0",
+ // }, nil
+ // },
+ // })
+ //app.AddRouter("v1", middlewares...).
+ // GetRouter("v1").
+ // BindPost(binding, &http_binding.SimpleBindItem[Hello, map[string]any]{
+ // Path: "/hello",
+ // BusinessFunc: func(c *binding_context.Context, inputModel Hello) (map[string]any, error) {
+ // "version": application.GetVersionService().Version(),
+ //go func() {
+ // err := app.Start()
+ // if err != nil {
+ // }
+ //}()
+ //defer func() {
+ // err := app.Finish()
+ //death := DEATH.NewDeath(syscall.SIGINT, syscall.SIGTERM)
+ //_ = death.WaitForDeath()
@@ -0,0 +1,62 @@
+//DEATH "github.com/vrecan/death"
+//"go-framework/baize"
+//"syscall"
+//type Class struct {
+// domain.IDField
+// Name string `write:"column:name;" read:"column:name;condition:'${column} LIKE %${value}%'" cache:"key:${field.IDField}"`
+// domain.TenantIDField
+// domain.UserIDFields
+// domain.TimeFields
+//
+//type Student struct {
+// Name string `write:"column:name;" read:"column:name;condition:'${column} LIKE %${value}%'"`
+// Age int `write:"column:age;" read:"column:age;condition:'${column} LIKE %${value}%'" cache:"key:${field.IDField}"`
+ //app.RegisterRouter("v1", middlewares...).
+ // RegisterCommonCrud(&Class{}).
+ // RegisterCrud(&common.Crud{
+ // Api: common.CrudApi{},
+ // Service: common.CrudService{},
+ // DomainObject: &Student{},
+ // }).
+ // RegisterRelation(&common.Relation{
+ // Type: common.One2Many,
+ // LeftDomainEntity: &Class{},
+ // RightDomainEntity: &Student{},
@@ -0,0 +1,5 @@
@@ -1,3 +1,3 @@
-module git.sxidc.com/go-tools/baize
+module git.sxidc.com/go-framework/baize.git
go 1.22.3