Skip to content

Commit

Permalink
go version bump, proto version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Sep 28, 2022
1 parent 346782b commit d37037a
Show file tree
Hide file tree
Showing 23 changed files with 444 additions and 287 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ You'll still need to upload the configuration to the s3 bucket
# Manual build

```
protoc -I proto/ proto/notification.proto --go_out=plugins=grpc:proto/notification
protoc -I proto/ proto/notification.proto --go_out=proto/notification
protoc -I proto/ proto/config.proto --go_out=plugins=grpc:proto/config
make build-linux # linux
make build-darwin # darwin
Expand Down
18 changes: 14 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
module github.com/in4it/roxprox

go 1.16
go 1.19

replace github.com/golang/mock v1.4.3 => github.com/golang/mock v1.4.4

require (
github.com/aws/aws-sdk-go v1.38.69
github.com/envoyproxy/go-control-plane v0.10.3
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.7
github.com/google/uuid v1.2.0
github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.0
google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 // indirect
)
13 changes: 2 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down Expand Up @@ -144,7 +142,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e h1:FdDd7bdI6cjq5vaoYlK1mfQYfF9sF2VZw8VEZMsl5t8=
github.com/juju/loggo v0.0.0-20200526014432-9ce3a2e09b5e/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
Expand Down Expand Up @@ -175,7 +172,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
Expand Down Expand Up @@ -251,9 +247,7 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
Expand All @@ -271,7 +265,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -303,7 +296,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912 h1:uCLL3g5wH2xjxVREVuAbP9JM5PPKjRbXKRa6IBjkzmU=
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down Expand Up @@ -356,11 +348,9 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down Expand Up @@ -453,8 +443,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/authzfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
api "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
extAuthz "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_authz/v3"
any "github.com/golang/protobuf/ptypes/any"
"google.golang.org/protobuf/types/known/anypb"
any "google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/durationpb"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
tls "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3"
upstreams "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3"
cacheTypes "github.com/envoyproxy/go-control-plane/pkg/cache/types"
"github.com/golang/protobuf/ptypes/wrappers"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/durationpb"
wrappers "google.golang.org/protobuf/types/known/wrapperspb"
)

const PRESET_CONNECT_TIMEOUT_SECONDS = 2
Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/compression.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
api "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
gzip "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/gzip/compressor/v3"
compressor "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/compressor/v3"
any "github.com/golang/protobuf/ptypes/any"
"google.golang.org/protobuf/types/known/anypb"
any "google.golang.org/protobuf/types/known/anypb"
)

type Compression struct{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/envoy/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
envoyType "github.com/envoyproxy/go-control-plane/envoy/type/v3"
cacheTypes "github.com/envoyproxy/go-control-plane/pkg/cache/types"
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
any "github.com/golang/protobuf/ptypes/any"
"github.com/golang/protobuf/ptypes/wrappers"
"google.golang.org/protobuf/types/known/anypb"
any "google.golang.org/protobuf/types/known/anypb"
wrappers "google.golang.org/protobuf/types/known/wrapperspb"
)

const Error_NoFilterChainFound = "NoFilterChainFound"
Expand Down
3 changes: 1 addition & 2 deletions pkg/envoy/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
hcm "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
cacheTypes "github.com/envoyproxy/go-control-plane/pkg/cache/types"
"github.com/gogo/protobuf/types"
"github.com/juju/loggo"
)

Expand Down Expand Up @@ -1081,7 +1080,7 @@ func validateAuthzConfig(authzConfig *extAuthz.ExtAuthz, params ListenerParams,
if err != nil {
return fmt.Errorf("Could not parse timeout %s for listener %s", params.Authz.Timeout, listenerName)
}
if !types.DurationProto(timeout).Equal(authzConfig.GetGrpcService().GetTimeout()) {
if authzConfig.GetGrpcService().GetTimeout().AsDuration() != timeout {
return fmt.Errorf("authz has wrong timeout for listener %s", listenerName)
}

Expand Down
15 changes: 8 additions & 7 deletions pkg/envoy/listener_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (
tls "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
cacheTypes "github.com/envoyproxy/go-control-plane/pkg/cache/types"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/any"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
any "google.golang.org/protobuf/types/known/anypb"
)

// static listener functions
Expand All @@ -36,7 +37,7 @@ func getListenerHTTPConnectionManager(ll *api.Listener) (*hcm.HttpConnectionMana
func getManager(typedConfig *api.Filter_TypedConfig) (*hcm.HttpConnectionManager, error) {
var manager hcm.HttpConnectionManager

err := ptypes.UnmarshalAny(typedConfig.TypedConfig, &manager)
err := anypb.UnmarshalTo(typedConfig.TypedConfig, &manager, proto.UnmarshalOptions{})
if err != nil {
return &manager, err
}
Expand All @@ -47,7 +48,7 @@ func getManager(typedConfig *api.Filter_TypedConfig) (*hcm.HttpConnectionManager
func getTransportSocketDownStreamTlsSocket(typedConfig *core.TransportSocket_TypedConfig) (*tls.DownstreamTlsContext, error) {
var tlsContext tls.DownstreamTlsContext

err := ptypes.UnmarshalAny(typedConfig.TypedConfig, &tlsContext)
err := anypb.UnmarshalTo(typedConfig.TypedConfig, &tlsContext, proto.UnmarshalOptions{})
if err != nil {
return &tlsContext, err
}
Expand Down Expand Up @@ -109,7 +110,7 @@ func getListenerHTTPFilterJwtAuth(httpFilter []*hcm.HttpFilter) (*jwtAuth.JwtAut
if httpFilterPos == -1 {
return &jwtConfig, fmt.Errorf("HttpFilter for jwt missing")
}
err := ptypes.UnmarshalAny(httpFilter[httpFilterPos].GetTypedConfig(), &jwtConfig)
err := anypb.UnmarshalTo(httpFilter[httpFilterPos].GetTypedConfig(), &jwtConfig, proto.UnmarshalOptions{})
if err != nil {
return &jwtConfig, err
}
Expand All @@ -121,7 +122,7 @@ func getListenerHTTPFilterAuthz(httpFilter []*hcm.HttpFilter) (*extAuthz.ExtAuth
if httpFilterPos == -1 {
return &authzConfig, fmt.Errorf("HttpFilter for authz missing")
}
err := ptypes.UnmarshalAny(httpFilter[httpFilterPos].GetTypedConfig(), &authzConfig)
err := anypb.UnmarshalTo(httpFilter[httpFilterPos].GetTypedConfig(), &authzConfig, proto.UnmarshalOptions{})
if err != nil {
return &authzConfig, err
}
Expand Down Expand Up @@ -182,7 +183,7 @@ func getListenerAttributes(params ListenerParams, paramsTLS TLSParams) (bool, st
}
return tls, targetPrefix, virtualHostName, listenerName, listenerPort, matchType
}
func updateHTTPFilterWithConfig(httpFilter *[]*hcm.HttpFilter, filterName string, filterConfig *any.Any) {
func updateHTTPFilterWithConfig(httpFilter *[]*hcm.HttpFilter, filterName string, filterConfig *anypb.Any) {
// check whether filter exists
httpFilterPos := getListenerHTTPFilterIndex(filterName, *httpFilter)

Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/luafilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package envoy
import (
api "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
lua "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/lua/v3"
any "github.com/golang/protobuf/ptypes/any"
"google.golang.org/protobuf/types/known/anypb"
any "google.golang.org/protobuf/types/known/anypb"
)

type LuaFilter struct{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/mtls.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
rbac "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/rbac/v3"
tls "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
"github.com/golang/protobuf/ptypes/wrappers"
"google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/wrapperspb"
wrappers "google.golang.org/protobuf/types/known/wrapperspb"
)

type MTLS struct {
Expand Down
3 changes: 1 addition & 2 deletions pkg/envoy/ratelimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
route "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
rl "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ratelimit/v3"
ssl "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/ssl/v3"
any "github.com/golang/protobuf/ptypes/any"
"google.golang.org/protobuf/types/known/anypb"
)

Expand Down Expand Up @@ -78,7 +77,7 @@ func (r *RateLimit) updateListenersWithRateLimit(cache *WorkQueueCache, params R
return nil
}

func (r *RateLimit) getRateLimitConfigEncoded(params RateLimitParams) (*any.Any, error) {
func (r *RateLimit) getRateLimitConfigEncoded(params RateLimitParams) (*anypb.Any, error) {
rateLimitFilter, err := r.getRateLimitConfig(params)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/google/go-cmp/cmp"
pkgApi "github.com/in4it/roxprox/pkg/api"
storage "github.com/in4it/roxprox/pkg/storage"
"github.com/in4it/roxprox/proto/notification"
"github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
"github.com/juju/loggo"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
Expand Down
7 changes: 4 additions & 3 deletions pkg/envoy/xds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import (
als "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/grpc/v3"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
"github.com/golang/protobuf/ptypes"
"github.com/in4it/roxprox/pkg/storage"
localStorage "github.com/in4it/roxprox/pkg/storage/local"
"github.com/in4it/roxprox/proto/notification"
"github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
"github.com/juju/loggo"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)

func initStorage() (storage.Storage, error) {
Expand Down Expand Up @@ -853,7 +854,7 @@ func TestAccessLogServer(t *testing.T) {
return
}
var alsConfig als.HttpGrpcAccessLogConfig
err = ptypes.UnmarshalAny(manager.AccessLog[0].GetTypedConfig(), &alsConfig)
err = anypb.UnmarshalTo(manager.AccessLog[0].GetTypedConfig(), &alsConfig, proto.UnmarshalOptions{})
if err != nil {
t.Errorf("Cannot unmarshal HttpGrpcAccessLogConfig typed config")
return
Expand Down
3 changes: 2 additions & 1 deletion pkg/management/notificationreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"

envoy "github.com/in4it/roxprox/pkg/envoy"
notification "github.com/in4it/roxprox/proto/notification"
notification "github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
)

type NotificationReceiver struct {
xds *envoy.XDS
notification.UnimplementedNotificationServer
}

func (n *NotificationReceiver) SendNotification(ctx context.Context, in *notification.NotificationRequest) (*notification.NotificationReply, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/management/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net"

n "github.com/in4it/roxprox/proto/notification"
n "github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
"github.com/juju/loggo"
"google.golang.org/grpc"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/s3/notificationreceiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package s3
import (
"context"

n "github.com/in4it/roxprox/proto/notification"
n "github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/s3/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
pbN "github.com/in4it/roxprox/proto/notification"
pbN "github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
"github.com/juju/loggo"
"google.golang.org/grpc"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/s3/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

pbN "github.com/in4it/roxprox/proto/notification"
pbN "github.com/in4it/roxprox/proto/notification/github.com/in4it/roxprox/proto/notification"
)

func TestLookupPeers(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions proto/notification.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
syntax = "proto3";

option go_package = "github.com/in4it/roxprox/proto/notification";

service Notification {
rpc SendNotification(NotificationRequest) returns (NotificationReply) {}
}
Expand Down
Loading

0 comments on commit d37037a

Please sign in to comment.