Skip to content

Commit

Permalink
Add the option to sign up for YBM (#78)
Browse files Browse the repository at this point in the history
* Add the option to sign up for YBM
  • Loading branch information
cdavid authored Mar 3, 2023
1 parent 08810a0 commit 3a18814
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 37 deletions.
67 changes: 37 additions & 30 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ The following subcomponents are used:
## github.com/google/uuid

* Name: github.com/google/uuid
* Version: v1.1.2
* License: [BSD-3-Clause](https://github.com/google/uuid/blob/v1.1.2/LICENSE)
* Version: v1.3.0
* License: [BSD-3-Clause](https://github.com/google/uuid/blob/v1.3.0/LICENSE)


## github.com/hashicorp/hcl
Expand All @@ -90,15 +90,15 @@ The following subcomponents are used:
## github.com/huandu/xstrings

* Name: github.com/huandu/xstrings
* Version: v1.3.3
* License: [MIT](https://github.com/huandu/xstrings/blob/v1.3.3/LICENSE)
* Version: v1.4.0
* License: [MIT](https://github.com/huandu/xstrings/blob/v1.4.0/LICENSE)


## github.com/imdario/mergo

* Name: github.com/imdario/mergo
* Version: v0.3.11
* License: [BSD-3-Clause](https://github.com/imdario/mergo/blob/v0.3.11/LICENSE)
* Version: v0.3.13
* License: [BSD-3-Clause](https://github.com/imdario/mergo/blob/v0.3.13/LICENSE)


## github.com/inhies/go-bytesize
Expand Down Expand Up @@ -139,8 +139,8 @@ The following subcomponents are used:
## github.com/mitchellh/copystructure

* Name: github.com/mitchellh/copystructure
* Version: v1.0.0
* License: [MIT](https://github.com/mitchellh/copystructure/blob/v1.0.0/LICENSE)
* Version: v1.2.0
* License: [MIT](https://github.com/mitchellh/copystructure/blob/v1.2.0/LICENSE)


## github.com/mitchellh/mapstructure
Expand All @@ -153,22 +153,22 @@ The following subcomponents are used:
## github.com/mitchellh/reflectwalk

* Name: github.com/mitchellh/reflectwalk
* Version: v1.0.0
* License: [MIT](https://github.com/mitchellh/reflectwalk/blob/v1.0.0/LICENSE)
* Version: v1.0.2
* License: [MIT](https://github.com/mitchellh/reflectwalk/blob/v1.0.2/LICENSE)


## github.com/onsi/ginkgo/v2

* Name: github.com/onsi/ginkgo/v2
* Version: v2.8.1
* License: [MIT](https://github.com/onsi/ginkgo/blob/v2.8.1/LICENSE)
* Version: v2.8.4
* License: [MIT](https://github.com/onsi/ginkgo/blob/v2.8.4/LICENSE)


## github.com/onsi/gomega

* Name: github.com/onsi/gomega
* Version: v1.27.1
* License: [MIT](https://github.com/onsi/gomega/blob/v1.27.1/LICENSE)
* Version: v1.27.2
* License: [MIT](https://github.com/onsi/gomega/blob/v1.27.2/LICENSE)


## github.com/pelletier/go-toml/v2
Expand All @@ -178,6 +178,13 @@ The following subcomponents are used:
* License: [MIT](https://github.com/pelletier/go-toml/blob/v2.0.6/LICENSE)


## github.com/pkg/browser

* Name: github.com/pkg/browser
* Version: v0.0.0-20210911075715-681adbf594b8
* License: [BSD-2-Clause](https://github.com/pkg/browser/blob/681adbf594b8/LICENSE)


## github.com/pkg/errors

* Name: github.com/pkg/errors
Expand All @@ -188,15 +195,15 @@ The following subcomponents are used:
## github.com/rivo/uniseg

* Name: github.com/rivo/uniseg
* Version: v0.2.0
* License: [MIT](https://github.com/rivo/uniseg/blob/v0.2.0/LICENSE.txt)
* Version: v0.4.4
* License: [MIT](https://github.com/rivo/uniseg/blob/v0.4.4/LICENSE.txt)


## github.com/shopspring/decimal

* Name: github.com/shopspring/decimal
* Version: v1.2.0
* License: [MIT](https://github.com/shopspring/decimal/blob/v1.2.0/LICENSE)
* Version: v1.3.1
* License: [MIT](https://github.com/shopspring/decimal/blob/v1.3.1/LICENSE)


## github.com/sirupsen/logrus
Expand All @@ -209,8 +216,8 @@ The following subcomponents are used:
## github.com/spf13/afero

* Name: github.com/spf13/afero
* Version: v1.9.3
* License: [Apache-2.0](https://github.com/spf13/afero/blob/v1.9.3/LICENSE.txt)
* Version: v1.9.4
* License: [Apache-2.0](https://github.com/spf13/afero/blob/v1.9.4/LICENSE.txt)


## github.com/spf13/cast
Expand Down Expand Up @@ -286,22 +293,22 @@ The following subcomponents are used:
## golang.org/x/exp

* Name: golang.org/x/exp
* Version: v0.0.0-20230203172020-98cc5a0785f9
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/98cc5a07:LICENSE)
* Version: v0.0.0-20230224173230-c95f2b4c22f2
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/c95f2b4c:LICENSE)


## golang.org/x/net
## golang.org/x/net/html

* Name: golang.org/x/net
* Version: v0.5.0
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.5.0:LICENSE)
* Name: golang.org/x/net/html
* Version: v0.7.0
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.7.0:LICENSE)


## golang.org/x/oauth2

* Name: golang.org/x/oauth2
* Version: v0.0.0-20221014153046-6fdb5e3db783
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/oauth2/+/6fdb5e3d:LICENSE)
* Version: v0.5.0
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/oauth2/+/v0.5.0:LICENSE)


## golang.org/x/sys/unix
Expand All @@ -314,8 +321,8 @@ The following subcomponents are used:
## golang.org/x/term

* Name: golang.org/x/term
* Version: v0.4.0
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/term/+/v0.4.0:LICENSE)
* Version: v0.5.0
* License: [BSD-3-Clause](https://cs.opensource.google/go/x/term/+/v0.5.0:LICENSE)


## golang.org/x/text
Expand Down
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/yugabyte/ybm-cli/cmd/cluster"
"github.com/yugabyte/ybm-cli/cmd/nal"
"github.com/yugabyte/ybm-cli/cmd/readreplica"
"github.com/yugabyte/ybm-cli/cmd/signup"
"github.com/yugabyte/ybm-cli/cmd/util"
"github.com/yugabyte/ybm-cli/cmd/vpc"
"github.com/yugabyte/ybm-cli/cmd/vpcpeering"
Expand Down Expand Up @@ -100,6 +101,7 @@ func init() {
rootCmd.AddCommand(vpc.VPCCmd)
rootCmd.AddCommand(vpcpeering.VPCPeeringCmd)
rootCmd.AddCommand(configureCmd)
rootCmd.AddCommand(signup.SignUpCmd)
util.AddCommandIfFeatureFlag(rootCmd, cdc.CdcCmd, util.CDC)

}
Expand Down
30 changes: 30 additions & 0 deletions cmd/signup/signup.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Licensed to Yugabyte, Inc. under one or more contributor license
// agreements. See the NOTICE file distributed with this work for
// additional information regarding copyright ownership. Yugabyte
// licenses this file to you under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package signup

import (
"github.com/pkg/browser"
"github.com/spf13/cobra"
)

var SignUpCmd = &cobra.Command{
Use: "signup",
Short: "Open a browser to sign up for YugabyteDB Managed",
Long: "Open a browser to sign up for YugabyteDB Managed",
Run: func(cmd *cobra.Command, args []string) {
browser.OpenURL("https://cloud.yugabyte.com/signup")
},
}
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ require (
github.com/fatih/color v1.14.1
github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf
github.com/mattn/go-runewidth v0.0.14
github.com/onsi/ginkgo/v2 v2.8.1
github.com/onsi/gomega v1.27.1
github.com/onsi/ginkgo/v2 v2.8.4
github.com/onsi/gomega v1.27.2
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.15.0
github.com/yugabyte/yugabytedb-managed-go-client-internal v0.0.0-20230128004341-7bd09f253ed8
golang.org/x/crypto v0.6.0
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2
gotest.tools/v3 v3.4.0
)
Expand All @@ -25,8 +27,10 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
Expand All @@ -46,12 +50,12 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
16 changes: 12 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -132,6 +134,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -185,12 +189,14 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/onsi/ginkgo/v2 v2.8.1 h1:xFTEVwOFa1D/Ty24Ws1npBWkDYEV9BqZrsDxVrVkrrU=
github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc=
github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754=
github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw=
github.com/onsi/ginkgo/v2 v2.8.4 h1:gf5mIQ8cLFieruNLAdgijHF1PYfLphKm2dxxcUtcqK0=
github.com/onsi/ginkgo/v2 v2.8.4/go.mod h1:427dEDQZkDKsBvCjc2A/ZPefhKxsTTrsQegMlayL730=
github.com/onsi/gomega v1.27.2 h1:SKU0CXeKE/WVgIV1T61kSa3+IRE8Ekrv9rdXDwwTqnY=
github.com/onsi/gomega v1.27.2/go.mod h1:5mR3phAHpkAVIDkHEUBY6HGVsU+cpcEscrGPB4oPlZI=
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
Expand Down Expand Up @@ -399,6 +405,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down

0 comments on commit 3a18814

Please sign in to comment.