Skip to content

Commit d1d281a

Browse files
committed
fix(core): migrate from mitchellh/mapstructure to go-viper/mapstructure
1 parent 53a7aa0 commit d1d281a

File tree

8 files changed

+11
-7
lines changed

8 files changed

+11
-7
lines changed

service/authorization/authorization.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"connectrpc.com/connect"
1212
"github.com/creasty/defaults"
1313
"github.com/go-playground/validator/v10"
14-
"github.com/mitchellh/mapstructure"
14+
"github.com/go-viper/mapstructure/v2"
1515
"github.com/open-policy-agent/opa/rego"
1616
"github.com/opentdf/platform/protocol/go/authorization"
1717
"github.com/opentdf/platform/protocol/go/authorization/authorizationconnect"

service/entityresolution/entityresolution.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package entityresolution
22

33
import (
4-
"github.com/mitchellh/mapstructure"
4+
"github.com/go-viper/mapstructure/v2"
55
"github.com/opentdf/platform/protocol/go/entityresolution"
66
"github.com/opentdf/platform/protocol/go/entityresolution/entityresolutionconnect"
77
claims "github.com/opentdf/platform/service/entityresolution/claims"

service/entityresolution/keycloak/keycloak_entity_resolution.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010

1111
"connectrpc.com/connect"
1212
"github.com/Nerzal/gocloak/v13"
13+
"github.com/go-viper/mapstructure/v2"
1314
"github.com/lestrrat-go/jwx/v2/jwt"
14-
"github.com/mitchellh/mapstructure"
1515
"github.com/opentdf/platform/protocol/go/authorization"
1616
"github.com/opentdf/platform/protocol/go/entityresolution"
1717
auth "github.com/opentdf/platform/service/authorization"

service/go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ require (
1919
github.com/docker/go-connections v0.5.0
2020
github.com/go-chi/cors v1.2.1
2121
github.com/go-playground/validator/v10 v10.22.0
22+
github.com/go-viper/mapstructure/v2 v2.2.1
2223
github.com/google/uuid v1.6.0
2324
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1
2425
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
2526
github.com/jackc/pgx/v5 v5.5.5
2627
github.com/lestrrat-go/jwx/v2 v2.0.21
27-
github.com/mitchellh/mapstructure v1.5.0
2828
github.com/open-policy-agent/opa v0.68.0
2929
github.com/opentdf/platform/lib/fixtures v0.2.10
3030
github.com/opentdf/platform/lib/flattening v0.1.3
@@ -51,6 +51,8 @@ require (
5151
gopkg.in/yaml.v3 v3.0.1
5252
)
5353

54+
require github.com/mitchellh/mapstructure v1.5.0 // indirect
55+
5456
require (
5557
cel.dev/expr v0.19.1 // indirect
5658
github.com/Masterminds/semver/v3 v3.3.1 // indirect

service/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJ
146146
github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0=
147147
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
148148
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
149+
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
150+
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
149151
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
150152
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
151153
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=

service/kas/kas.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"net/url"
88
"strings"
99

10-
"github.com/mitchellh/mapstructure"
10+
"github.com/go-viper/mapstructure/v2"
1111
kaspb "github.com/opentdf/platform/protocol/go/kas"
1212
"github.com/opentdf/platform/protocol/go/kas/kasconnect"
1313
"github.com/opentdf/platform/service/kas/access"

service/pkg/server/services.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"slices"
99
"strings"
1010

11-
"github.com/mitchellh/mapstructure"
11+
"github.com/go-viper/mapstructure/v2"
1212
"github.com/opentdf/platform/sdk"
1313
"github.com/opentdf/platform/service/authorization"
1414
"github.com/opentdf/platform/service/entityresolution"

service/policy/config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log/slog"
66

77
"github.com/creasty/defaults"
8-
"github.com/mitchellh/mapstructure"
8+
"github.com/go-viper/mapstructure/v2"
99
"github.com/opentdf/platform/service/pkg/config"
1010
)
1111

0 commit comments

Comments
 (0)