-
Notifications
You must be signed in to change notification settings - Fork 7
/
doc.go
53 lines (43 loc) · 1.35 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
45
46
47
48
49
50
51
52
53
/*
Package tracker provides operation records for cloud service resources.
Example to List Tracker
listTracker := tracker.ListOpts{}
allTracker, err := tracker.List(client,listTracker)
if err != nil {
panic(err)
}
fmt.Println(allTracker)
Example to Create a Tracker
createTracker:=tracker.CreateOpts{
BucketName: "obs-e51d",
FilePrefixName: "mytracker",
SimpleMessageNotification:tracker.SimpleMessageNotification{
IsSupportSMN: true,
TopicID: "urn:smn:eu-de:626ce20e52a346c090b09cffc3e038e5:c2c-topic",
IsSendAllKeyOperation: false,
Operations: []string{"login"},
NeedNotifyUserList: []string{"user1","user2"},
}}
out,err:=tracker.Create(client, createTracker).Extract()
fmt.Println(out)
fmt.Println(err)
Example to Update a Tracker
updateTracker:=tracker.UpdateOpts{
BucketName : "ciros-img",
FilePrefixName : "mytracker",
Status : "disabled",
SimpleMessageNotification:tracker.SimpleMessageNotification{
IsSupportSMN: false,
TopicID: "urn:smn:eu-de:626ce20e52a346c090b09cffc3e038e5:c2c-topic",
IsSendAllKeyOperation:false,
Operations: []string{"delete","create","login"},
NeedNotifyUserList:[]string{"user1","user2"},
},
}
out,err:=tracker.Update(client, updateTracker).Extract()
fmt.Println(out)
Example to Delete a Tracker
out:= tracker.Delete(client).ExtractErr()
fmt.Println(out)
*/
package tracker