Skip to content

Releases: retailcrm/mg-transport-core

Add localizer interface

28 Mar 13:52
604e6fd
Compare
Choose a tag to compare
v2.2.1

Add localizer interface

Replace old Sentry client with the new SDK

18 Mar 07:46
627ceae
Compare
Choose a tag to compare
* replace old Sentry client with the new SDK
* do not initialize Sentry SDK twice, correct panic processing
* account prefix for panics
* log errors with account context data
* tests
* linter fixes
* removed 1.18 from available versions

Trans template in FuncMap

17 Feb 07:38
bcef82e
Compare
Choose a tag to compare
v2.1.1

Trans template in FuncMap

Add public methods for gettings allowed domains

21 Dec 14:36
0126dc9
Compare
Choose a tag to compare
v2.1.0

Add public methods for gettings allowed domains

Credentials backport

13 Dec 13:53
7e21e73
Compare
Choose a tag to compare
v2.0.1

Credentials backport

Сredentials backport

13 Dec 13:47
0828f00
Compare
Choose a tag to compare
v1.8.6

Сredentials backport

Refactoring and new features

01 Dec 12:40
52109ee
Compare
Choose a tag to compare

Changelog mg-transport-core

  • [breaking change]: TLS 1.2 as a minimal TLS version for HTTPClientBuilder. Use UseTLS10 method to restore old behavior.
  • [breaking change]: All error-related utilities with an exception for the Sentry component were moved to errorutil.
  • [breaking change]: core.GetContextLocalizer and core.MustGetContextLocalizer will set appropriate language tag based on browser language. Use SetLanguage(language.English) call to restore previous behavior.
  • [breaking change]: core.JobLogFunc is removed completely. core.JobFunc, core.JobErrorHandler and core.JobPanicHandler are using logger.Logger instead of core.JobLogFunc.
  • [breaking change]: core.ErrorCollector has been removed; use errorutil.Collector or errorutil.Collect instead.
  • [breaking change]: core.ErrInsufficientScopes has been moved to the another package; use errorutil.ErrInsufficientScopes instead.
  • [breaking change]: core.ScopesList has been moved to the another package; use errorutil.ScopesList instead.
  • [breaking change]: core.NewInsufficientScopesErr has been moved to the another package; use errorutil.NewInsufficientScopesErr instead.
  • [breaking change]: core.ErrorResponse has been moved to the another package; use errorutil.Response instead.
  • [breaking change]: core.ErrorsResponse has been moved to the another package; use errorutil.ListResponse instead.
  • [breaking change]: core.GetErrorResponse has been moved to the another package; use errorutil.GetErrorResponse instead.
  • [breaking change]: core.BadRequest has been moved to the another package; use errorutil.BadRequest instead.
  • [breaking change]: core.InternalServerError has been moved to the another package; use errorutil.InternalServerError instead.
  • [breaking change]: core.LoggerInterface has been moved to the another package; use logger.Logger instead.
  • [breaking change]: core.Logger has been moved to the another package; use logger.StandardLogger instead.
  • [breaking change]: core.NewLogger has been moved to the another package; use logger.NewStandard instead.
  • [breaking change]: core.DefaultLogFormatter has been moved to the another package; use logger.DefaultLogFormatter instead.
  • [breaking change]: core.TranslationsExtractor has been moved to the another package; use testutil.TranslationsExtractor instead.
  • [breaking change]: core.NewTranslationsExtractor has been moved to the another package; use testutil.NewTranslationsExtractor instead.
  • [breaking change]: core.Migrate has been moved to the another package; use db.Migrate instead.
  • [breaking change]: core.MigrationInfo has been moved to the another package; use db.MigrationInfo instead.
  • [breaking change]: core.Migrations has been moved to the another package; use db.Migrations instead.
  • [breaking change]: core.ORM has been moved to another package; use db.ORM instead.
  • [breaking change]: core.NewORM has been moved to the another package; use db.NewORM instead.
  • [breaking change]: core.NewMigrationCommand has been moved to the another package; use db.NewMigrationCommand instead.
  • [breaking change]: core.Connection has been moved to the another package; use models.Connection instead.
  • [breaking change]: core.Account has been moved to the another package; use models.Account instead.
  • [breaking change]: core.User has been moved to another package; use models.User instead.
  • [breaking change]: core.Accounts has been moved to the another package; use models.Accounts instead.
  • [breaking change]: core.ConfigInterface has been moved to the another package; use config.Configuration instead.
  • [breaking change]: core.Config has been moved to the another package; use config.Config instead.
  • [breaking change]: core.ConfigAWS has been moved to another package; use config.AWS instead.
  • [breaking change]: core.InfoInterface has been moved to the another package; use config.InfoInterface instead.
  • [breaking change]: core.Info has been moved to another package; use config.Info instead.
  • [breaking change]: core.DatabaseConfig has been moved to the another package; use config.DatabaseConfig instead.
  • [breaking change]: core.HTTPClientConfig has been moved to the another package; use config.HTTPClientConfig instead.
  • [breaking change]: core.HTTPServerConfig has been moved to the another package; use config.HTTPServerConfig instead.
  • [breaking change]: core.NewConfig has been moved to the another package; use config.NewConfig instead.
  • [breaking change]: core.Utils has been moved to the another package; use util.Utils instead.
  • [breaking change]: core.CSRF and related symbols have been moved to another package; use middleware.CSRF instead.
  • [breaking change]: core.ConnectionConfig and related symbols have been moved to the another package; use middleware.ConnectionConfig instead.
  • [breaking change]: core.VerifyConnectRequest and related symbols have been moved to the another package; use middleware.VerifyConnectRequest instead.
  • [breaking change]: core.MustGetConnectRequest and related symbols have been moved to the another package; use middleware.MustGetConnectRequest instead.
  • [breaking change]: core.HTTPClientBuilder and related symbols have been moved to the another package; use httputil.HTTPClientBuilder instead.
  • [breaking change]: core.(*HTTPClientBuilder).FromEngine has been removed; use (*HTTPClientBuilder).FromConfig((*core.Engine).GetHTTPClientConfig()) instead.
  • [feature]: db.(*ORM).createDB is now exported - db.(*ORM).CreateDB
  • [feature]: core.GetRootLanguageTag function that returns root language tag for region-scoped language tags.
  • [feature]: errorutil.Collector component (better replacement for the core.ErrorCollector).
  • [feature]: errorutil.Collect method (drop-in replacement for the core.ErrorCollector).
  • [feature]: errorutil.Unauthorized method - returns error with http.Unauthorized code.
  • [feature]: errorutil.Forbidden method - returns error with http.Forbidden code.
  • [feature]: core.(*Localizer).UnauthorizedLocalized method - localized version of errorutil.Unauthorized.
  • [feature]: core.(*Localizer).ForbiddenLocalized method - localized version of errorutil.Forbidden.
  • [feature]: core.(*Localizer).InternalServerErrorLocalized method - localized version of errorutil.InternalServerError.
  • [feature]: logger.Nil - logger.Logger implementation that does nothing (can be used to disable logging without touching logging calls). Instantiate using logger.NewNil.
  • [feature]: logger.NewBase - default constructor for github.com/op/go-logging logger which is being used as a backend for the logger.StandardLogger.
  • [feature]: (*logger.StandardLogger).SetBaseLogger method - setter for the underlying backend logger (from github.com/op/go-logging).
  • [feature]: logger.PrefixDecorator to decorate logger with any additional prefix. Use logger.DecorateWithPrefix.
  • [feature]: logger.AccountLoggerDecorator - logger that logs messages with predefined prefix. Prefix contains information about component name, connection and account identifiers. All of those including prefix format are updatable.
  • [feature]: testutil.BufferLogger - logger.Logger implementation that writes to the underlying buffer. Instantiate using testutil.NewBufferedLogger. This implementation is placed inside testutil because it is only useful in tests.
  • [feature]: testutil.AssertNoUnmatchedRequests - asserts that there are no unmatched requests. Prints out all of those requests otherwise.
  • [feature]: testutil.DeleteCreatedEntities - records all the entities inserted into the DB; removes them all then necessary.
  • [infrastructure]: Update golangci-lint to v1.42.1.
  • [fix]: Structures optimization (reduces memory usage).
  • [fix]: Preallocation for some buffers.
  • [fix]: Fixes for doc comments.
  • [fix]: Fix for all linter errors.

One-step connection middlewares

18 Nov 07:44
b0d5488
Compare
Choose a tag to compare
v1.8.5

One-step connection middlewares (#34)

Improve errors handling

03 Nov 14:28
65f0ecf
Compare
Choose a tag to compare
v1.8.4

Improve errors handling

Add secret field for transport

02 Nov 08:09
6af8588
Compare
Choose a tag to compare
v1.8.3

Add secret field for transport