From 1fbe48be831f79135049457d106c56f3d017a5f1 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Thu, 2 Sep 2021 09:46:14 +0200 Subject: [PATCH] Add Groups Example --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 2b22c96..a02d7c7 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,18 @@ err := client.MoveResource(ctx, "resource id", "parent folder id") err := client.MoveFolder(ctx, "folder id", "parent folder id") ``` +## Groups +Groups are extra complicated, it doesen't help that the Passbolt Documentation is wrong and missing important details. +Since helper functions for Groups were added you can now create, get, update and delete Groups easily: +```go +err := helper.UpdateGroup(ctx, client, "group id", "group name", []helper.GroupMembershipOperation{ + { + UserID: "user id", + IsGroupManager: true, + }, +}) +``` + ## Other These Examples are just the main Usecases of this Modules, there are many more API calls that are supported. Look at the [Reference](https://pkg.go.dev/github.com/speatzle/go-passbolt) for more information.