Skip to content

Delete implemented

Compare
Choose a tag to compare
@mariotoffia mariotoffia released this 28 Oct 17:14
· 26 commits to master since this release

It is now possible to do delete of keys in both Parameter Store and in Secrets Manager. It works exactly as marshal / un-marshal, including possibility to exclude / include fields and get report on which got deleted and which where not.

Example to remove a set of pms keys

	type Test struct {
		Name string `pms:"test, prefix=simple"`
		Sub  struct {
			Apa int    `pms:"ext"`
			Nu  string `pms:"myname"`
		}
		AsmSub struct {
			Apa2 int    `asm:"ext"`
			Nu2  string `asm:"myname"`
		}
	}

	var test2 Test
	fields, _ := s.DeleteWithOpts(&test2, NoFilter, OnlyPms)

	assert.Equal(t, 0, len(fields), "all fields deleted")

Cheers,
Mario