github.com/kolanos/fargate@v0.2.3/cmd/certificate.go (about)

     1  package cmd
     2  
     3  import (
     4  	ACM "github.com/jpignata/fargate/acm"
     5  	"github.com/jpignata/fargate/console"
     6  	"github.com/spf13/cobra"
     7  )
     8  
     9  var certificateCmd = &cobra.Command{
    10  	Use:   "certificate",
    11  	Short: "Manage certificates",
    12  	Long: `Manages certificate
    13  
    14  Certificates are TLS certificates issued by or imported into AWS Certificate
    15  Manager for use in securing traffic between load balancers and end users. ACM
    16  provides TLS certificates free of charge for use within AWS resources.`,
    17  }
    18  
    19  func init() {
    20  	rootCmd.AddCommand(certificateCmd)
    21  }
    22  
    23  func validateDomainName(domainName string) {
    24  	err := ACM.ValidateDomainName(domainName)
    25  
    26  	if err != nil {
    27  		console.ErrorExit(err, "Invalid domain name")
    28  	}
    29  }