Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "keyaliases", Aliases: []string{"ka"}, Short: "Manage Key Aliases", Long: "Manage Key Aliases", }
Cmd to manage key aliases
View Source
var CreateCmd = &cobra.Command{ Use: "create", Short: "Create a Key Alias from PEM, JAR or PKCS12 file", Long: "Create a Key Alias from PEM, JAR or PKCS12 file", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { var fileformat string switch format { case "pem": fileformat = "pem" case "pkcs12": fileformat = "pfx" case "jar": fileformat = "jar" default: return fmt.Errorf("invalid foramt key alias for %s", format) } if !fileExists(name + "." + fileformat) { return fmt.Errorf("file %s.%s not found. Do not specify file extension with key alias name", name, fileformat) } _, err = keyaliases.Create(keystoreName, name, format, password, ignoreExpiry, ignoreNewLine, "") return }, }
CreateCmd to create key aliases
View Source
var CrtslfCmd = &cobra.Command{ Use: "create-self-signed", Short: "Create a Key Alias from self-seigned cert", Long: "Create a Key Alias by generating a self-signed cert", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = keyaliases.Create(keystoreName, aliasName, "selfsignedcert", "", ignoreExpiry, ignoreNewLine, payload) return }, }
CrtslfCmd to create self signed key aliases
View Source
var CsrCmd = &cobra.Command{ Use: "csr", Short: "Generates a csr for the private key in an alias", Long: "Generates a PKCS #10 Certificate Signing Request for the private key in an alias", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = keyaliases.CreateCSR(keystoreName, aliasName) return }, }
Cmd to get key aliases
View Source
var DelCmd = &cobra.Command{ Use: "delete", Short: "Delete a Key Alias", Long: "Delete a Key Alias", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = keyaliases.Delete(keystoreName, aliasName) return }, }
Cmd to delete key aliases
View Source
var GetCmd = &cobra.Command{ Use: "get", Short: "Get a Key Alias", Long: "Get a Key Alias", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = keyaliases.Get(keystoreName, aliasName) return }, }
Cmd to get key aliases
View Source
var GetctCmd = &cobra.Command{ Use: "getcert", Short: "Get a Key alias certificate", Long: "Get a Key alias certificate", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { err = keyaliases.GetCert(keystoreName, aliasName) return }, }
Cmd to get key aliases
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "List Key Aliases", Long: "List Key Alises", Args: func(cmd *cobra.Command, args []string) (err error) { apiclient.SetApigeeOrg(org) apiclient.SetApigeeEnv(env) return nil }, RunE: func(cmd *cobra.Command, args []string) (err error) { _, err = keyaliases.List(keystoreName) return }, }
Cmd to list key aliases
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.