{"modulePath":"github.com/deckhouse/module-sdk","version":"v0.14.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package patch\n\n## Variables\n\n```go\nvar (\n\tErrTestFailed = errors.New(\"test failed\")\n\tErrMissing    = errors.New(\"missing value\")\n)\n```\n\n## Functions\n\n```go\nfunc JSONEqual(a, b []byte) bool\n```\nJSONEqual indicates if 2 JSON documents have the same structural equality.\n\n## Types\n\n```go\ntype Operation map[string]*json.RawMessage\n```\nOperation is a single JSON-Patch step, such as a single 'add' operation.\n\n```go\nfunc (o Operation) From() (string, error)\n```\nFrom reads the \"from\" field of the Operation.\n\n```go\nfunc (o Operation) Kind() string\n```\nKind reads the \"op\" field of the Operation.\n\n```go\nfunc (o Operation) Path() (string, error)\n```\nPath reads the \"path\" field of the Operation.\n\n```go\nfunc (o Operation) ValueInterface() (any, error)\n```\nValueInterface decodes the operation value into an interface.\n\n```go\ntype Patch []Operation\n```\nPatch is an ordered collection of Operations.\n\n```go\nfunc (p Patch) Apply(doc []byte) ([]byte, error)\n```\nApply mutates a JSON document according to the patch, and returns the new document.\n\n```go\nfunc (p Patch) ApplyContainer(pd container) (container, error)\n```\n\n```go\nfunc (p Patch) ApplyIndent(doc []byte, indent string) ([]byte, error)\n```\nApplyIndent mutates a JSON document according to the patch, and returns the new document indented.\n\n","path":"github.com/deckhouse/module-sdk/pkg/utils/patch","name":"patch","synopsis":"","isRedistributable":true}
