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

@@ -936,9 +936,9 @@ func toStoragePwAccount(amId string, item *pb.Account) (*password.Account, error
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetAccountRequest) error {
const op = "accounts.validateGetRequest"
if req == nil {
@@ -818,9 +818,9 @@ func toAuthTokenProto(t *authtoken.AuthToken) *pba.AuthToken {
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetAuthMethodRequest) error {
const op = "authmethod.validateGetRequest"
if req == nil {
@@ -362,9 +362,9 @@ func toProto(ctx context.Context, in *authtoken.AuthToken, opt ...handlers.Optio
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetAuthTokenRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, authtoken.AuthTokenPrefix)
}
@@ -633,9 +633,9 @@ func toStorageVaultLibrary(storeId string, in *pb.CredentialLibrary) (out *vault
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetCredentialLibraryRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, vault.CredentialLibraryPrefix)
}
@@ -627,9 +627,9 @@ func toSshPrivateKeyStorageCredential(ctx context.Context, storeId string, in *p
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetCredentialRequest) error {
return handlers.ValidateGetRequest(
handlers.NoopValidatorFn,
@@ -770,9 +770,9 @@ func toStorageVaultStore(scopeId string, in *pb.CredentialStore) (out *vault.Cre
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetCredentialStoreRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, vault.CredentialStorePrefix, static.CredentialStorePrefix, static.PreviousCredentialStorePrefix)
}
@@ -33,7 +33,7 @@ func NewFilter(f string) (*Filter, error) {
// Match returns if the provided interface matches the filter.
// If the filter does not match the structure of the object being Matched, false is returned.
// TODO: Support more than just matching against the item being filtered. Also allow matching against
// values in the request or the request context itself.
// values in the request or the request context itself.
func (f *Filter) Match(item interface{}) bool {
if f.eval == nil {
return true
@@ -651,9 +651,9 @@ func toProto(ctx context.Context, in *iam.Group, members []*iam.GroupMember, opt
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetGroupRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, iam.GroupPrefix)
}
@@ -814,11 +814,11 @@ func toStoragePluginCatalog(ctx context.Context, projectId, plgId string, item *
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// * The type asserted by the ID and/or field is known
// * If relevant, the type derived from the id prefix matches what is claimed by the type field
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
// - The type asserted by the ID and/or field is known
// - If relevant, the type derived from the id prefix matches what is claimed by the type field
func validateGetRequest(req *pbs.GetHostCatalogRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, static.HostCatalogPrefix, plugin.HostCatalogPrefix, plugin.PreviousHostCatalogPrefix)
}
@@ -937,11 +937,11 @@ func toStoragePluginSet(ctx context.Context, catalogId string, item *pb.HostSet)
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// * The type asserted by the ID and/or field is known
// * If relevant, the type derived from the id prefix matches what is claimed by the type field
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
// - The type asserted by the ID and/or field is known
// - If relevant, the type derived from the id prefix matches what is claimed by the type field
func validateGetRequest(req *pbs.GetHostSetRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, static.HostSetPrefix, plugin.HostSetPrefix, plugin.PreviousHostSetPrefix)
}
@@ -601,11 +601,11 @@ func toProto(ctx context.Context, in host.Host, opt ...handlers.Option) (*pb.Hos
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// * The type asserted by the ID and/or field is known
// * If relevant, the type derived from the id prefix matches what is claimed by the type field
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
// - The type asserted by the ID and/or field is known
// - If relevant, the type derived from the id prefix matches what is claimed by the type field
func validateGetRequest(req *pbs.GetHostRequest) error {
return handlers.ValidateGetRequest(func() map[string]string {
badFields := map[string]string{}
@@ -572,9 +572,9 @@ func toProto(ctx context.Context, in auth.ManagedGroup, opt ...handlers.Option)
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetManagedGroupRequest) error {
const op = "managed_groups.validateGetRequest"
if req == nil {
@@ -880,9 +880,9 @@ func toProto(ctx context.Context, in *iam.Role, principals []*iam.PrincipalRole,
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetRoleRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, iam.RolePrefix)
}
@@ -591,9 +591,9 @@ func ToProto(ctx context.Context, in *iam.Scope, opt ...handlers.Option) (*pb.Sc
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetScopeRequest) error {
badFields := map[string]string{}
id := req.GetId()
@@ -473,9 +473,9 @@ func toProto(ctx context.Context, in *session.Session, opt ...handlers.Option) (
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetSessionRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, session.SessionPrefix)
}
@@ -1570,9 +1570,9 @@ func toProto(ctx context.Context, in target.Target, hostSources []target.HostSou
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetTargetRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, target.Prefixes()...)
}
@@ -661,9 +661,9 @@ func toProto(ctx context.Context, in *iam.User, accts []string, opt ...handlers.
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetUserRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, iam.UserPrefix)
}
@@ -717,9 +717,9 @@ func tagsToMapProto(in map[string][]string) (map[string]*structpb.ListValue, err
// A validateX method should exist for each method above. These methods do not make calls to any backing service but enforce
// requirements on the structure of the request. They verify that:
// * The path passed in is correctly formatted
// * All required parameters are set
// * There are no conflicting parameters provided
// - The path passed in is correctly formatted
// - All required parameters are set
// - There are no conflicting parameters provided
func validateGetRequest(req *pbs.GetWorkerRequest) error {
return handlers.ValidateGetRequest(handlers.NoopValidatorFn, req, server.WorkerPrefix)
}