v0.1.0-beta.1
This version is a new major version towards the v0.1.0 as it proposes a new and
stable SDK API, that now will only be updated upon user feedback. So please,
share your impressions with us.
New Features
-
New web framework middleware support:
-
Multiple custom events can now be easily associated to a user using the
user-scoped methods underForUser()
. For example, to send two custom events
for a given user, do:sqUser := sqreen.ForUser(uid) sqUser.TrackEvent("my.event.one") sqUser.TrackEvent("my.event.two")
-
The configuration file can now be stored into multiple locations, the current
working directory or the executable one, or enforced using the new
configuration environment variableSQREEN_CONFIG_FILE
(#25). -
The custom client IP header configured in
SCREEN_IP_HEADER
is now also sent
to Sqreen so that it can better understand what IP headers were considered by
the agent to determine what is the actual client IP address
(67e2d4c).
Breaking Changes
-
Stable SDK API of "Sqreen for Go":
-
Avoid name conflicts with framework packages by prefixing Sqreen's
middleware packages withsq
. For example,gin
becomessqgin
(#17). -
Cleaner Go documentation now entirely included in the SDK and middleware
packages Go documentations. So no more need to go inside the agent
documentation to know more on some SDK methods, it is now all documented
in the same place, with lot of examples. -
Clearer SDK API: The flow of security events that can send to Sqreen is
now well-defined by a tree of SDK methods that can only be used the right
way. (#18, #24)-
The SDK handle getter function name is renamed from
GetHTTPRequestContext()
into a simplerFromContext()
. -
User-related SDK methods are now provided by
ForUser()
, for example:sqreen.TrackAuth(true, uid)
becomes
sqreen.ForUser(uid).TrackAuthSuccess()
-
-