forked from myENA/radosgwadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
44 lines (36 loc) · 1.1 KB
/
doc.go
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
/*
Package radosgwadmin wraps http://docs.ceph.com/docs/master/radosgw/adminops
Additionally, exposes some undocumented metadata operations (methods starting with 'M').
Example app:
package main
import (
"context"
"fmt"
"time"
rgw "github.com/myENA/radosgwadmin"
rcl "github.com/myENA/restclient"
)
func main() {
cfg := &rgw.Config{
ClientConfig: rcl.ClientConfig{
ClientTimeout: rcl.Duration(time.Second * 10),
},
ServerURL: "https://my.rgw.org/",
AdminPath: "admin",
AccessKeyID: "ABC123BLAHBLAHBLAH",
SecretAccessKey: "IMASUPERSECRETACCESSKEY",
}
aa, err := rgw.NewAdminAPI(cfg)
if err != nil {
// do something, bail out.
}
users, err := aa.MListUsers(context.Background())
if err != nil {
// handle error
return
}
fmt.Println(users)
}
Input validation is provided by https://godoc.org/gopkg.in/go-playground/validator.v9
*/
package radosgwadmin