Skip to content
Snippets Groups Projects
Commit 2ec73229 authored by renovate_bot's avatar renovate_bot Committed by Matthias Feyll
Browse files

[renovate] Update module github.com/bufbuild/protovalidate-go to v0.7.0


See merge request !1042

Co-authored-by: default avatarFabian Seidl <fabian.seidl@h-da.de>
Co-authored-by: default avatarRenovate Bot <renovate@danet.fbi.h-da.de>
parent 60aa4809
No related branches found
No related tags found
No related merge requests found
...@@ -89,9 +89,9 @@ func TestAuth_Login(t *testing.T) { ...@@ -89,9 +89,9 @@ func TestAuth_Login(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "username", FieldPath: stringToPointer("username"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}}, }},
}, },
} }
...@@ -160,9 +160,9 @@ func TestAuth_Logout(t *testing.T) { ...@@ -160,9 +160,9 @@ func TestAuth_Logout(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "username", FieldPath: stringToPointer("username"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}}, }},
}, },
} }
......
...@@ -84,9 +84,9 @@ func TestRole_CreateRoles(t *testing.T) { ...@@ -84,9 +84,9 @@ func TestRole_CreateRoles(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "roles[0].name", FieldPath: stringToPointer("roles[0].name"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 3 characters", Message: stringToPointer("value length must be at least 3 characters"),
}}, }},
}, },
{ {
...@@ -105,9 +105,9 @@ func TestRole_CreateRoles(t *testing.T) { ...@@ -105,9 +105,9 @@ func TestRole_CreateRoles(t *testing.T) {
want: &apb.CreateRolesResponse{}, want: &apb.CreateRolesResponse{},
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{{ validationErrors: []*validate.Violation{{
FieldPath: "roles[0].description", FieldPath: stringToPointer("roles[0].description"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 3 characters", Message: stringToPointer("value length must be at least 3 characters"),
}}, }},
}, },
} }
...@@ -181,9 +181,9 @@ func TestRole_GetRole(t *testing.T) { ...@@ -181,9 +181,9 @@ func TestRole_GetRole(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "role_name", FieldPath: stringToPointer("role_name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
...@@ -355,9 +355,9 @@ func TestRole_UpdateRoles(t *testing.T) { ...@@ -355,9 +355,9 @@ func TestRole_UpdateRoles(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "roles[0].name", FieldPath: stringToPointer("roles[0].name"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 3 characters", Message: stringToPointer("value length must be at least 3 characters"),
}, },
}, },
}, },
...@@ -379,9 +379,9 @@ func TestRole_UpdateRoles(t *testing.T) { ...@@ -379,9 +379,9 @@ func TestRole_UpdateRoles(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "roles[0].description", FieldPath: stringToPointer("roles[0].description"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 3 characters", Message: stringToPointer("value length must be at least 3 characters"),
}, },
}, },
}, },
...@@ -456,14 +456,14 @@ func TestRole_DeletePermissionsForRole(t *testing.T) { ...@@ -456,14 +456,14 @@ func TestRole_DeletePermissionsForRole(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "role_name", FieldPath: stringToPointer("role_name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
{ {
FieldPath: "permissions_to_delete", FieldPath: stringToPointer("permissions_to_delete"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
...@@ -537,9 +537,9 @@ func TestRole_DeleteRoles(t *testing.T) { ...@@ -537,9 +537,9 @@ func TestRole_DeleteRoles(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "role_name", FieldPath: stringToPointer("role_name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
......
...@@ -305,3 +305,7 @@ func initUUIDs(t *testing.T) { ...@@ -305,3 +305,7 @@ func initUUIDs(t *testing.T) {
// _ = mneServer.mneService.Delete(mne) // _ = mneServer.mneService.Delete(mne)
// } // }
// } // }
func stringToPointer(str string) *string {
return &str
}
...@@ -285,29 +285,29 @@ func TestTopology_AddLink(t *testing.T) { ...@@ -285,29 +285,29 @@ func TestTopology_AddLink(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "link.name", FieldPath: stringToPointer("link.name"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 1 characters", Message: stringToPointer("value length must be at least 1 characters"),
}, },
{ {
FieldPath: "link.sourceNode", FieldPath: stringToPointer("link.sourceNode"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
{ {
FieldPath: "link.targetNode", FieldPath: stringToPointer("link.targetNode"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
{ {
FieldPath: "link.sourcePort", FieldPath: stringToPointer("link.sourcePort"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
{ {
FieldPath: "link.targetPort", FieldPath: stringToPointer("link.targetPort"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
...@@ -461,9 +461,9 @@ func TestTopology_DeleteLink(t *testing.T) { ...@@ -461,9 +461,9 @@ func TestTopology_DeleteLink(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "id", FieldPath: stringToPointer("id"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}}, }},
}, },
} }
......
...@@ -90,9 +90,9 @@ func TestUser_CreateUsers(t *testing.T) { ...@@ -90,9 +90,9 @@ func TestUser_CreateUsers(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "user[0].password", FieldPath: stringToPointer("user[0].password"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 5 characters", Message: stringToPointer("value length must be at least 5 characters"),
}}, }},
}, },
{ {
...@@ -116,9 +116,9 @@ func TestUser_CreateUsers(t *testing.T) { ...@@ -116,9 +116,9 @@ func TestUser_CreateUsers(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "user[0].name", FieldPath: stringToPointer("user[0].name"),
ConstraintId: "string.min_len", ConstraintId: stringToPointer("string.min_len"),
Message: "value length must be at least 3 characters", Message: stringToPointer("value length must be at least 3 characters"),
}}, }},
}, },
} }
...@@ -190,9 +190,9 @@ func TestUser_GetUser(t *testing.T) { ...@@ -190,9 +190,9 @@ func TestUser_GetUser(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "name", FieldPath: stringToPointer("name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}}, }},
}, },
} }
...@@ -341,9 +341,9 @@ func TestUser_UpdateUsers(t *testing.T) { ...@@ -341,9 +341,9 @@ func TestUser_UpdateUsers(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "name", FieldPath: stringToPointer("name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
...@@ -402,9 +402,9 @@ func TestUser_DeleteUsers(t *testing.T) { ...@@ -402,9 +402,9 @@ func TestUser_DeleteUsers(t *testing.T) {
wantErr: true, wantErr: true,
validationErrors: []*validate.Violation{ validationErrors: []*validate.Violation{
{ {
FieldPath: "name", FieldPath: stringToPointer("name"),
ConstraintId: "required", ConstraintId: stringToPointer("required"),
Message: "value is required", Message: stringToPointer("value is required"),
}, },
}, },
}, },
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
func contains(array []*validate.Violation, err *validate.Violation) bool { func contains(array []*validate.Violation, err *validate.Violation) bool {
for _, v := range array { for _, v := range array {
if v.FieldPath == err.FieldPath && v.ConstraintId == err.ConstraintId && v.Message == err.Message { if *v.FieldPath == *err.FieldPath && *v.ConstraintId == *err.ConstraintId && *v.Message == *err.Message {
return true return true
} }
} }
......
...@@ -8,6 +8,8 @@ atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs= ...@@ -8,6 +8,8 @@ atomicgo.dev/schedule v0.1.0 h1:nTthAbhZS5YZmgYbb2+DH8uQIZcTlIrd4eYr3UQxEjs=
atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU= atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8pEU=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2 h1:SZRVx928rbYZ6hEKUIN+vtGDkl7uotABRWGY4OAg5gM= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2 h1:SZRVx928rbYZ6hEKUIN+vtGDkl7uotABRWGY4OAg5gM=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2/go.mod h1:ylS4c28ACSI59oJrOdW4pHS4n0Hw4TgSPHn8rpHl4Yw= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240717164558-a6c49f84cc0f.2/go.mod h1:ylS4c28ACSI59oJrOdW4pHS4n0Hw4TgSPHn8rpHl4Yw=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240920164238-5a7b106cbb87.2 h1:hl0FrmGlNpQZIGvU1/jDz0lsPDd0BhCE0QDRwPfLZcA=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.34.2-20240920164238-5a7b106cbb87.2/go.mod h1:ylS4c28ACSI59oJrOdW4pHS4n0Hw4TgSPHn8rpHl4Yw=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=
...@@ -43,6 +45,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= ...@@ -43,6 +45,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bufbuild/protovalidate-go v0.6.5 h1:WucDKXIbK22WjkO8A8J6Yyxxy0jl91Oe9LSMduq3YEE= github.com/bufbuild/protovalidate-go v0.6.5 h1:WucDKXIbK22WjkO8A8J6Yyxxy0jl91Oe9LSMduq3YEE=
github.com/bufbuild/protovalidate-go v0.6.5/go.mod h1:LHDiGCWSM3GagZEnyEZ1sPtFwi6Ja4tVTi/DCc+iDFI= github.com/bufbuild/protovalidate-go v0.6.5/go.mod h1:LHDiGCWSM3GagZEnyEZ1sPtFwi6Ja4tVTi/DCc+iDFI=
github.com/bufbuild/protovalidate-go v0.7.0 h1:MYU9GSZM7TSsWNywvyXoEc8y3kc1MNqD3k5mddIBEL4=
github.com/bufbuild/protovalidate-go v0.7.0/go.mod h1:PHV5pFuWlRzdDW02/cmVyNzdiQ+RNNwo7idGxdzS7o4=
github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI= github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI=
github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY= github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment