Documentation ¶
Index ¶
- func BodyOrEmptyJsonObj(c *fiber.Ctx) []byte
- func ComputeDeviceId(bytesSlice ...[]byte) uint64
- func ComputeVisitorId(bytesSlice ...[]byte) string
- func ContextTimeout(ctx context.Context) time.Duration
- func ExtractUtmParams(args *fasthttp.Args) event.UtmParams
- func PeekReferrerHeader(c *fiber.Ctx) []byte
- func PeekReferrerQueryOrHeader(c *fiber.Ctx) []byte
- func Xxh3(bytesSlice ...[]byte) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BodyOrEmptyJsonObj ¶
func BodyOrEmptyJsonObj(c *fiber.Ctx) []byte
BodyOrEmptyJsonObj returns request body or an empty JSON object buffer otherwise.
func ComputeDeviceId ¶
ComputeDeviceId computes xxh3 hash of the given byte slices. This is the same as Xxh3 function.
func ComputeVisitorId ¶
ComputeVisitorId computes xxh3 hash of the given byte slices and adds result as hexadecimal suffix to "prisme_".
func ContextTimeout ¶
ContextTimeout extract duration until context timeout and panics if no deadline is found.
func ExtractUtmParams ¶
ExtractUtmParams extracts UTM parameters from the given query args. If no utm_source arg is found, it fallbacks to ref arg.
func PeekReferrerHeader ¶
func PeekReferrerHeader(c *fiber.Ctx) []byte
PeekReferrerHeader peek X-Prisme-Referrer header and fallback to standard Referer header otherwise.
func PeekReferrerQueryOrHeader ¶
func PeekReferrerQueryOrHeader(c *fiber.Ctx) []byte
PeekReferrerQueryOrHeader peek referrer from "referrer" query parameter and fallback to standard Referer header otherwise.
Types ¶
This section is empty.