github.com/gophercloud/gophercloud@v1.11.0/openstack/keymanager/v1/acls/doc.go (about)

     1  /*
     2  Package acls manages acls in the OpenStack Key Manager Service.
     3  
     4  All functions have a Secret and Container equivalent.
     5  
     6  Example to Get a Secret's ACL
     7  
     8  	acl, err := acls.GetSecretACL(client, secretID).Extract()
     9  	if err != nil {
    10  		panic(err)
    11  	}
    12  
    13  	fmt.Printf("%v\n", acl)
    14  
    15  Example to Set a Secret's ACL
    16  
    17  	users := []string{"uuid", "uuid"}
    18  	iFalse := false
    19  	setOpts := acls.SetOpts{
    20  		Type:          "read",
    21  		users:         &users,
    22  		ProjectAccess: &iFalse,
    23  	}
    24  
    25  	aclRef, err := acls.SetSecretACL(client, secretID, setOpts).Extract()
    26  	if err != nil {
    27  		panic(err)
    28  	}
    29  
    30  	fmt.Printf("%v\n", aclRef)
    31  
    32  Example to Update a Secret's ACL
    33  
    34  	users := []string{}
    35  	setOpts := acls.SetOpts{
    36  		Type:  "read",
    37  		users: &users,
    38  	}
    39  
    40  	aclRef, err := acls.UpdateSecretACL(client, secretID, setOpts).Extract()
    41  	if err != nil {
    42  		panic(err)
    43  	}
    44  
    45  	fmt.Printf("%v\n", aclRef)
    46  
    47  Example to Delete a Secret's ACL
    48  
    49  	err := acls.DeleteSecretACL(client, secretID).ExtractErr()
    50  	if err != nil {
    51  		panci(err)
    52  	}
    53  */
    54  package acls