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
Bot releases are hidden (Show)
Published by wubin1989 over 1 year ago
Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.8...v2.0.9
Published by wubin1989 over 1 year ago
Published by wubin1989 over 1 year ago
Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.5...v2.0.6
Published by wubin1989 over 1 year ago
Full Changelog: https://github.com/unionj-cloud/go-doudou/compare/v2.0.3...v2.0.5
Published by wubin1989 almost 2 years ago
Create project from OpenAPI spec json file
Published by wubin1989 almost 2 years ago
Published by wubin1989 almost 2 years ago
go-doudou svc http client
subcommand by converting Swagger 2 to OpenAPI 3.0Published by wubin1989 almost 2 years ago
Published by wubin1989 about 2 years ago
Published by wubin1989 about 2 years ago
Some minor fixes only
Published by wubin1989 about 2 years ago
go_doudou_
NewHttpRouterSrv
api for using httprouter (which is used by gin) as routerInsertIgnore
, BulkInsert
, BulkInsertIgnore
, BulkUpsert
, BulkUpsertSelect
apis to go-doudou built-in lightweight ormPublished by wubin1989 about 2 years ago
GDD_NACOS_LOG_DISCARD
to disable nacos logPublished by wubin1989 about 2 years ago
Published by wubin1989 over 2 years ago
Add http request body and request parameters validation feature based on https://github.com/go-playground/validator
Published by wubin1989 over 2 years ago
GDD_ROUTE_ROOT_PATH
to nacos registry as metadata rootPath
ValidateRestApi
bug that cannot recognise enum type from vo packagePublished by wubin1989 over 2 years ago
Published by wubin1989 over 2 years ago
Published by wubin1989 over 2 years ago
Published by wubin1989 over 2 years ago
Add enum
support for OpenAPI 3 specification
Fix bugs for generating go http client code directly from OpenAPI 3 specification
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
Add NotIn
api to toolkit/sqlext
package for building sql query with not in (?)
condition
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
// 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)
Published by wubin1989 over 2 years ago
GDD_
) from remote configuration center