MCPcopy Create free account
hub / github.com/hashicorp/vault / JSONMergePatch

Method JSONMergePatch

api/logical.go:331–339  ·  view source on GitHub ↗
(ctx context.Context, path string, data map[string]interface{})

Source from the content-addressed store, hash-verified

329}
330
331func (c *Logical) JSONMergePatch(ctx context.Context, path string, data map[string]interface{}) (*Secret, error) {
332 r := c.c.NewRequest(http.MethodPatch, "/v1/"+path)
333 r.Headers.Set("Content-Type", "application/merge-patch+json")
334 if err := r.SetJSONBody(data); err != nil {
335 return nil, err
336 }
337
338 return c.write(ctx, path, r)
339}
340
341func (c *Logical) WriteBytes(path string, data []byte) (*Secret, error) {
342 return c.WriteBytesWithContext(context.Background(), path, data)

Callers 15

TestKV_Patch_AuditFunction · 0.80
TestKV_Patch_RootTokenFunction · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
mergePatchMethod · 0.80
importIssuerWithNameFunction · 0.80
PatchMetadataMethod · 0.80
mergePatchFunction · 0.80
UpdateIssuerMethod · 0.80

Calls 4

SetJSONBodyMethod · 0.95
writeMethod · 0.95
NewRequestMethod · 0.65
SetMethod · 0.45