SSL

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsxSslConfigCmd = &cobra.Command{
	Use:   "getSslConfig",
	Short: "getSslConfig command gets ssl configuration",
	Long:  `getSslConfig command gets ssl configuration`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getSslConfig command")
		var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("error during authentication: %v\n", err)
			err := cmd.Help()
			if err != nil {
				return
			}
			return
		}
		if authFlag {
			arn, _ := cmd.Flags().GetString("arn")
			if arn == "" {
				log.Printf("ssl arn missing")
				err := cmd.Help()
				if err != nil {
					return
				}
				return
			}

			instances, err := GetSslInstanceByArn(arn, clientAuth, nil)
			if err != nil {
				log.Println("error getting getSslConfig by function name: ", err)
				return
			}
			fmt.Println(instances)

		}
	},
}
View Source
var AwsxSslListCmd = &cobra.Command{
	Use:   "getSslList",
	Short: "getSslList command gets list of ssl instances of an aws account",
	Long:  `getSslList command gets list of ssl instances of an aws account`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getSslList command")
		var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("error during authentication: %v\n", err)
			err := cmd.Help()
			if err != nil {
				return
			}
			return
		}
		if authFlag {
			resp, err := ListSslInstances(clientAuth, nil)
			if err != nil {
				log.Println("error getting getSslList: ", err)
				return
			}
			fmt.Println(resp)
		}
	},
}

Functions

func GetSslInstanceByArn

func GetSslInstanceByArn(arn string, clientAuth *model.Auth, client *acm.ACM) (*acm.DescribeCertificateOutput, error)

func ListSslInstances

func ListSslInstances(clientAuth *model.Auth, client *acm.ACM) (*acm.ListCertificatesOutput, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL