-
Notifications
You must be signed in to change notification settings - Fork 594
/
argo_example_test.go
65 lines (51 loc) · 1.51 KB
/
argo_example_test.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
54
55
56
57
58
59
60
61
62
63
64
65
package cloudflare_test
import (
"context"
"fmt"
"log"
cloudflare "github.com/cloudflare/cloudflare-go"
)
func ExampleAPI_ArgoSmartRouting() {
api, err := cloudflare.New("deadbeef", "test@example.org")
if err != nil {
log.Fatal(err)
}
smartRoutingSettings, err := api.ArgoSmartRouting(context.Background(), "01a7362d577a6c3019a474fd6f485823")
if err != nil {
log.Fatal(err)
}
fmt.Printf("smart routing is %s", smartRoutingSettings.Value)
}
func ExampleAPI_ArgoTieredCaching() {
api, err := cloudflare.New("deadbeef", "test@example.org")
if err != nil {
log.Fatal(err)
}
tieredCachingSettings, err := api.ArgoTieredCaching(context.Background(), "01a7362d577a6c3019a474fd6f485823")
if err != nil {
log.Fatal(err)
}
fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)
}
func ExampleAPI_UpdateArgoSmartRouting() {
api, err := cloudflare.New("deadbeef", "test@example.org")
if err != nil {
log.Fatal(err)
}
smartRoutingSettings, err := api.UpdateArgoSmartRouting(context.Background(), "01a7362d577a6c3019a474fd6f485823", "on")
if err != nil {
log.Fatal(err)
}
fmt.Printf("smart routing is %s", smartRoutingSettings.Value)
}
func ExampleAPI_UpdateArgoTieredCaching() {
api, err := cloudflare.New("deadbeef", "test@example.org")
if err != nil {
log.Fatal(err)
}
tieredCachingSettings, err := api.UpdateArgoTieredCaching(context.Background(), "01a7362d577a6c3019a474fd6f485823", "on")
if err != nil {
log.Fatal(err)
}
fmt.Printf("tiered caching is %s", tieredCachingSettings.Value)
}