The following example shows how to add a member to a group.
()
| 7 | |
| 8 | // The following example shows how to add a member to a group. |
| 9 | func Example_addMemberToGroup() { |
| 10 | operation := `{ |
| 11 | "op": "add", |
| 12 | "path": "members", |
| 13 | "value": { |
| 14 | "display": "di-wu", |
| 15 | "$ref": "https://example.com/v2/Users/0001", |
| 16 | "value": "0001" |
| 17 | } |
| 18 | }` |
| 19 | validator, _ := NewValidator(operation, schema.CoreGroupSchema()) |
| 20 | fmt.Println(validator.Validate()) |
| 21 | // Output: |
| 22 | // [map[$ref:https://example.com/v2/Users/0001 display:di-wu value:0001]] <nil> |
| 23 | } |
| 24 | |
| 25 | // The following example shows how to add one or more attributes to a User resource without using a "path" attribute. |
| 26 | func Example_addWithoutPath() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…