Thoumas
Thoumas
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
Docs are still wrong but idk how I'd even report that
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
Created a PR "fixing" this in the rust implementation but I doubt it will be merged anytime soon 😦 https://github.com/cloudflare/cloudflare-rs/pull/232
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
I messed up. The flarectl zone info command works with the zone name not the id. Just wasted an hour 🙂
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
will do as soon as I find out why the info command doesn't work
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
I installed flarectl just like the README (https://github.com/cloudflare/cloudflare-go/tree/master/cmd/flarectl) told me to (go install github.com/cloudflare/cloudflare-go/cmd/flarectl@latest) to investigate this issue and the zone command wouldn't run since the alias for create and cert were the same. Had to delete the following to get it to work:
diff --git a/cmd/flarectl/flarectl.go b/cmd/flarectl/flarectl.go
index 9afbd15..f89071d 100644
--- a/cmd/flarectl/flarectl.go
+++ b/cmd/flarectl/flarectl.go
@@ -225,7 +225,6 @@ func main() {
},
{
Name: "certs",
- Aliases: []string{"c"},
Action: zoneCerts,
Usage: "Custom SSL certificates for a zone",
},
diff --git a/cmd/flarectl/flarectl.go b/cmd/flarectl/flarectl.go
index 9afbd15..f89071d 100644
--- a/cmd/flarectl/flarectl.go
+++ b/cmd/flarectl/flarectl.go
@@ -225,7 +225,6 @@ func main() {
},
{
Name: "certs",
- Aliases: []string{"c"},
Action: zoneCerts,
Usage: "Custom SSL certificates for a zone",
},
After applying my patch and running flarectl zone list I got my zone id and then I ran flarectl zone info --zone myzoneid which gave me this:
ID | ZONE | PLAN | STATUS | NAME SERVERS | PAUSED | TYPE
-----+------+------+--------+--------------+--------+-------
ID | ZONE | PLAN | STATUS | NAME SERVERS | PAUSED | TYPE
-----+------+------+--------+--------------+--------+-------
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
Should also be a problem with the go implementation but I'm not sure (not proficient in go). Either way the docs should include email. https://github.com/cloudflare/cloudflare-go/blob/master/zone.go#L24-L29
type Owner struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
OwnerType string `json:"type"`
}
type Owner struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
OwnerType string `json:"type"`
}
EDIT: just checked the go implementation and the result ends up being {"id":"","email":"","name":"","type":"user"}
12 replies
CDCloudflare Developers
Created by Thoumas on 1/18/2024 in #general-help
Bug in flarectl, Cloudflare API docs, cloudflare-go and cloudflare-rs
Something is definitely wrong here. 1. Docs should include email (or make the owner field a variant that is either of type "user" or type "organization") 2. Maybe there is a bug in the API making it return nulls for the owner's email and id 3. If there isn't a bug in the API, then the docs and the Rust enum should reflect that these fields are optional
12 replies