19 Star 156 Fork 0

yoyofx / yoyogo

2024-02-07 17:22
11189 yoyofx 1610812335 yoyofx
  • Integrated swagger support

Used Swagger UI

// IRouteBuilder app.UseEndpoints(...)
endpoints.UseSwaggerDoc(rb,
		swagger.Info{
			Title:          "YoyoGO 框架文档演示",
			Version:        "v1.0.0",
			Description:    "框架文档演示swagger文档 v1.0 [ #yoyogo](https://github.com/yoyofx/yoyogo).",
			TermsOfService: "https://dev.yoyogo.run",
			Contact: swagger.Contact{
				Email: "zl.hxd@hotmail.com",
				Name:  "yoyogo",
			},
			License: swagger.License{
				Name: "MIT",
				Url:  "https://opensource.org/licenses/MIT",
			},
		},
		func(openapi *swagger.OpenApi) {
			openapi.AddSecurityBearerAuth()
		})

// mvc controller
```golang

// DocumentResponse custom document response
type DocumentResponse struct {
	Message string        `json:"message" doc:"消息"`
	List    []DocumentDto `json:"list" doc:"文档列表"`
	Success bool          `json:"success" doc:"是否成功"`
}

func (controller UserController) GetDocumentList(request *struct {
	mvc.RequestGET `route:"/v1/user/doc/list" doc:"获取全部文档列表"`
}) DocumentResponse {

	return DocumentResponse{Message: "GetDocumentList", List: []DocumentDto{
		{Id: 1, Name: "test1", Time: time.Now()}, {Id: 2, Name: "test2", Time: time.Now()},
		{Id: 3, Name: "test3", Time: time.Now()}, {Id: 4, Name: "test4", Time: time.Now()},
		{Id: 5, Name: "test5", Time: time.Now()}, {Id: 6, Name: "test6", Time: time.Now()},
	}, Success: true}
}

最后提交信息为: Merge pull request #234 from yoyofx/dev
2024-01-05 16:10
11189 yoyofx 1610812335 yoyofx
  1. fixed bug for httpclient add header.
  2. update grpc / viper and others dependencies version .
最后提交信息为: Merge pull request #227 from yoyofx/dev
2023-05-30 17:10
11189 yoyofx 1610812335 yoyofx
  • update golang.org/x/image to 0.5.0
  • update prometheus/client_golang to v1.15.1
最后提交信息为: Merge pull request #214 from yoyofx/dev
2022-09-30 16:04
11189 yoyofx 1610812335 yoyofx

截止此版本,go二进制漏洞已全部修复,请放心使用.

最后提交信息为: Merge pull request #206 from yoyofx/dev
2022-04-25 14:39
11189 yoyofx 1610812335 yoyofx

Features

  1. Get config value for DSL, that support key or ref object.

Such as YAML:

env: ${CUSTOM_ENV}
profile:
  dns: ${REMOTE_HOST}
  ip: ${REMOTE_IP:10.0.1.12}
  namespace: ${MYNAMESPACE:space.localhost}

Go Example

type Profile struct {
	DNS string `config:"dns"`
	IP  string `config:"ip"`
	NS  string `config:"namespace"`
}

config := abstractions.NewConfigurationBuilder().
       AddEnvironment().
       AddYamlFile("config").Build()

config.GetConfigObject("profile", &profile)
assert.Equal(t, profile.NS, "space.yoyogo.run")
assert.Equal(t, profile.DNS, "my host")
assert.Equal(t, profile.IP, "10.0.1.12")

or

env := config.Get("env")
dns := config.Get("profile.dns")
ip := config.Get("profile.ip")

assert.Equal(t, env, "my env variable")
assert.Equal(t, dns, "my host")
assert.Equal(t, ip, "10.0.1.12")
最后提交信息为: Merge pull request #203 from yoyofx/dev
2022-04-20 11:53
11189 yoyofx 1610812335 yoyofx

go runtime upgrade 1.18
1.action parameters mapping functions
2.action parameters mapping functions v2
3.mixed bindings.
4.添加本地配置对象
5.优化dockerfile

最后提交信息为: Merge pull request #198 from yoyofx/dev
2021-07-21 10:26
11189 yoyofx 1610812335 yoyofx

Problems:

  • fixed graceful stop and readiness bugs.
  • fixed parallel problem by mvc template, that match it for route path .
  • fixed read remote config hight priority then flags .

Features:

  • add endpoint /actuator/health/detail, and then output db,redis and more .
  • add endpoint /actuator/routers, and then output all route info list
最后提交信息为: Merge pull request #175 from yoyofx/dev
2021-07-14 19:06
11189 yoyofx 1610812335 yoyofx

Framework dependency:

Features:

  • Support grpc connection timeout with context. (fix)
最后提交信息为: Merge pull request #174 from yoyofx/dev
2021-07-08 14:54
11189 yoyofx 1610812335 yoyofx

CLI tempates upgrade:

  1. grpc
  2. xxl-job

Frameworks upgrade:

  1. upgrade gRPC to v1.38.0
  2. upgrade etcd to v3.5.0
  3. upgrade protobuf to v1.5.2
  4. upgrade go-redis to v8.11.0
  5. upgrade go-grpc-middleware to v1.3.0
  6. upgrade gorm to v1.21.11
  7. upgrade logrus to v1.8.1
  8. upgrade go2sky to v1.1.0
  9. upgrade fasthttp v1.28.0
最后提交信息为: Merge pull request #172 from yoyofx/dev
2021-05-26 19:05
11189 yoyofx 1610812335 yoyofx
  1. Integration distributed task of xxl-job
  2. consul for service discovery & authentication
最后提交信息为: Merge pull request #161 from yoyofx/dev
2021-04-24 21:14
11189 yoyofx 1610812335 yoyofx
  1. add grpc hosting and client factory & LB
  2. add host service interface at hosting runing.
  3. add console hosting
  4. service register with self by service discovery
  5. web binding & validator
最后提交信息为: Merge pull request #150 from yoyofx/dev
2021-04-14 14:24
11189 yoyofx 1610812335 yoyofx
  1. hosting add exeactor service
  2. nacos ,etcd, eureka with service discovery
  3. service discovery client
  4. http client for service discovery
  5. load balancing strategy (random, round_robin)
最后提交信息为: Merge pull request #143 from yoyofx/dev
预览版本
2021-02-02 18:36
11189 yoyofx 1610812335 yoyofx
  1. Http client
  2. HealthIndicator
  3. Reconstruction datasource of mysql and redis
  4. DB datasource integration GORMv2
最后提交信息为: Merge pull request #130 from yoyofx/dev
2021-01-24 22:55
11189 yoyofx 1610812335 yoyofx
  1. captcha image code & vallidation
  2. websocket support for web (endpoint & mvc)
  3. fixed cors options request bugs. …
最后提交信息为: Merge pull request #128 from yoyofx/dev
2021-01-15 16:42
11189 yoyofx 1610812335 yoyofx

add session store by redis

fixed bugs:
fixed the concurrency problem of session with cookies.

最后提交信息为: Merge pull request #125 from yoyofx/dev
2021-01-12 16:36
11189 yoyofx 1610812335 yoyofx
  1. Implement redis client and interface
  2. Session for cookie
  3. Captcha image render
最后提交信息为: Merge pull request #123 from yoyofx/dev
2020-12-29 00:25
11189 yoyofx 1610812335 yoyofx

1.captcha
2.session

最后提交信息为: deleted none files
预览版本
2020-12-09 16:46
11189 yoyofx 1610812335 yoyofx

新的命名规范

最后提交信息为: Merge branch 'dev'
2020-12-08 12:07
11189 yoyofx 1610812335 yoyofx

1.add endpoint readiness and liveness

2.mvc, find action by http method and action name

最后提交信息为: Merge pull request #106 from yoyofx/dev
Go
1
https://gitee.com/yoyofx/yoyogo.git
git@gitee.com:yoyofx/yoyogo.git
yoyofx
yoyogo
yoyogo

搜索帮助