Skip to content

Commit

Permalink
Use convert package from go-directory (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenh authored Oct 25, 2023
1 parent 1fd6432 commit 83ab201
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 200 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/aserto-dev/azm v0.0.6
github.com/aserto-dev/errors v0.0.6
github.com/aserto-dev/go-directory v0.21.8-0.20231015213014-2bac9fa0ff01
github.com/aserto-dev/go-directory v0.21.8-0.20231024193431-4f1633502744
github.com/bufbuild/protovalidate-go v0.3.4
github.com/gonvenience/ytbx v1.4.4
github.com/google/uuid v1.3.1
Expand Down
14 changes: 4 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230914171853-63dfe56cc2c4.1 h1:2gmp+PRca1fqQHf/WMKOgu9inVb0R0N07TucgY3QZCQ=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20230914171853-63dfe56cc2c4.1/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231017183020-0de7443d03cf.2 h1:t3Bq7+sq30Ga31zuUZVk02meAYwhiZ9SGMRVQPJJgqs=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231017183020-0de7443d03cf.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
Expand All @@ -14,8 +12,8 @@ github.com/aserto-dev/azm v0.0.6 h1:96pTpT9n7pX//9Pt/47VboxmEz1dYYuJUatXDmeGoH4=
github.com/aserto-dev/azm v0.0.6/go.mod h1:GeMRu6I7JMpByppqflZcusgbMZyXCGnYEdDW6x4qgX4=
github.com/aserto-dev/errors v0.0.6 h1:iH5fkJwBGFPbcdS4B8mwvNdwODlhDEXXPduZtjLh6vo=
github.com/aserto-dev/errors v0.0.6/go.mod h1:kenI1gamsemaR2wS+M2un0kXIJ9exTrmeRT/fCFwlWc=
github.com/aserto-dev/go-directory v0.21.8-0.20231015213014-2bac9fa0ff01 h1:glYqVO35wG+iRZ3wBnvm0YNh+ZaK1pDE3BUtZlA3U8M=
github.com/aserto-dev/go-directory v0.21.8-0.20231015213014-2bac9fa0ff01/go.mod h1:xkZFWZ0u0RcYRBkJLTqantIG/jnVxYhzd2+kIQf8PnU=
github.com/aserto-dev/go-directory v0.21.8-0.20231024193431-4f1633502744 h1:AYkAgLjuKOslF/Da6D+VE4OLct8yqw+BlDNAMH/G4AU=
github.com/aserto-dev/go-directory v0.21.8-0.20231024193431-4f1633502744/go.mod h1:xkZFWZ0u0RcYRBkJLTqantIG/jnVxYhzd2+kIQf8PnU=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/bufbuild/protovalidate-go v0.3.4 h1:FrHcBBShspitvmC9Nkwu7BNs/EXWjkEQqrgFnWxYH60=
github.com/bufbuild/protovalidate-go v0.3.4/go.mod h1:Au57xmLypglbQAF0GzuDDYbYIct7SZ9QnwJlaPolyFw=
Expand Down Expand Up @@ -102,6 +100,7 @@ github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 h1:dOYG7LS/WK00RWZc8XGgcUTlTxpp3mKhdR2Q9z9HbXM=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c=
Expand Down Expand Up @@ -214,16 +213,10 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20231009173412-8bfb1ae86b6c h1:ml3TAUoIIzQUtX88s/icpXCFW9lV5VwsuIuS1htNjKY=
google.golang.org/genproto v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:MugzuwC+GYOxyF0XUGQvsT97bOgWCV7MM1XMc5FZv8E=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8=
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE=
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI=
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
Expand All @@ -242,6 +235,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
2 changes: 1 addition & 1 deletion pkg/bdb/migrate/mig003/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
dsc2 "github.com/aserto-dev/go-directory/aserto/directory/common/v2"
dsc3 "github.com/aserto-dev/go-directory/aserto/directory/common/v3"
dsm3 "github.com/aserto-dev/go-directory/aserto/directory/model/v3"
"github.com/aserto-dev/go-directory/pkg/convert"
"github.com/aserto-dev/go-edge-ds/pkg/bdb"
"github.com/aserto-dev/go-edge-ds/pkg/bdb/migrate/mig"
"github.com/aserto-dev/go-edge-ds/pkg/convert"
"github.com/aserto-dev/go-edge-ds/pkg/ds"
"github.com/pkg/errors"
"google.golang.org/protobuf/types/known/timestamppb"
Expand Down
185 changes: 0 additions & 185 deletions pkg/convert/convert.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/directory/v2/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
dsc3 "github.com/aserto-dev/go-directory/aserto/directory/common/v3"
dsi2 "github.com/aserto-dev/go-directory/aserto/directory/importer/v2"
dsi3 "github.com/aserto-dev/go-directory/aserto/directory/importer/v3"
"github.com/aserto-dev/go-directory/pkg/convert"
"github.com/aserto-dev/go-directory/pkg/derr"
"github.com/aserto-dev/go-edge-ds/pkg/bdb"
"github.com/aserto-dev/go-edge-ds/pkg/convert"
v3 "github.com/aserto-dev/go-edge-ds/pkg/directory/v3"
"github.com/aserto-dev/go-edge-ds/pkg/ds"
"github.com/aserto-dev/go-edge-ds/pkg/session"
Expand Down
2 changes: 1 addition & 1 deletion pkg/directory/v2/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
dsc3 "github.com/aserto-dev/go-directory/aserto/directory/common/v3"
dsr2 "github.com/aserto-dev/go-directory/aserto/directory/reader/v2"
dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3"
"github.com/aserto-dev/go-directory/pkg/convert"
"github.com/aserto-dev/go-edge-ds/pkg/bdb"
"github.com/aserto-dev/go-edge-ds/pkg/convert"
v3 "github.com/aserto-dev/go-edge-ds/pkg/directory/v3"
"google.golang.org/protobuf/proto"

Expand Down
2 changes: 1 addition & 1 deletion pkg/directory/v2/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

dsw2 "github.com/aserto-dev/go-directory/aserto/directory/writer/v2"
dsw3 "github.com/aserto-dev/go-directory/aserto/directory/writer/v3"
"github.com/aserto-dev/go-directory/pkg/convert"
"github.com/aserto-dev/go-edge-ds/pkg/bdb"
"github.com/aserto-dev/go-edge-ds/pkg/convert"
v3 "github.com/aserto-dev/go-edge-ds/pkg/directory/v3"

"github.com/rs/zerolog"
Expand Down

0 comments on commit 83ab201

Please sign in to comment.