feat: release v0.26 portable i18n and presentation adapters
This commit is contained in:
6
omni.go
6
omni.go
@@ -9,6 +9,7 @@ import (
|
||||
"git.yuntuo.hk/k2safe/go-omni/cors"
|
||||
apierrors "git.yuntuo.hk/k2safe/go-omni/errors"
|
||||
"git.yuntuo.hk/k2safe/go-omni/httpx"
|
||||
"git.yuntuo.hk/k2safe/go-omni/i18n/httpi18n"
|
||||
"git.yuntuo.hk/k2safe/go-omni/logx"
|
||||
"git.yuntuo.hk/k2safe/go-omni/metrics"
|
||||
"git.yuntuo.hk/k2safe/go-omni/response"
|
||||
@@ -56,6 +57,11 @@ func WithLogger(enabled bool) Option { return config.WithLogger(enabled) }
|
||||
|
||||
func WithErrors(catalog apierrors.Catalog) Option { return config.WithErrors(catalog) }
|
||||
|
||||
func WithLanguagePolicy(policy *httpi18n.Policy) Option { return config.WithLanguagePolicy(policy) }
|
||||
func WithErrorLocalizer(localizer apierrors.Localizer) Option {
|
||||
return config.WithErrorLocalizer(localizer)
|
||||
}
|
||||
|
||||
func WithResponse(settings response.Config) Option { return config.WithResponse(settings) }
|
||||
|
||||
func WithResponseEncoder(encoder response.Encoder) Option { return config.WithResponseEncoder(encoder) }
|
||||
|
||||
Reference in New Issue
Block a user