helpers

package
v0.0.0-...-0aefadf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeJSONDiff

func ComputeJSONDiff(oldData, newData map[string]any) (map[string]any, error)

ComputeJSONDiff build RFC7396 merge patch between two JSON objects. If documents are structurally equal, return empty map.

func JSONToMap

func JSONToMap(v any) (map[string]any, error)

JSONToMap serialize value to JSON and parse it as map (keys are json-tags of fields).

func PackData

func PackData(data map[string]any) (string, error)

PackData serialize map to JSON, compress with zlib (level 9) and encode to base64.

func UnpackData

func UnpackData(packed string) (map[string]any, error)

UnpackData decode string created by PackData.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL