go-doudou

go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

MIT License

Stars
1.4K
Committers
16

Bot releases are hidden (Show)

go-doudou - v2.0.9

Published by wubin1989 over 1 year ago

What's Changed

Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.8...v2.0.9

go-doudou - v2.0.8 quick fix

Published by wubin1989 over 1 year ago

go-doudou - v2.0.6 Zookeeper and Dubbo-go gRPC protocol

Published by wubin1989 over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.5...v2.0.6

go-doudou - v2.0.5

Published by wubin1989 over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.3...v2.0.5

go-doudou - v2.0.4 Create project from OpenAPI spec json file

Published by wubin1989 almost 2 years ago

Create project from OpenAPI spec json file

go-doudou - v2.0.3

Published by wubin1989 almost 2 years ago

  • #24
  • #25
  • #26
go-doudou - v2.0.1

Published by wubin1989 almost 2 years ago

  1. Refactored go-doudou built-in lightweight orm by replacing interfaces with concrete structs for avoiding memory leak and performance
  2. Refactored project structure a little by renaming some packages and methods for easily understanding
  3. Removed memberlist dependency and related features in favor of etcd
  4. Add etcd service discovery feature for both REST and gRPC services
  5. Add etcd support to gateway middleware for proxying http requests to downstream REST services
  6. Add etcd based round-robin and smooth weighted round robin load balance client apis for both REST and gRPC services
  7. Add nacos based round-robin and smooth weighted round robin load balance client apis for both gRPC services
  8. Add auth interceptor for gRPC services
  9. Add memory based and redis based ratelimit interceptors for gRPC services
  10. Add Swagger 2 based REST client code generation feature to go-doudou svc http client subcommand by converting Swagger 2 to OpenAPI 3.0
  11. Other minor fixes and improvements
go-doudou - v2.0.0

Published by wubin1989 almost 2 years ago

go-doudou - v1.3.7

Published by wubin1989 about 2 years ago

  1. Refactored httprouter package, remove some logic that go-doudou not need in order to maintain the router myself and optimize performance further in future
  2. Some minor changes
go-doudou - v1.3.3

Published by wubin1989 about 2 years ago

Some minor fixes only

go-doudou - v1.3.2 grpc

Published by wubin1989 about 2 years ago

  1. Add grpc support including proto file, grpc server/client stubs, svcimpl.go file and main.go file generation feature
  2. Move logging library from logrus to zerolog
  3. Optimize proxy middleware (mainly used for implementing http gateway) performance
  4. Use github.com/klauspost/compress for gzip compression instead of go std library
  5. Add some prometheus metrics prefixed by go_doudou_
  6. Add NewHttpRouterSrv api for using httprouter (which is used by gin) as router
  7. Add pprof related endpoints
  8. Add InsertIgnore, BulkInsert, BulkInsertIgnore, BulkUpsert, BulkUpsertSelect apis to go-doudou built-in lightweight orm
  9. Some minor bug fixes and performance improvement
go-doudou - v1.2.3

Published by wubin1989 about 2 years ago

go-doudou - v1.1.9 Request Validation

Published by wubin1989 over 2 years ago

Add http request body and request parameters validation feature based on https://github.com/go-playground/validator

go-doudou - v1.1.8 Route Annotation

Published by wubin1989 over 2 years ago

  1. Add route/api annotation feature
  2. Add envrionment variable GDD_ROUTE_ROOT_PATH to nacos registry as metadata rootPath
  3. Fix ValidateRestApi bug that cannot recognise enum type from vo package
  4. Some minor optimization
go-doudou - v1.1.0 orm cache layer

Published by wubin1989 over 2 years ago

  1. Add cache layer to go-doudou built-in lightweight orm based on https://github.com/go-redis/cache
  2. Fix some bugs
go-doudou - v1.0.8

Published by wubin1989 over 2 years ago

  1. Add log sql query along with opentracing trace ID and request ID feature
  2. Fix go-doudou orm update table structures from structs code bug about foreign key constraints
go-doudou - v1.0.6

Published by wubin1989 over 2 years ago

  1. Add enum support for OpenAPI 3 specification

  2. Fix bugs for generating go http client code directly from OpenAPI 3 specification

  3. Add caller.NewCaller().String() api to get caller information such package name, method name, file name and line number for easily locating bugs. For example:

called from github.com/unionj-cloud/go-doudou/toolkit/caller_test.TestCaller_String on /Users/wubin1989/workspace/cloud/go-doudou/toolkit/caller/caller_test.go#10
  1. Add NotIn api to toolkit/sqlext package for building sql query with not in (?) condition

  2. Add ISqlLogger interface and default implementation SqlLogger struct for logging sql query with parameters substituted and wrap logger.ISqlLogger into GddDB and GddTx structs to finish sql logging feature. To use this feature, just create a GddDB instance, then put it into dao instance factory method.

gdddb := wrapper.NewGddDB(db, wrapper.WithLogger(logger.NewSqlLogger(log.Default())))
u := dao.NewUserDao(gdddb)
// use u to do CRUD like
// got, err := u.UpsertNoneZero(context.Background(), user)

If you use SqlLogger, remember to set environment variable GDD_SQL_LOG_ENABLE to true at first

  1. Add 7 hooks for generated dao layer code:
// for insert/upsert/update operations
BeforeSaveHook(ctx context.Context, data interface{})
AfterSaveHook(ctx context.Context, data interface{}, lastInsertID int64, affected int64)

// for update many operations
BeforeUpdateManyHook(ctx context.Context, data interface{}, where query.Q)
AfterUpdateManyHook(ctx context.Context, data interface{}, where query.Q, affected int64)

// for delete many operations
BeforeDeleteManyHook(ctx context.Context, data interface{}, where query.Q)
AfterDeleteManyHook(ctx context.Context, data interface{}, where query.Q, affected int64)

// for read many operations, such as SelectMany/CountMany/PageMany
BeforeReadManyHook(ctx context.Context, page *query.Page, where ...query.Q)
go-doudou - v1.0.3 Configuration Management

Published by wubin1989 over 2 years ago

  1. Add Nacos configuration management support
  2. Add Apollo configuration management support
  3. Add configuration dynamic adjustment in runtime support for go-doudou (by adjusting environment variables prefixed with GDD_) from remote configuration center
  4. Add yaml format configuration file support
  5. Other minor improvements
Package Rankings
Top 1.81% on Proxy.golang.org