File: doc.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 0.0~git20180917.45f1c769-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,768 kB
  • sloc: sh: 98; makefile: 14
file content (54 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
Package acls manages acls in the OpenStack Key Manager Service.

All functions have a Secret and Container equivalent.

Example to Get a Secret's ACL

	acl, err := acls.GetSecretACL(client, secretID).Extract()
	if err != nil {
		panic(err)
	}

	fmt.Printf("%v\n", acl)

Example to Set a Secret's ACL

	users := []string{"uuid", "uuid"}
	iFalse := false
	setOpts := acls.SetOpts{
		Type:          "read",
		users:         &users,
		ProjectAccess: &iFalse,
	}

	aclRef, err := acls.SetSecretACL(client, secretID, setOpts).Extract()
	if err != nil {
		panic(err)
	}

	fmt.Printf("%v\n", aclRef)

Example to Update a Secret's ACL

	users := []string{}
	setOpts := acls.SetOpts{
		Type:  "read",
		users: &users,
	}

	aclRef, err := acls.UpdateSecretACL(client, secretID, setOpts).Extract()
	if err != nil {
		panic(err)
	}

	fmt.Printf("%v\n", aclRef)

Example to Delete a Secret's ACL

	err := acls.DeleteSecretACL(client, secretID).ExtractErr()
	if err != nil {
		panci(err)
	}
*/
package acls