File: requests.go

package info (click to toggle)
golang-github-gophercloud-gophercloud 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,416 kB
  • sloc: sh: 99; makefile: 21
file content (19 lines) | stat: -rw-r--r-- 594 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package shareaccessrules

import (
	"github.com/gophercloud/gophercloud"
)

// Get retrieves details about a share access rule.
func Get(client *gophercloud.ServiceClient, accessID string) (r GetResult) {
	resp, err := client.Get(getURL(client, accessID), &r.Body, nil)
	_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
	return
}

// List gets all access rules of a share.
func List(client *gophercloud.ServiceClient, shareID string) (r ListResult) {
	resp, err := client.Get(listURL(client, shareID), &r.Body, nil)
	_, r.Header, r.Err = gophercloud.ParseResponse(resp, err)
	return
}