Skip to content

Commit 199bd93

Browse files
feat(domain): expose registrar API in public CLI (#5414)
Co-authored-by: Estelle Soulard <esoulard@scaleway.com>
1 parent 48e9b7a commit 199bd93

File tree

6 files changed

+35
-3
lines changed

6 files changed

+35
-3
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
2+
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3+
Manage your domains and contacts.
4+
5+
USAGE:
6+
scw domain
7+
8+
FLAGS:
9+
-h, --help help for domain
10+
--list-sub-commands List all subcommands
11+
12+
GLOBAL FLAGS:
13+
-c, --config string The path to the config file
14+
-D, --debug Enable debug mode
15+
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
16+
-p, --profile string The config profile to use

cmd/scw/testdata/test-main-usage-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ AI COMMANDS:
88

99
AVAILABLE COMMANDS:
1010
datalab Data Lab API for Apache Spark™
11+
domain Domains and DNS - Registrar API
1112

1213
BAREMETAL COMMANDS:
1314
apple-silicon Apple silicon API

docs/commands/domain.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- DO NOT EDIT: this file is automatically generated using scw-doc-gen -->
2+
# Documentation for `scw domain`
3+
Manage your domains and contacts.
4+
5+
6+

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.28.0
2525
github.com/moby/go-archive v0.2.0
2626
github.com/opencontainers/go-digest v1.0.0
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.10.2
3030
github.com/spf13/pflag v1.0.10

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
476476
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
477477
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
478478
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
479-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64 h1:wXpcK+W/EOdVu62G+knMgLHdTrMlmxzkpQkzFy3re9M=
480-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA=
479+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce h1:WbR0BSDl9BPWA6MR8GHvqozhe2v1/soaEEBISY0DeRk=
480+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA=
481481
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
482482
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
483483
github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14=

internal/namespaces/domain/v2beta1/domain_cli.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var (
2020
func GetGeneratedCommands() *core.Commands {
2121
return core.NewCommands(
2222
dnsRoot(),
23+
domainRoot(),
2324
dnsZone(),
2425
dnsRecord(),
2526
dnsTsigKey(),
@@ -59,6 +60,14 @@ func dnsRoot() *core.Command {
5960
}
6061
}
6162

63+
func domainRoot() *core.Command {
64+
return &core.Command{
65+
Short: `Domains and DNS - Registrar API`,
66+
Long: `Manage your domains and contacts.`,
67+
Namespace: "domain",
68+
}
69+
}
70+
6271
func dnsZone() *core.Command {
6372
return &core.Command{
6473
Short: `DNS Zones management`,

0 commit comments

Comments
 (0)