Documentation ¶
Index ¶
- Constants
- Variables
- func AddSeparatorToHexFormattedString(s string, sep string) (string, error)
- func AreDNSNamesCorrect(actualAltNames []string, expectedCNNames []string, expectedAltNames []string) bool
- func CopyMap(m map[string]interface{}) map[string]interface{}
- func DecryptPkcs8PrivateKey(privateKey string, password string) (string, error)
- func EncryptPkcs1PrivateKey(privateKey string, password string) (string, error)
- func EncryptPrivateKey(privateKey string, password string) (string, error)
- func GetHexFormatted(buf []byte, sep string) (string, error)
- func GetPrivateKey(keyBytes []byte, passphrase string) ([]byte, error)
- func GetStatusCode(msg string) int64
- func NormalizeSerial(serial string) string
- func RandRunes(n int) string
- func RemoveDuplicateStr(strSlice *[]string)
- func SameIpSlice(x, y []net.IP) bool
- func SameStringSlice(x, y []string) bool
- func Sha1sum(s string) string
- func ShortDurationString(d time.Duration) string
- func SliceContains(slice []string, item string) bool
- func StringSlicesEqual(a []string, b []string) bool
Constants ¶
View Source
const ( CredentialsRootPath = `venafi/` StoreByCNString = "cn" StoreByHASHstring = "hash" StoreBySerialString = "serial" ErrorTextValueMustBeLess = `"ttl" value must be less than "max_ttl" value` ErrorTextStoreByAndStoreByCNOrSerialConflict = `Can't specify both story_by and store_by_cn or store_by_serial options '` ErrorTextNoStoreAndStoreByCNOrSerialConflict = `Can't specify both no_store and store_by_cn or store_by_serial options '` ErrorTextNoStoreAndStoreByConflict = `Can't specify both no_store and store_by options '` ErrTextStoreByWrongOption = "Option store_by can be %s, %s or %s, not %s" ErrorTextVenafiSecretEmpty = `"venafi_secret" argument is required` ErrorTextURLEmpty = `"url" argument is required` ErrorTextZoneEmpty = `"zone" argument is required` ErrorTextInvalidMode = "invalid mode: fakemode or apikey or tpp credentials or tpp access token required" ErrorTextNeed2RefreshTokens = "secrets engine requires 2 refresh tokens for no impact token refresh" )
View Source
const ( Role_ttl_test_property = int(120) Ttl_test_property = int(48) )
Variables ¶
Functions ¶
func AddSeparatorToHexFormattedString ¶
AddSeparatorToHexFormattedString gets a hexadecimal string and adds colon (:) every two characters it returns a string with a colon every two chracters and any error during the convertion process input: 6800b707811f0befb37f922b9e12f68eab8093 output: 68:00:b7:07:81:1f:0b:ef:b3:7f:92:2b:9e:12:f6:8e:ab:80:93
func AreDNSNamesCorrect ¶
func DecryptPkcs8PrivateKey ¶
func EncryptPkcs1PrivateKey ¶
func GetStatusCode ¶
func NormalizeSerial ¶
func RemoveDuplicateStr ¶
func RemoveDuplicateStr(strSlice *[]string)
we may want to enhance this function when we update to Go 1.18, since generics are only supported starting from that version
func SameIpSlice ¶
func SameStringSlice ¶
func ShortDurationString ¶
ShortDurationString will trim
func SliceContains ¶
func StringSlicesEqual ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.