Upgrade to Go 1.19 (#2347)

This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2022-08-25 12:12:24 -04:00
1 parent 07a4082aa1
commit aef9073fa6
77 files changed
+334 -294

No files matched your search

@@ -97,10 +97,12 @@ func defaultExtract(sd data, usernameAttr, privateKeyAttr, passphraseAttr string
// 'data' field within the data map.
//
// Additionaly it validates the data is in the expected KV-v2 format:
// {
// "data": {},
// "metadata: {}
// }
//
// {
// "data": {},
// "metadata: {}
// }
//
// If the format does not match, it returns ("", ""). See:
// https://www.vaultproject.io/api/secret/kv/kv-v2#sample-response-1
func kv2Extract(sd data, usernameAttr, privateKeyAttr, passphraseAttr string) (
@@ -82,10 +82,12 @@ func defaultExtract(sd data, usernameAttr, passwordAttr string) (username string
// 'data' field within the data map.
//
// Additionaly it validates the data is in the expected KV-v2 format:
// {
// "data": {},
// "metadata: {}
// }
//
// {
// "data": {},
// "metadata: {}
// }
//
// If the format does not match, it returns ("", ""). See:
// https://www.vaultproject.io/api/secret/kv/kv-v2#sample-response-1
func kv2Extract(sd data, usernameAttr, passwordAttr string) (username string, password string) {
+6 -2
View File
@@ -248,7 +248,9 @@ type Token struct {
// expiration_time is calculated when the token is renewed.
//
// The calculation is:
// expiration_time := time.Now().Add(LeaseDuration * time.Second)
//
// expiration_time := time.Now().Add(LeaseDuration * time.Second)
//
// LeaseDuration is a value returned by Vault when the token is renewed.
//
// https://www.vaultproject.io/api-docs/auth/token#renew-a-token-self
@@ -664,7 +666,9 @@ type Credential struct {
// retrieved and whenever the credential's lease is renewed.
//
// The calculation is:
// expiration_time := time.Now().Add(LeaseDuration * time.Second)
//
// expiration_time := time.Now().Add(LeaseDuration * time.Second)
//
// LeaseDuration is a value returned by Vault when the credential is
// retrieved or the lease for the credential is renewed.
//
+9 -9
View File
@@ -738,9 +738,9 @@ func (v *TestVaultServer) addPolicy(t testing.TB, name string, pc pathCapabiliti
// standard set of polices attached to tokens created with v.CreateToken.
// The policy is defined as:
//
// path "mountPath/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
// path "mountPath/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
func (v *TestVaultServer) MountPKI(t testing.TB, opt ...TestOption) *vault.Secret {
t.Helper()
require := require.New(t)
@@ -802,9 +802,9 @@ func (v *TestVaultServer) MountPKI(t testing.TB, opt ...TestOption) *vault.Secre
// standard set of polices attached to tokens created with v.CreateToken.
// The policy is defined as:
//
// path "secret/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
// path "secret/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
//
// All options are ignored.
func (v *TestVaultServer) AddKVPolicy(t testing.TB, _ ...TestOption) {
@@ -872,9 +872,9 @@ func NewTestVaultServer(t testing.TB, opt ...TestOption) *TestVaultServer {
// to the standard set of polices attached to tokens created with
// v.CreateToken. The policy is defined as:
//
// path "mountPath/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
// path "mountPath/*" {
// capabilities = ["create", "read", "update", "delete", "list"]
// }
//
// MountDatabase returns a TestDatabase for testing credentials from the
// mount.