Commit 46175da 1 parent d3ddd31 commit 46175da Copy full SHA for 46175da
File tree 2 files changed +1
-27
lines changed
2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change 1
1
package config
2
2
3
3
import (
4
- "encoding/json"
5
- "fmt"
6
4
"net/url"
7
5
"time"
8
6
@@ -261,18 +259,6 @@ type AuthorizationPolicy struct {
261
259
Rules []Rule `json:"rules" pflag:",Allow rules for matching requests."`
262
260
}
263
261
264
- func (ap AuthorizationPolicy ) MarshalJSON () ([]byte , error ) {
265
- return json .Marshal (ap )
266
- }
267
-
268
- func (ap AuthorizationPolicy ) UnmarshalJSON (b []byte ) error {
269
- err := json .Unmarshal (b , & ap )
270
- if err != nil {
271
- return fmt .Errorf ("unmarshalling AuthorizationPolicy: %w" , err )
272
- }
273
- return nil
274
- }
275
-
276
262
// A Rule is a struct that represents an API request to match on.
277
263
type Rule struct {
278
264
MethodPattern string `json:"methodPattern" pflag:",Regex pattern for the gRPC method of the request."`
@@ -296,18 +282,6 @@ type TokenClaim struct {
296
282
Name string `json:"name" pflag:",Scope of the claim to look for in the token."`
297
283
}
298
284
299
- func (tc TokenClaim ) MarshalJSON () ([]byte , error ) {
300
- return json .Marshal (tc )
301
- }
302
-
303
- func (tc TokenClaim ) UnmarshalJSON (b []byte ) error {
304
- err := json .Unmarshal (b , & tc )
305
- if err != nil {
306
- return fmt .Errorf ("unmarshalling TokenClaim: %w" , err )
307
- }
308
- return nil
309
- }
310
-
311
285
//go:generate enumer --type=SameSite --trimprefix=SameSite -json
312
286
type SameSite int
313
287
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ require (
52
52
github.com/wI2L/jsondiff v0.6.0
53
53
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0
54
54
go.opentelemetry.io/otel v1.24.0
55
+ golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
55
56
golang.org/x/net v0.33.0
56
57
golang.org/x/oauth2 v0.18.0
57
58
golang.org/x/sync v0.10.0
@@ -198,7 +199,6 @@ require (
198
199
go.uber.org/multierr v1.11.0 // indirect
199
200
go.uber.org/zap v1.27.0 // indirect
200
201
golang.org/x/crypto v0.31.0 // indirect
201
- golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
202
202
golang.org/x/sys v0.28.0 // indirect
203
203
golang.org/x/term v0.27.0 // indirect
204
204
golang.org/x/text v0.21.0 // indirect
You can’t perform that action at this time.
0 commit comments