diff --git a/cmd/scw/testdata/test-all-usage-domain-usage.golden b/cmd/scw/testdata/test-all-usage-domain-usage.golden new file mode 100644 index 0000000000..9f1f702d95 --- /dev/null +++ b/cmd/scw/testdata/test-all-usage-domain-usage.golden @@ -0,0 +1,16 @@ +🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲 +🟥🟥🟥 STDERR️️ 🟥🟥🟥️ +Manage your domains and contacts. + +USAGE: + scw domain + +FLAGS: + -h, --help help for domain + --list-sub-commands List all subcommands + +GLOBAL FLAGS: + -c, --config string The path to the config file + -D, --debug Enable debug mode + -o, --output string Output format: json or human, see 'scw help output' for more info (default "human") + -p, --profile string The config profile to use diff --git a/cmd/scw/testdata/test-main-usage-usage.golden b/cmd/scw/testdata/test-main-usage-usage.golden index 082d534ec4..d8ccccf80d 100644 --- a/cmd/scw/testdata/test-main-usage-usage.golden +++ b/cmd/scw/testdata/test-main-usage-usage.golden @@ -8,6 +8,7 @@ AI COMMANDS: AVAILABLE COMMANDS: datalab Data Lab API for Apache Spark™ + domain Domains and DNS - Registrar API BAREMETAL COMMANDS: apple-silicon Apple silicon API diff --git a/docs/commands/domain.md b/docs/commands/domain.md new file mode 100644 index 0000000000..604c3105b1 --- /dev/null +++ b/docs/commands/domain.md @@ -0,0 +1,6 @@ + +# Documentation for `scw domain` +Manage your domains and contacts. + + + diff --git a/go.mod b/go.mod index 3543e836b0..451e7d904b 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/moby/buildkit v0.28.0 github.com/moby/go-archive v0.2.0 github.com/opencontainers/go-digest v1.0.0 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 20df7e8a1d..d419cdf518 100644 --- a/go.sum +++ b/go.sum @@ -476,8 +476,8 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64 h1:wXpcK+W/EOdVu62G+knMgLHdTrMlmxzkpQkzFy3re9M= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260316103241-3ecf8306ce64/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce h1:WbR0BSDl9BPWA6MR8GHvqozhe2v1/soaEEBISY0DeRk= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.36.0.20260318093803-884e805f81ce/go.mod h1:SKcIU6lqwljcpjOlTnSfMFfURd/XT+08spQyqN9OTWA= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM= github.com/secure-systems-lab/go-securesystemslib v0.10.0 h1:l+H5ErcW0PAehBNrBxoGv1jjNpGYdZ9RcheFkB2WI14= diff --git a/internal/namespaces/domain/v2beta1/domain_cli.go b/internal/namespaces/domain/v2beta1/domain_cli.go index 2e9af85e12..b63a5209e7 100644 --- a/internal/namespaces/domain/v2beta1/domain_cli.go +++ b/internal/namespaces/domain/v2beta1/domain_cli.go @@ -20,6 +20,7 @@ var ( func GetGeneratedCommands() *core.Commands { return core.NewCommands( dnsRoot(), + domainRoot(), dnsZone(), dnsRecord(), dnsTsigKey(), @@ -59,6 +60,14 @@ func dnsRoot() *core.Command { } } +func domainRoot() *core.Command { + return &core.Command{ + Short: `Domains and DNS - Registrar API`, + Long: `Manage your domains and contacts.`, + Namespace: "domain", + } +} + func dnsZone() *core.Command { return &core.Command{ Short: `DNS Zones management`,