Skip to content

Commit

Permalink
vendor: Update dependencies (#91)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <[email protected]>
  • Loading branch information
aeneasr authored Apr 5, 2019
1 parent 39a1486 commit 4d44174
Show file tree
Hide file tree
Showing 6 changed files with 638 additions and 115 deletions.
2 changes: 1 addition & 1 deletion cmd/client/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/ory/go-convenience/stringslice"
"github.com/ory/keto/engine/ladon"
"github.com/ory/x/cmdx"
"github.com/ory/x/flagx"
"github.com/ory/x/stringslice"
)

var client = http.DefaultClient
Expand Down
39 changes: 17 additions & 22 deletions cmd/server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,25 @@ import (
"github.com/gobuffalo/packr"
"github.com/jmoiron/sqlx"
"github.com/julienschmidt/httprouter"
"github.com/meatballhat/negroni-logrus"
negronilogrus "github.com/meatballhat/negroni-logrus"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/urfave/negroni"

"github.com/ory/go-convenience/stringslice"
"github.com/ory/graceful"
"github.com/ory/herodot"
"github.com/ory/keto/engine"
"github.com/ory/keto/engine/ladon"
"github.com/ory/x/stringslice"

// This forces go mod vendor to look for the package rego and its subpackages
_ "github.com/ory/keto/engine/ladon/rego"
"github.com/ory/keto/storage"
"github.com/ory/x/cmdx"
"github.com/ory/x/corsx"
"github.com/ory/x/dbal"
"github.com/ory/x/flagx"
"github.com/ory/x/healthx"
"github.com/ory/x/metricsx"
"github.com/ory/x/tlsx"
Expand Down Expand Up @@ -94,34 +93,30 @@ func RunServe(

router := httprouter.New()
ladon.NewEngine(s, sh, e, writer).Register(router)
healthx.NewHandler(writer, buildVersion, checks).SetRoutes(router)
healthx.NewHandler(writer, buildVersion, checks).SetRoutes(router, true)

n := negroni.New()
n.Use(negronilogrus.NewMiddlewareFromLogger(logger, "keto"))

if !flagx.MustGetBool(cmd, "disable-telemetry") {
logger.Println("Transmission of telemetry data is enabled, to learn more go to: https://www.ory.sh/docs/ecosystem/sqa")

m := metricsx.NewMetricsManager(
metricsx.Hash("DATABASE_URL"),
viper.GetString("DATABASE_URL") != "memory",
"jk32cFATnj9GKbQdFL7fBB9qtKZdX9j7",
stringslice.Merge(
metrics := metricsx.New(cmd, logger,
&metricsx.Options{
Service: "ory-keto",
ClusterID: metricsx.Hash(viper.GetString("DATABASE_URL")),
IsDevelopment: viper.GetString("DATABASE_URL") != "memory",
WriteKey: "jk32cFATnj9GKbQdFL7fBB9qtKZdX9j7",
WhitelistedPaths: stringslice.Merge(
healthx.RoutesToObserve(),
ladon.RoutesToObserve(),
),
logger,
"ory-keto",
100,
"",
)
go m.RegisterSegment(buildVersion, buildHash, buildTime)
go m.CommitMemoryStatistics()
n.Use(m)
}
BuildVersion: buildVersion,
BuildTime: buildHash,
BuildHash: buildTime,
},
)
n.Use(metrics)

n.UseHandler(router)
c := corsx.Initialize(n, logger)
c := corsx.Initialize(n, logger, "")

addr := fmt.Sprintf("%s:%s", viper.GetString("HOST"), viper.GetString("PORT"))
server := graceful.WithDefaults(&http.Server{
Expand Down
2 changes: 1 addition & 1 deletion engine/ladon/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/pborman/uuid"
"github.com/pkg/errors"

"github.com/ory/go-convenience/stringslice"
"github.com/ory/herodot"
"github.com/ory/keto/engine"
kstorage "github.com/ory/keto/storage"
"github.com/ory/x/stringslice"
)

// swagger:ignore
Expand Down
60 changes: 34 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,54 @@
module github.com/ory/keto

require (
github.com/OneOfOne/xxhash v1.2.2 // indirect
cloud.google.com/go v0.37.2 // indirect
github.com/Microsoft/go-winio v0.4.12 // indirect
github.com/akutz/goof v0.1.2 // indirect
github.com/akutz/gotil v0.1.0
github.com/containerd/continuity v0.0.0-20181023183536-c220ac4f01b8 // indirect
github.com/dchest/siphash v1.2.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/go-errors/errors v1.0.1
github.com/go-sql-driver/mysql v1.4.0
github.com/gobuffalo/packr v1.16.0
github.com/go-sql-driver/mysql v1.4.1
github.com/gobuffalo/packr v1.24.1
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/gddo v0.0.0-20181009135830-6c035858b4d7 // indirect
github.com/golang/gddo v0.0.0-20190312205958-5a2505f3dbf0 // indirect
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/gorilla/mux v1.7.1 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/jmoiron/sqlx v1.2.0
github.com/julienschmidt/httprouter v1.2.0
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
github.com/lib/pq v1.0.0
github.com/luna-duclos/instrumentedsql v0.0.0-20190316074304-ecad98b20aec // indirect
github.com/meatballhat/negroni-logrus v0.0.0-20170801195057-31067281800f
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/open-policy-agent/opa v0.10.1
github.com/opencontainers/runc v1.0.0-rc5 // indirect
github.com/ory/go-convenience v0.1.0
github.com/ory/graceful v0.1.0
github.com/ory/herodot v0.5.0
github.com/ory/x v0.0.33
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.6.0
github.com/ory/x v0.0.41
github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.8.0
github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 // indirect
github.com/rubenv/sql-migrate v0.0.0-20181106121204-ba2c6a7295c5
github.com/sirupsen/logrus v1.1.1
github.com/pelletier/go-toml v1.3.0 // indirect
github.com/pkg/errors v0.8.1
github.com/pkg/profile v1.3.0 // indirect
github.com/rubenv/sql-migrate v0.0.0-20190327083759-54bad0a9b051
github.com/sirupsen/logrus v1.4.1
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.2.1
github.com/stretchr/testify v1.2.2
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.3.2
github.com/stretchr/testify v1.3.0
github.com/urfave/negroni v1.0.0
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
github.com/ziutek/mymysql v1.5.4 // indirect
golang.org/x/crypto v0.0.0-20181025113841-85e1b3f9139a // indirect
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4 // indirect
golang.org/x/sys v0.0.0-20181025063200-d989b31c8746 // indirect
google.golang.org/api v0.0.0-20181025000501-39567f0042a0 // indirect
google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e // indirect
google.golang.org/grpc v1.16.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
go.opencensus.io v0.20.0 // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/appengine v1.5.0 // indirect
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 // indirect
google.golang.org/grpc v1.19.1 // indirect
gopkg.in/resty.v1 v1.9.1
)

// Fix for https://github.com/golang/lint/issues/436
replace github.com/golang/lint => github.com/golang/lint v0.0.0-20190227174305-8f45f776aaf1
Loading

0 comments on commit 4d44174

Please sign in to comment.