mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-05-09 17:48:20 +00:00
Add Groups Example
This commit is contained in:
parent
ae4541d66e
commit
1fbe48be83
1 changed files with 12 additions and 0 deletions
12
README.md
12
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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue