From 99648002295a4d0bfe45bb0f1da7e7cb209cf658 Mon Sep 17 00:00:00 2001 From: Abduh Date: Mon, 20 Dec 2021 11:32:05 +0700 Subject: [PATCH] refactor(assets): update assets to version v1beta1 (#284) * refactor: update assets to version v1beta1 and fmt * feat(assets): update assets to the latest * feat(columbus): add email to columbus owner struct * fix(tableau): fix proto version name --- Makefile | 2 +- agent/agent_test.go | 18 +- buf.gen.yaml | 6 +- cmd/version.go | 4 +- docs/docs/reference/metadata_models.md | 14 +- generator/recipe.go | 5 +- go.mod | 2 - go.sum | 91 ---- metrics/statsd.go | 5 +- models/metadata.go | 12 +- models/odpf/assets/bucket.pb.go | 449 --------------- .../assets/common/{ => v1beta1}/event.pb.go | 80 +-- .../common/{ => v1beta1}/resource.pb.go | 78 +-- .../common/{ => v1beta1}/timestamp.pb.go | 94 ++-- models/odpf/assets/dashboard.pb.go | 502 ----------------- models/odpf/assets/facets/lineage.pb.go | 174 ------ models/odpf/assets/facets/properties.pb.go | 185 ------- .../odpf/assets/facets/v1beta1/lineage.pb.go | 178 ++++++ .../facets/{ => v1beta1}/ownership.pb.go | 73 ++- .../assets/facets/{ => v1beta1}/preview.pb.go | 79 +-- .../assets/facets/v1beta1/properties.pb.go | 188 +++++++ .../assets/facets/{ => v1beta1}/schema.pb.go | 148 ++--- models/odpf/assets/group.pb.go | 310 ----------- models/odpf/assets/job.pb.go | 244 --------- models/odpf/assets/table.pb.go | 497 ----------------- models/odpf/assets/topic.pb.go | 357 ------------ models/odpf/assets/v1beta1/bucket.pb.go | 459 ++++++++++++++++ models/odpf/assets/v1beta1/dashboard.pb.go | 514 ++++++++++++++++++ models/odpf/assets/v1beta1/group.pb.go | 317 +++++++++++ models/odpf/assets/v1beta1/job.pb.go | 253 +++++++++ models/odpf/assets/v1beta1/table.pb.go | 514 ++++++++++++++++++ models/odpf/assets/v1beta1/topic.pb.go | 367 +++++++++++++ models/odpf/assets/{ => v1beta1}/user.pb.go | 234 ++++---- plugins/external/plugin.go | 3 +- plugins/extractors/bigquery/bigquery.go | 38 +- plugins/extractors/bigquery/bigquery_test.go | 3 +- plugins/extractors/bigquery/profile.go | 10 +- plugins/extractors/bigquery/profile_test.go | 8 +- plugins/extractors/bigtable/bigtable.go | 12 +- plugins/extractors/bigtable/bigtable_test.go | 6 +- plugins/extractors/cassandra/cassandra.go | 19 +- .../extractors/cassandra/cassandra_test.go | 58 +- plugins/extractors/clickhouse/clickhouse.go | 24 +- .../extractors/clickhouse/clickhouse_test.go | 28 +- plugins/extractors/couchdb/couchdb.go | 18 +- plugins/extractors/couchdb/couchdb_test.go | 6 +- plugins/extractors/csv/csv.go | 18 +- plugins/extractors/csv/csv_test.go | 36 +- plugins/extractors/elastic/elastic.go | 21 +- plugins/extractors/elastic/elastic_test.go | 32 +- plugins/extractors/gcs/gcs.go | 31 +- plugins/extractors/gcs/gcs_test.go | 6 +- plugins/extractors/github/github.go | 11 +- plugins/extractors/grafana/grafana.go | 16 +- plugins/extractors/grafana/grafana_test.go | 16 +- plugins/extractors/kafka/kafka.go | 12 +- plugins/extractors/kafka/kafka_test.go | 28 +- plugins/extractors/metabase/metabase.go | 42 +- plugins/extractors/mongodb/mongodb.go | 15 +- plugins/extractors/mongodb/mongodb_test.go | 28 +- plugins/extractors/mssql/mssql.go | 20 +- plugins/extractors/mssql/mssql_test.go | 28 +- plugins/extractors/mysql/mysql.go | 21 +- plugins/extractors/mysql/mysql_test.go | 28 +- plugins/extractors/optimus/optimus.go | 30 +- plugins/extractors/populate.go | 2 +- plugins/extractors/postgres/postgres.go | 20 +- plugins/extractors/postgres/postgres_test.go | 4 +- plugins/extractors/superset/superset.go | 25 +- plugins/extractors/superset/superset_test.go | 4 +- plugins/extractors/tableau/builder.go | 12 +- plugins/extractors/tableau/builder_test.go | 18 +- plugins/extractors/tableau/models.go | 20 +- plugins/extractors/tableau/tableau.go | 28 +- plugins/sinks/columbus/sink_test.go | 86 +-- recipe/recipe.go | 2 +- registry/registry.go | 2 +- test/e2e/e2e_test.go | 36 +- test/utils/dockertest.go | 2 +- utils/custom_properties.go | 22 +- 80 files changed, 3725 insertions(+), 3683 deletions(-) delete mode 100644 models/odpf/assets/bucket.pb.go rename models/odpf/assets/common/{ => v1beta1}/event.pb.go (60%) rename models/odpf/assets/common/{ => v1beta1}/resource.pb.go (62%) rename models/odpf/assets/common/{ => v1beta1}/timestamp.pb.go (64%) delete mode 100644 models/odpf/assets/dashboard.pb.go delete mode 100644 models/odpf/assets/facets/lineage.pb.go delete mode 100644 models/odpf/assets/facets/properties.pb.go create mode 100644 models/odpf/assets/facets/v1beta1/lineage.pb.go rename models/odpf/assets/facets/{ => v1beta1}/ownership.pb.go (69%) rename models/odpf/assets/facets/{ => v1beta1}/preview.pb.go (55%) create mode 100644 models/odpf/assets/facets/v1beta1/properties.pb.go rename models/odpf/assets/facets/{ => v1beta1}/schema.pb.go (67%) delete mode 100644 models/odpf/assets/group.pb.go delete mode 100644 models/odpf/assets/job.pb.go delete mode 100644 models/odpf/assets/table.pb.go delete mode 100644 models/odpf/assets/topic.pb.go create mode 100644 models/odpf/assets/v1beta1/bucket.pb.go create mode 100644 models/odpf/assets/v1beta1/dashboard.pb.go create mode 100644 models/odpf/assets/v1beta1/group.pb.go create mode 100644 models/odpf/assets/v1beta1/job.pb.go create mode 100644 models/odpf/assets/v1beta1/table.pb.go create mode 100644 models/odpf/assets/v1beta1/topic.pb.go rename models/odpf/assets/{ => v1beta1}/user.pb.go (55%) diff --git a/Makefile b/Makefile index 17fad7a30..e13379ffa 100644 --- a/Makefile +++ b/Makefile @@ -27,5 +27,5 @@ test-e2e: generate-proto: ## regenerate protos @echo " > cloning protobuf from odpf/proton" @echo " > generating protobuf" - @buf generate --template buf.gen.yaml https://github.com/odpf/proton/archive/135a03875fc82b501e686924457a44730fd04268.zip#strip_components=1 --path odpf/assets + @buf generate --template buf.gen.yaml https://github.com/odpf/proton/archive/a0bc6dbf2ad91abfebc4bf5f70e275983109baca.zip#strip_components=1 --path odpf/assets @echo " > protobuf compilation finished" \ No newline at end of file diff --git a/agent/agent_test.go b/agent/agent_test.go index 668bcb481..4a5d6ed74 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -8,7 +8,7 @@ import ( "github.com/odpf/meteor/agent" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/recipe" "github.com/odpf/meteor/registry" @@ -297,7 +297,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should return error when processing fails", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -339,7 +339,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should return error when processing panics", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -380,7 +380,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should not return error when sink fails", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -423,7 +423,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should return error when sink fails if StopOnSinkError is true", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -467,7 +467,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should return run on success", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -511,7 +511,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should collect run metrics", func(t *testing.T) { data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -568,7 +568,7 @@ func TestRunnerRun(t *testing.T) { t.Run("should retry if sink returns retry error", func(t *testing.T) { err := errors.New("some-error") data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() @@ -620,7 +620,7 @@ func TestRunnerRunMultiple(t *testing.T) { validRecipe2.Name = "sample-2" recipeList := []recipe.Recipe{validRecipe, validRecipe2} data := []models.Record{ - models.NewRecord(&assets.Table{}), + models.NewRecord(&assetsv1beta1.Table{}), } extr := mocks.NewExtractor() extr.SetEmit(data) diff --git a/buf.gen.yaml b/buf.gen.yaml index 19e21d758..160225c80 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,5 +1,5 @@ -version: v1beta1 +version: v1 plugins: - name: go - out: proto - opt: paths=source_relative \ No newline at end of file + out: models + opt: paths=source_relative diff --git a/cmd/version.go b/cmd/version.go index f21d3cfd7..c1c68a161 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,11 +10,11 @@ import ( var ( // Version is the version of the binary - Version string + Version string // BuildCommit is the commit hash of the binary BuildCommit string // BuildDate is the date of the build - BuildDate string + BuildDate string ) // VersionCmd prints the version of the binary diff --git a/docs/docs/reference/metadata_models.md b/docs/docs/reference/metadata_models.md index 6477d77e1..c434669e5 100644 --- a/docs/docs/reference/metadata_models.md +++ b/docs/docs/reference/metadata_models.md @@ -38,13 +38,13 @@ To check their implementation please refer [here](https://github.com/odpf/proton ```golang import( -"github.com/odpf/meteor/models/odpf/assets" -"github.com/odpf/meteor/models/odpf/assets/facets" +"github.com/odpf/meteor/models/odpf/assets/v1beta1" +"github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" ) func main(){ - // result is a var of data type of assets.Table one of our metadata model - result := &assets.Table{ + // result is a var of data type of assetsv1beta1.Table one of our metadata model + result := &assetsv1beta1.Table{ // assigining value to metadata model Urn: fmt.Sprintf("%s.%s", dbName, tableName), Name: tableName, @@ -52,14 +52,14 @@ func main(){ // using column facet to add metadata info of schema - var columns []*facets.Column - columns = append(columns, &facets.Column{ + var columns []*facetsv1beta1.Column + columns = append(columns, &facetsv1beta1.Column{ Name: "column_name", DataType: "varchar", IsNullable: true, Length: 256, }) - result.Schema = &facets.Columns{ + result.Schema = &facetsv1beta1.Columns{ Columns: columns, } } diff --git a/generator/recipe.go b/generator/recipe.go index 2b62731eb..d50850fd7 100644 --- a/generator/recipe.go +++ b/generator/recipe.go @@ -2,11 +2,12 @@ package generator import ( "embed" - "github.com/odpf/meteor/registry" - "github.com/pkg/errors" "os" "strings" "text/template" + + "github.com/odpf/meteor/registry" + "github.com/pkg/errors" ) //go:embed recipe.yaml diff --git a/go.mod b/go.mod index 64ff932b3..40399a343 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,6 @@ require ( github.com/hashicorp/go-hclog v0.16.1 github.com/hashicorp/go-plugin v1.4.2 github.com/klauspost/compress v1.13.6 // indirect - github.com/knadh/koanf v1.1.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.2 github.com/mcuadros/go-defaults v1.2.0 @@ -54,7 +53,6 @@ require ( gitlab.com/flimzy/testy v0.8.0 // indirect go.mongodb.org/mongo-driver v1.5.3 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 - go.opentelemetry.io/otel/sdk/metric v0.24.0 // indirect golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f golang.org/x/sys v0.0.0-20210903071746-97244b99971b // indirect diff --git a/go.sum b/go.sum index 2933e21a7..31d4a2420 100644 --- a/go.sum +++ b/go.sum @@ -72,7 +72,6 @@ contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod contrib.go.opencensus.io/exporter/stackdriver v0.13.8/go.mod h1:huNtlWx75MwO7qMs0KrMxPZXzNNWebav1Sq/pm02JdQ= contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AlecAivazis/survey/v2 v2.2.7 h1:5NbxkF4RSKmpywYdcRgUmos1o+roJY8duCLZXbVjoig= github.com/AlecAivazis/survey/v2 v2.2.7/go.mod h1:9DYvHgXtiXm6nCn+jXnOXLKbH+Yo9u8fAS/SduGdoPk= github.com/Azure/azure-amqp-common-go/v3 v3.1.0/go.mod h1:PBIGdzcO1teYoufTKMcGibdKaYZv4avS+O6LNIp8bq0= github.com/Azure/azure-amqp-common-go/v3 v3.1.1/go.mod h1:YsDaPfaO9Ub2XeSKdIy2DfwuiQlHQCauHJwSqtrkECI= @@ -118,11 +117,9 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/GoogleCloudPlatform/cloudsql-proxy v1.24.0/go.mod h1:3tx938GhY4FC+E1KT/jNjDw7Z5qxAEtIiERJ2sXjnII= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -146,14 +143,12 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 h1:EFSB7Zo9Eg91v7MJPVsifUysc/wPdN+NOnVe6bWbdBM= github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= @@ -194,7 +189,6 @@ github.com/blastrain/vitess-sqlparser v0.0.0-20201030050434-a139afbb1aba h1:hBK2 github.com/blastrain/vitess-sqlparser v0.0.0-20201030050434-a139afbb1aba/go.mod h1:FGQp+RNQwVmLzDq6HBrYCww9qJQyNwH9Qji/quTQII4= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -278,7 +272,6 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY= github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= @@ -287,7 +280,6 @@ github.com/elastic/go-elasticsearch v0.0.0 h1:Pd5fqOuBxKxv83b0+xOAJDAkziWYwFinWn github.com/elastic/go-elasticsearch v0.0.0/go.mod h1:TkBSJBuTyFdBnrNqoPc54FN0vKf5c04IdM4zuStJ7xg= github.com/elastic/go-elasticsearch/v8 v8.0.0-20210708134649-33f644c8e327 h1:Rgn+ZFdasnLX772Mkz3p8CIWXFyQn5C51E5/iTRXrhk= github.com/elastic/go-elasticsearch/v8 v8.0.0-20210708134649-33f644c8e327/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -301,14 +293,11 @@ github.com/etsy/statsd v0.9.0 h1:GLP1pAzn1fGE7/kM2S5QXSU0ZTUV6QnZsyZVMx7IVF4= github.com/etsy/statsd v0.9.0/go.mod h1:rmx2gVm1TEkQUIcU/KAM4prmC/AAUU8Wndeule9gvW4= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flimzy/diff v0.1.7 h1:DRbd+lN3lY1xVuQrfqvDNsqBwA6RMbClMs6tS5sqWWk= github.com/flimzy/diff v0.1.7/go.mod h1:lFJtC7SPsK0EroDmGTSrdtWKAxOk3rO+q+e04LL05Hs= github.com/flimzy/testy v0.1.17 h1:Y+TUugY6s4B/vrOEPo6SUKafc41W5aiX3qUWvhAPMdI= github.com/flimzy/testy v0.1.17/go.mod h1:3szguN8NXqgq9bt9Gu8TQVj698PJWmyx/VY1frwwKrM= -github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3 h1:fmFk0Wt3bBxxwZnu48jqMdaOR/IZ4vdtJFuaFV8MpIE= github.com/flosch/pongo2 v0.0.0-20200913210552-0d938eb266f3/go.mod h1:bJWSKrZyQvfTnb2OudyUjurSG4/edverV7n82+K3JiM= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -335,7 +324,6 @@ github.com/go-kivik/kivik v2.0.0+incompatible h1:/7hgr29DKv/vlaJsUoyRlOFq0K+3ikz github.com/go-kivik/kivik v2.0.0+incompatible/go.mod h1:nIuJ8z4ikBrVUSk3Ua8NoDqYKULPNjuddjqRvlSUyyQ= github.com/go-kivik/kiviktest v2.0.0+incompatible h1:y1RyPHqWQr+eFlevD30Tr3ipiPCxK78vRoD3o9YysjI= github.com/go-kivik/kiviktest v2.0.0+incompatible/go.mod h1:JdhVyzixoYhoIDUt6hRf1yAfYyaDa5/u9SDOindDkfQ= -github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -355,7 +343,6 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= @@ -396,7 +383,6 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-migrate/migrate/v4 v4.14.1 h1:qmRd/rNGjM1r3Ve5gHd5ZplytrD02UcItYNxJ3iUHHE= github.com/golang-migrate/migrate/v4 v4.14.1/go.mod h1:l7Ks0Au6fYHuUIxUhQ0rcVX1uLlJg54C/VvW7tvxSz0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= @@ -464,7 +450,6 @@ github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4r github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v37 v37.0.0 h1:rCspN8/6kB1BAJWZfuafvHhyfIo5fkAulaP/3bOQ/tM= github.com/google/go-github/v37 v37.0.0/go.mod h1:LM7in3NmXDrX58GbEHy7FtNLbI2JijX93RnMKvWG3m4= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= @@ -502,15 +487,12 @@ github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0 h1:6DWmvNpomjL1+3liNSZbVns3zsYzzCjm6pRBO1tLeso= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20210503212227-fb464eba2686 h1:M8mGEEKe5MUkENNKwreWXhiF0X9vH93ur4nmuUc6kT8= @@ -527,7 +509,6 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= @@ -539,76 +520,55 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 h1:ajue7SzQMywqRjg2fK7dcpc0QhFGpTR2plWfV4EZWR4= github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0/go.mod h1:r1hZAcvfFXuYmcKyCJI9wlyOPIZUJl6FCB8Cpca/NLE= -github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 h1:7xsUJsB2NrdcttQPa7JLEaGzvdbk7KvfrjgHZXOQRo0= github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69/go.mod h1:YLEMZOtU+AZ7dhN9T/IpGhXVGly2bvkJQ+zxj3WeVQo= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.1 h1:IVQwpTGNRRIHafnTs2dQLIk4ENtneRIEEJWOVDqz99o= github.com/hashicorp/go-hclog v0.16.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-plugin v1.4.1/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= github.com/hashicorp/go-plugin v1.4.2 h1:yFvG3ufXXpqiMiZx9HLcaK3XbIqQ1WJFR/F1a2CuVw0= github.com/hashicorp/go-plugin v1.4.2/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= -github.com/hashicorp/raft v1.3.1 h1:zDT8ke8y2aP4wf9zPTB2uSIeavJ3Hx/ceY4jxI2JxuY= github.com/hashicorp/raft v1.3.1/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= github.com/hashicorp/raft-boltdb v0.0.0-20210409134258-03c10cc3d4ea/go.mod h1:qRd6nFJYYS6Iqnc/8HcUmko2/2Gw8qTFEmxDLii6W5I= -github.com/hashicorp/raft-boltdb v0.0.0-20210422161416-485fa74b0b01 h1:EfDtu7qY4bD9hNY9sIryn1L/Ycvo+/WPEFT2Crwdclg= github.com/hashicorp/raft-boltdb v0.0.0-20210422161416-485fa74b0b01/go.mod h1:L6EUYfWjwPIkX9uqJBsGb3fppuOcRx3t7z2joJnIf/g= -github.com/hashicorp/raft-boltdb/v2 v2.0.0-20210422161416-485fa74b0b01 h1:UTLCtn+7DZ+lEnh+iUFbVqPaYqkSMJNY6Y2XHLFPZhw= github.com/hashicorp/raft-boltdb/v2 v2.0.0-20210422161416-485fa74b0b01/go.mod h1:4qb45Sqiy/rg0sAWcQmEKI0ll/GjSp3Y74NankizC+w= -github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= -github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -617,10 +577,8 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= @@ -629,24 +587,18 @@ github.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaI github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.7.0 h1:pwjzcYyfmz/HQOQlENvG1OcDqauTGaqlVahq934F0/U= github.com/jackc/pgconn v1.7.0/go.mod h1:sF/lPpNEMEOp+IYhyQGdAvrG20gWf6A1tKlr0v7JMeA= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.0.5 h1:NUbEWPmCQZbMmYlTjVoNPhc0CfnYyz2bfUAh6A5ZVJM= github.com/jackc/pgproto3/v2 v2.0.5/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= @@ -654,7 +606,6 @@ github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrU github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= -github.com/jackc/pgtype v1.5.0 h1:jzBqRk2HFG2CV4AIwgCI2PwTgm6UUoCAK2ofHHRirtc= github.com/jackc/pgtype v1.5.0/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= @@ -662,7 +613,6 @@ github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQ github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= -github.com/jackc/pgx/v4 v4.9.0 h1:6STjDqppM2ROy5p1wNDcsC7zJTjSHeuCsguZmXyzx7c= github.com/jackc/pgx/v4 v4.9.0/go.mod h1:MNGWmViCgqbZck9ujOOBN63gK9XVGILXWCvKLGKmnms= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -674,10 +624,8 @@ github.com/jeremywohl/flatten v1.0.1/go.mod h1:4AmD/VxjWcI5SRB0n6szE2A6s2fsNHDLO github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jhump/protoreflect v1.9.1-0.20210817181203-db1a327a393e h1:Yb4fEGk+GtBSNuvy5rs0ZJt/jtopc/z9azQaj3xbies= github.com/jhump/protoreflect v1.9.1-0.20210817181203-db1a327a393e/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -710,7 +658,6 @@ github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3t github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -722,7 +669,6 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/knadh/koanf v1.1.0/go.mod h1:vrMMuhIH0k7EoxiMbVfFlRvJYmxcT2Eha3DH8Tx5+X4= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -739,7 +685,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4= -github.com/kushsharma/parallel v0.2.1 h1:y9LgTLrtKBWt/YyKE8DYrUxKupiZTriWYKXB+hyUnng= github.com/kushsharma/parallel v0.2.1/go.mod h1:6JCy2+DRCUfZ0VFBUg6HG8IdDTDKuVL02dhvjUc+xt8= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= @@ -792,15 +737,12 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mcuadros/go-defaults v1.2.0 h1:FODb8WSf0uGaY8elWJAkoLL0Ri6AlZ1bFlenk56oZtc= github.com/mcuadros/go-defaults v1.2.0/go.mod h1:WEZtHEVIGYVDqkKSWBdWKUVdRyKlMfulPaGDWIVeCWY= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.6 h1:ZOvqHKtnx0fUpnbQm3m3zKFWE+DRC+XB1onh8JoEObE= github.com/microcosm-cc/bluemonday v1.0.6/go.mod h1:HOT/6NaBlR0f9XlxD3zolN6Z3N8Lp4pvhp+jLS5ihnI= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -817,7 +759,6 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= @@ -850,8 +791,6 @@ github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1a github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/odpf/optimus v0.0.3 h1:MG43+I9HyYnqDH9I3FpIAgfdlPP/JtRUaRxBsx/E+fI= -github.com/odpf/optimus v0.0.3/go.mod h1:P3u3HO5Bdd8W5VbmM1s05t5OED/4nqiuVrrYMRg5DXE= github.com/odpf/optimus v0.0.4-0.20211125235320-9d1751152006 h1:vUEVkd6l47fRdZEJcU8+OKM+MXghUaBuBmjS8U1T7N0= github.com/odpf/optimus v0.0.4-0.20211125235320-9d1751152006/go.mod h1:3W2YJOXZI0ThZbOsxQrWVB3u7IznU9L2kmKIJdi7wEs= github.com/odpf/salt v0.0.0-20210919015538-3fd8ab22acea h1:/wywsQrCWV76QE5otGicnB8XojTXyLvg8QMfbnk/7qQ= @@ -889,7 +828,6 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -936,11 +874,9 @@ github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3x github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -953,9 +889,7 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/segmentio/kafka-go v0.4.17 h1:IyqRstL9KUTDb3kyGPOOa5VffokKWSEzN6geJ92dSDY= @@ -964,7 +898,6 @@ github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= @@ -977,7 +910,6 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/slack-go/slack v0.9.1 h1:pekQBs0RmrdAgoqzcMCzUCWSyIkhzUU3F83ExAdZrKo= github.com/slack-go/slack v0.9.1/go.mod h1:wWL//kk0ho+FcQXcBTmEafUI5dz4qz5f4mMk8oIkioQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1057,7 +989,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1: github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= @@ -1076,7 +1007,6 @@ gitlab.com/flimzy/testy v0.8.0 h1:oUynO9zLAmG6SA4VNEoJhIPJM0rO+538w6T0LrvfKKM= gitlab.com/flimzy/testy v0.8.0/go.mod h1:alphl7xENfCecd7MeicMmJ961uIPP7nJa6Izy3oIp18= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= @@ -1096,20 +1026,13 @@ go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0 h1:Wx7nFnvCaissIUZxPkBqDz2963Z+Cl+PkYbDKzTxDqQ= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.25.0 h1:FIbb8m2PtTWjvXLHOEnXAoSmkaiXbg3fuvoZAjsAT3Q= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.25.0/go.mod h1:NyB05cd+yPX6W5SiRNuJ90w7PV2+g2cgRbsPL7MvpME= go.opentelemetry.io/otel v1.0.1 h1:4XKyXmfqJLOQ7feyV5DB6gsBFZ0ltB8vLtp6pj4JIcc= go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= -go.opentelemetry.io/otel/exporters/jaeger v1.0.1 h1:fg9udWIWWJMAT+Gq2ATFd/DFy3OZvKEZy9VK2amxvkw= go.opentelemetry.io/otel/exporters/jaeger v1.0.1/go.mod h1:85Ym3qknJdIdfRzYS9Ofy9NeLi9gKPFzFDBEHCKpfXI= -go.opentelemetry.io/otel/internal/metric v0.24.0 h1:O5lFy6kAl0LMWBjzy3k//M8VjEaTDWL9DPJuqZmWIAA= go.opentelemetry.io/otel/internal/metric v0.24.0/go.mod h1:PSkQG+KuApZjBpC6ea6082ZrWUUy/w132tJ/LOU3TXk= -go.opentelemetry.io/otel/metric v0.24.0 h1:Rg4UYHS6JKR1Sw1TxnI13z7q/0p/XAbgIqUTagvLJuU= go.opentelemetry.io/otel/metric v0.24.0/go.mod h1:tpMFnCD9t+BEGiWY2bWF5+AwjuAdM0lSowQ4SBA3/K4= -go.opentelemetry.io/otel/sdk v1.0.1 h1:wXxFEWGo7XfXupPwVJvTBOaPBC9FEg0wB8hMNrKk+cA= go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= -go.opentelemetry.io/otel/sdk/export/metric v0.24.0/go.mod h1:chmxXGVNcpCih5XyniVkL4VUyaEroUbOdvjVlQ8M29Y= -go.opentelemetry.io/otel/sdk/metric v0.24.0/go.mod h1:KDgJgYzsIowuIDbPM9sLDZY9JJ6gqIDWCx92iWV8ejk= go.opentelemetry.io/otel/trace v1.0.1 h1:StTeIH6Q3G4r0Fiw34LTokUFESZgIDUr0qIJ7mKmAfw= go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -1126,7 +1049,6 @@ go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKY go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA= go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -1135,7 +1057,6 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -gocloud.dev v0.24.0 h1:cNtHD07zQQiv02OiwwDyVMuHmR7iQt2RLkzoAgz7wBs= gocloud.dev v0.24.0/go.mod h1:uA+als++iBX5ShuG4upQo/3Zoz49iIPlYUWHV5mM8w8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1303,7 +1224,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1388,13 +1308,11 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210903071746-97244b99971b h1:3Dq0eVHn0uaQJmPO+/aYPI/fRMqdrVDbu7MQcku54gg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20180302201248-b7ef84aaf62a/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1538,7 +1456,6 @@ google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1606,12 +1523,10 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83 h1:3V2dxSZpz4zozWWUq36vUxXEKnSYitEH2LdsAx+RUmg= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1653,7 +1568,6 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1672,9 +1586,7 @@ gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/validator.v2 v2.0.0-20180514200540-135c24b11c19 h1:WB265cn5OpO+hK3pikC9hpP1zI/KTwmyMFKloW9eOVc= gopkg.in/validator.v2 v2.0.0-20180514200540-135c24b11c19/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1690,10 +1602,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/datatypes v1.0.0 h1:5rDW3AnqXaacuQn6nB/ZNAIfTCIvmL5oKGa/TtCoBFA= gorm.io/datatypes v1.0.0/go.mod h1:aKpJ+RNhLXWeF5OAdxfzBwT1UPw1wseSchF0AY3/lSw= gorm.io/driver/mysql v1.0.3/go.mod h1:twGxftLBlFgNVNakL7F+P/x9oYqoymG3YYT8cAfI9oI= -gorm.io/driver/postgres v1.0.5 h1:raX6ezL/ciUmaYTvOq48jq1GE95aMC0CmxQYbxQ4Ufw= gorm.io/driver/postgres v1.0.5/go.mod h1:qrD92UurYzNctBMVCJ8C3VQEjffEuphycXtxOudXNCA= gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c= gorm.io/driver/sqlserver v1.0.5/go.mod h1:WI/bfZ+s9TigYXe3hb3XjNaUP0TqmTdXl11pECyLATs= @@ -1701,7 +1611,6 @@ gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.2/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.5/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.21.16 h1:YBIQLtP5PLfZQz59qfrq7xbrK7KWQ+JsXXCH/THlMqs= gorm.io/gorm v1.21.16/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/metrics/statsd.go b/metrics/statsd.go index 4bc784978..d699397f4 100644 --- a/metrics/statsd.go +++ b/metrics/statsd.go @@ -2,10 +2,11 @@ package metrics import ( "fmt" - "github.com/pkg/errors" "net" "strconv" + "github.com/pkg/errors" + statsd "github.com/etsy/statsd/examples/go" "github.com/odpf/meteor/agent" "github.com/odpf/meteor/recipe" @@ -73,7 +74,7 @@ type statsdClient interface { func NewStatsdClient(statsdAddress string) (c *statsd.StatsdClient, err error) { statsdHost, statsdPortStr, err := net.SplitHostPort(statsdAddress) if err != nil { - err = errors.Wrap(err, "failed to split the network address") + err = errors.Wrap(err, "failed to split the network address") return } statsdPort, err := strconv.Atoi(statsdPortStr) diff --git a/models/metadata.go b/models/metadata.go index 404e3de9a..7beba8451 100644 --- a/models/metadata.go +++ b/models/metadata.go @@ -1,20 +1,20 @@ package models import ( - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" ) // Metadata is a wrapper for the meta type Metadata interface { - GetResource() *common.Resource - GetProperties() *facets.Properties + GetResource() *commonv1beta1.Resource + GetProperties() *facetsv1beta1.Properties } type LineageMetadata interface { - GetLineage() *facets.Lineage + GetLineage() *facetsv1beta1.Lineage } type OwnershipMetadata interface { - GetOwnership() *facets.Ownership + GetOwnership() *facetsv1beta1.Ownership } diff --git a/models/odpf/assets/bucket.pb.go b/models/odpf/assets/bucket.pb.go deleted file mode 100644 index 3e9747839..000000000 --- a/models/odpf/assets/bucket.pb.go +++ /dev/null @@ -1,449 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/bucket.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Bucket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The description of the bucket. - // Example: `This bucket was created by the product team.` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // The location of the bucket. Can differ based on cloud storage used. (e.g. GCS, S3, etc) - // Example: `ASIA` - Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` - // The type of the storage. Can differ based on cloud storage used. (e.g. GCS, S3, etc) - // Example: `STANDARD` - StorageType string `protobuf:"bytes,6,opt,name=storage_type,json=storageType,proto3" json:"storage_type,omitempty"` - // List of blobs in the bucket. - Blobs []*Blob `protobuf:"bytes,7,rep,name=blobs,proto3" json:"blobs,omitempty"` - // The ownership of the bucket. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the bucket's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a bucket. - Timestamps *common.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Bucket) Reset() { - *x = Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_bucket_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bucket) ProtoMessage() {} - -func (x *Bucket) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_bucket_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bucket.ProtoReflect.Descriptor instead. -func (*Bucket) Descriptor() ([]byte, []int) { - return file_odpf_assets_bucket_proto_rawDescGZIP(), []int{0} -} - -func (x *Bucket) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Bucket) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Bucket) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -func (x *Bucket) GetStorageType() string { - if x != nil { - return x.StorageType - } - return "" -} - -func (x *Bucket) GetBlobs() []*Blob { - if x != nil { - return x.Blobs - } - return nil -} - -func (x *Bucket) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Bucket) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Bucket) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Bucket) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -type Blob struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The URN of the blob. - // Example: `location/bucket-name/file-name`. - Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` - // The name of the blob. - // Example: `file-name`. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // The source of the blob. - // Example: `gcs`. - Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` - // The length of the object content. - // Example: `300` - Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` - // Delete time of the blob object. - DeleteTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` - // Expire time of the blob object. - ExpireTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` - // The ownership of the blob. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the blob's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a blob. - Timestamps *common.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` -} - -func (x *Blob) Reset() { - *x = Blob{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_bucket_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Blob) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Blob) ProtoMessage() {} - -func (x *Blob) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_bucket_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Blob.ProtoReflect.Descriptor instead. -func (*Blob) Descriptor() ([]byte, []int) { - return file_odpf_assets_bucket_proto_rawDescGZIP(), []int{1} -} - -func (x *Blob) GetUrn() string { - if x != nil { - return x.Urn - } - return "" -} - -func (x *Blob) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Blob) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *Blob) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *Blob) GetDeleteTime() *timestamppb.Timestamp { - if x != nil { - return x.DeleteTime - } - return nil -} - -func (x *Blob) GetExpireTime() *timestamppb.Timestamp { - if x != nil { - return x.ExpireTime - } - return nil -} - -func (x *Blob) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Blob) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Blob) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -var File_odpf_assets_bucket_proto protoreflect.FileDescriptor - -var file_odpf_assets_bucket_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x62, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, 0x64, - 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x03, 0x0a, 0x06, 0x42, 0x75, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, - 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x62, - 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x22, 0x8e, 0x03, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x10, 0x0a, - 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, - 0x3b, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, - 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x73, 0x42, 0x3c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_bucket_proto_rawDescOnce sync.Once - file_odpf_assets_bucket_proto_rawDescData = file_odpf_assets_bucket_proto_rawDesc -) - -func file_odpf_assets_bucket_proto_rawDescGZIP() []byte { - file_odpf_assets_bucket_proto_rawDescOnce.Do(func() { - file_odpf_assets_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_bucket_proto_rawDescData) - }) - return file_odpf_assets_bucket_proto_rawDescData -} - -var file_odpf_assets_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_bucket_proto_goTypes = []interface{}{ - (*Bucket)(nil), // 0: odpf.assets.Bucket - (*Blob)(nil), // 1: odpf.assets.Blob - (*common.Resource)(nil), // 2: odpf.assets.common.Resource - (*facets.Ownership)(nil), // 3: odpf.assets.facets.Ownership - (*facets.Properties)(nil), // 4: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 5: odpf.assets.common.Timestamp - (*common.Event)(nil), // 6: odpf.assets.common.Event - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp -} -var file_odpf_assets_bucket_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.Bucket.resource:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.Bucket.blobs:type_name -> odpf.assets.Blob - 3, // 2: odpf.assets.Bucket.ownership:type_name -> odpf.assets.facets.Ownership - 4, // 3: odpf.assets.Bucket.properties:type_name -> odpf.assets.facets.Properties - 5, // 4: odpf.assets.Bucket.timestamps:type_name -> odpf.assets.common.Timestamp - 6, // 5: odpf.assets.Bucket.event:type_name -> odpf.assets.common.Event - 7, // 6: odpf.assets.Blob.delete_time:type_name -> google.protobuf.Timestamp - 7, // 7: odpf.assets.Blob.expire_time:type_name -> google.protobuf.Timestamp - 3, // 8: odpf.assets.Blob.ownership:type_name -> odpf.assets.facets.Ownership - 4, // 9: odpf.assets.Blob.properties:type_name -> odpf.assets.facets.Properties - 5, // 10: odpf.assets.Blob.timestamps:type_name -> odpf.assets.common.Timestamp - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_odpf_assets_bucket_proto_init() } -func file_odpf_assets_bucket_proto_init() { - if File_odpf_assets_bucket_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_bucket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Blob); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_bucket_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_bucket_proto_goTypes, - DependencyIndexes: file_odpf_assets_bucket_proto_depIdxs, - MessageInfos: file_odpf_assets_bucket_proto_msgTypes, - }.Build() - File_odpf_assets_bucket_proto = out.File - file_odpf_assets_bucket_proto_rawDesc = nil - file_odpf_assets_bucket_proto_goTypes = nil - file_odpf_assets_bucket_proto_depIdxs = nil -} diff --git a/models/odpf/assets/common/event.pb.go b/models/odpf/assets/common/v1beta1/event.pb.go similarity index 60% rename from models/odpf/assets/common/event.pb.go rename to models/odpf/assets/common/v1beta1/event.pb.go index 387f2fd21..2533ca394 100644 --- a/models/odpf/assets/common/event.pb.go +++ b/models/odpf/assets/common/v1beta1/event.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/common/event.proto +// protoc v3.19.1 +// source: odpf/assets/common/v1beta1/event.proto -package common +package commonv1beta1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -43,7 +43,7 @@ type Event struct { func (x *Event) Reset() { *x = Event{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_common_event_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_event_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +56,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_common_event_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_event_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +69,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_odpf_assets_common_event_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_common_v1beta1_event_proto_rawDescGZIP(), []int{0} } func (x *Event) GetTimestamp() *timestamppb.Timestamp { @@ -93,13 +93,14 @@ func (x *Event) GetDescription() string { return "" } -var File_odpf_assets_common_event_proto protoreflect.FileDescriptor +var File_odpf_assets_common_v1beta1_event_proto protoreflect.FileDescriptor -var file_odpf_assets_common_event_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, +var file_odpf_assets_common_v1beta1_event_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, @@ -109,33 +110,34 @@ var file_odpf_assets_common_event_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x49, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x6f, 0x6e, 0x42, 0x5f, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x0a, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_odpf_assets_common_event_proto_rawDescOnce sync.Once - file_odpf_assets_common_event_proto_rawDescData = file_odpf_assets_common_event_proto_rawDesc + file_odpf_assets_common_v1beta1_event_proto_rawDescOnce sync.Once + file_odpf_assets_common_v1beta1_event_proto_rawDescData = file_odpf_assets_common_v1beta1_event_proto_rawDesc ) -func file_odpf_assets_common_event_proto_rawDescGZIP() []byte { - file_odpf_assets_common_event_proto_rawDescOnce.Do(func() { - file_odpf_assets_common_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_event_proto_rawDescData) +func file_odpf_assets_common_v1beta1_event_proto_rawDescGZIP() []byte { + file_odpf_assets_common_v1beta1_event_proto_rawDescOnce.Do(func() { + file_odpf_assets_common_v1beta1_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_v1beta1_event_proto_rawDescData) }) - return file_odpf_assets_common_event_proto_rawDescData + return file_odpf_assets_common_v1beta1_event_proto_rawDescData } -var file_odpf_assets_common_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_odpf_assets_common_event_proto_goTypes = []interface{}{ - (*Event)(nil), // 0: odpf.assets.common.Event +var file_odpf_assets_common_v1beta1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_odpf_assets_common_v1beta1_event_proto_goTypes = []interface{}{ + (*Event)(nil), // 0: odpf.assets.common.v1beta1.Event (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp } -var file_odpf_assets_common_event_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.common.Event.timestamp:type_name -> google.protobuf.Timestamp +var file_odpf_assets_common_v1beta1_event_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.common.v1beta1.Event.timestamp:type_name -> google.protobuf.Timestamp 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -143,13 +145,13 @@ var file_odpf_assets_common_event_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_odpf_assets_common_event_proto_init() } -func file_odpf_assets_common_event_proto_init() { - if File_odpf_assets_common_event_proto != nil { +func init() { file_odpf_assets_common_v1beta1_event_proto_init() } +func file_odpf_assets_common_v1beta1_event_proto_init() { + if File_odpf_assets_common_v1beta1_event_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_common_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_common_v1beta1_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Event); i { case 0: return &v.state @@ -166,18 +168,18 @@ func file_odpf_assets_common_event_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_common_event_proto_rawDesc, + RawDescriptor: file_odpf_assets_common_v1beta1_event_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_common_event_proto_goTypes, - DependencyIndexes: file_odpf_assets_common_event_proto_depIdxs, - MessageInfos: file_odpf_assets_common_event_proto_msgTypes, + GoTypes: file_odpf_assets_common_v1beta1_event_proto_goTypes, + DependencyIndexes: file_odpf_assets_common_v1beta1_event_proto_depIdxs, + MessageInfos: file_odpf_assets_common_v1beta1_event_proto_msgTypes, }.Build() - File_odpf_assets_common_event_proto = out.File - file_odpf_assets_common_event_proto_rawDesc = nil - file_odpf_assets_common_event_proto_goTypes = nil - file_odpf_assets_common_event_proto_depIdxs = nil + File_odpf_assets_common_v1beta1_event_proto = out.File + file_odpf_assets_common_v1beta1_event_proto_rawDesc = nil + file_odpf_assets_common_v1beta1_event_proto_goTypes = nil + file_odpf_assets_common_v1beta1_event_proto_depIdxs = nil } diff --git a/models/odpf/assets/common/resource.pb.go b/models/odpf/assets/common/v1beta1/resource.pb.go similarity index 62% rename from models/odpf/assets/common/resource.pb.go rename to models/odpf/assets/common/v1beta1/resource.pb.go index 759d3c806..77d1a9af0 100644 --- a/models/odpf/assets/common/resource.pb.go +++ b/models/odpf/assets/common/v1beta1/resource.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/common/resource.proto +// protoc v3.19.1 +// source: odpf/assets/common/v1beta1/resource.proto -package common +package commonv1beta1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -50,7 +50,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_common_resource_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_resource_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -63,7 +63,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_common_resource_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_resource_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -76,7 +76,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_odpf_assets_common_resource_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_common_v1beta1_resource_proto_rawDescGZIP(), []int{0} } func (x *Resource) GetUrn() string { @@ -121,13 +121,14 @@ func (x *Resource) GetDescription() string { return "" } -var File_odpf_assets_common_resource_proto protoreflect.FileDescriptor +var File_odpf_assets_common_v1beta1_resource_proto protoreflect.FileDescriptor -var file_odpf_assets_common_resource_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, +var file_odpf_assets_common_v1beta1_resource_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x22, 0x92, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, @@ -136,32 +137,33 @@ var file_odpf_assets_common_resource_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x4c, 0x0a, 0x15, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x62, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_odpf_assets_common_resource_proto_rawDescOnce sync.Once - file_odpf_assets_common_resource_proto_rawDescData = file_odpf_assets_common_resource_proto_rawDesc + file_odpf_assets_common_v1beta1_resource_proto_rawDescOnce sync.Once + file_odpf_assets_common_v1beta1_resource_proto_rawDescData = file_odpf_assets_common_v1beta1_resource_proto_rawDesc ) -func file_odpf_assets_common_resource_proto_rawDescGZIP() []byte { - file_odpf_assets_common_resource_proto_rawDescOnce.Do(func() { - file_odpf_assets_common_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_resource_proto_rawDescData) +func file_odpf_assets_common_v1beta1_resource_proto_rawDescGZIP() []byte { + file_odpf_assets_common_v1beta1_resource_proto_rawDescOnce.Do(func() { + file_odpf_assets_common_v1beta1_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_v1beta1_resource_proto_rawDescData) }) - return file_odpf_assets_common_resource_proto_rawDescData + return file_odpf_assets_common_v1beta1_resource_proto_rawDescData } -var file_odpf_assets_common_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_odpf_assets_common_resource_proto_goTypes = []interface{}{ - (*Resource)(nil), // 0: odpf.assets.common.Resource +var file_odpf_assets_common_v1beta1_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_odpf_assets_common_v1beta1_resource_proto_goTypes = []interface{}{ + (*Resource)(nil), // 0: odpf.assets.common.v1beta1.Resource } -var file_odpf_assets_common_resource_proto_depIdxs = []int32{ +var file_odpf_assets_common_v1beta1_resource_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -169,13 +171,13 @@ var file_odpf_assets_common_resource_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_odpf_assets_common_resource_proto_init() } -func file_odpf_assets_common_resource_proto_init() { - if File_odpf_assets_common_resource_proto != nil { +func init() { file_odpf_assets_common_v1beta1_resource_proto_init() } +func file_odpf_assets_common_v1beta1_resource_proto_init() { + if File_odpf_assets_common_v1beta1_resource_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_common_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_common_v1beta1_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Resource); i { case 0: return &v.state @@ -192,18 +194,18 @@ func file_odpf_assets_common_resource_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_common_resource_proto_rawDesc, + RawDescriptor: file_odpf_assets_common_v1beta1_resource_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_common_resource_proto_goTypes, - DependencyIndexes: file_odpf_assets_common_resource_proto_depIdxs, - MessageInfos: file_odpf_assets_common_resource_proto_msgTypes, + GoTypes: file_odpf_assets_common_v1beta1_resource_proto_goTypes, + DependencyIndexes: file_odpf_assets_common_v1beta1_resource_proto_depIdxs, + MessageInfos: file_odpf_assets_common_v1beta1_resource_proto_msgTypes, }.Build() - File_odpf_assets_common_resource_proto = out.File - file_odpf_assets_common_resource_proto_rawDesc = nil - file_odpf_assets_common_resource_proto_goTypes = nil - file_odpf_assets_common_resource_proto_depIdxs = nil + File_odpf_assets_common_v1beta1_resource_proto = out.File + file_odpf_assets_common_v1beta1_resource_proto_rawDesc = nil + file_odpf_assets_common_v1beta1_resource_proto_goTypes = nil + file_odpf_assets_common_v1beta1_resource_proto_depIdxs = nil } diff --git a/models/odpf/assets/common/timestamp.pb.go b/models/odpf/assets/common/v1beta1/timestamp.pb.go similarity index 64% rename from models/odpf/assets/common/timestamp.pb.go rename to models/odpf/assets/common/v1beta1/timestamp.pb.go index de511aafd..98070c2b0 100644 --- a/models/odpf/assets/common/timestamp.pb.go +++ b/models/odpf/assets/common/v1beta1/timestamp.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/common/timestamp.proto +// protoc v3.19.1 +// source: odpf/assets/common/v1beta1/timestamp.proto -package common +package commonv1beta1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -36,7 +36,7 @@ type Timestamp struct { func (x *Timestamp) Reset() { *x = Timestamp{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_common_timestamp_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +49,7 @@ func (x *Timestamp) String() string { func (*Timestamp) ProtoMessage() {} func (x *Timestamp) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_common_timestamp_proto_msgTypes[0] + mi := &file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +62,7 @@ func (x *Timestamp) ProtoReflect() protoreflect.Message { // Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. func (*Timestamp) Descriptor() ([]byte, []int) { - return file_odpf_assets_common_timestamp_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_common_v1beta1_timestamp_proto_rawDescGZIP(), []int{0} } func (x *Timestamp) GetCreateTime() *timestamppb.Timestamp { @@ -95,7 +95,7 @@ type TimeWindow struct { func (x *TimeWindow) Reset() { *x = TimeWindow{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_common_timestamp_proto_msgTypes[1] + mi := &file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -108,7 +108,7 @@ func (x *TimeWindow) String() string { func (*TimeWindow) ProtoMessage() {} func (x *TimeWindow) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_common_timestamp_proto_msgTypes[1] + mi := &file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -121,7 +121,7 @@ func (x *TimeWindow) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeWindow.ProtoReflect.Descriptor instead. func (*TimeWindow) Descriptor() ([]byte, []int) { - return file_odpf_assets_common_timestamp_proto_rawDescGZIP(), []int{1} + return file_odpf_assets_common_v1beta1_timestamp_proto_rawDescGZIP(), []int{1} } func (x *TimeWindow) GetStartTime() *timestamppb.Timestamp { @@ -138,13 +138,14 @@ func (x *TimeWindow) GetEndTime() *timestamppb.Timestamp { return nil } -var File_odpf_assets_common_timestamp_proto protoreflect.FileDescriptor +var File_odpf_assets_common_v1beta1_timestamp_proto protoreflect.FileDescriptor -var file_odpf_assets_common_timestamp_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, +var file_odpf_assets_common_v1beta1_timestamp_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, @@ -163,37 +164,38 @@ var file_odpf_assets_common_timestamp_proto_rawDesc = []byte{ 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x42, 0x4d, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, + 0x65, 0x42, 0x63, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x0e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_odpf_assets_common_timestamp_proto_rawDescOnce sync.Once - file_odpf_assets_common_timestamp_proto_rawDescData = file_odpf_assets_common_timestamp_proto_rawDesc + file_odpf_assets_common_v1beta1_timestamp_proto_rawDescOnce sync.Once + file_odpf_assets_common_v1beta1_timestamp_proto_rawDescData = file_odpf_assets_common_v1beta1_timestamp_proto_rawDesc ) -func file_odpf_assets_common_timestamp_proto_rawDescGZIP() []byte { - file_odpf_assets_common_timestamp_proto_rawDescOnce.Do(func() { - file_odpf_assets_common_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_timestamp_proto_rawDescData) +func file_odpf_assets_common_v1beta1_timestamp_proto_rawDescGZIP() []byte { + file_odpf_assets_common_v1beta1_timestamp_proto_rawDescOnce.Do(func() { + file_odpf_assets_common_v1beta1_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_common_v1beta1_timestamp_proto_rawDescData) }) - return file_odpf_assets_common_timestamp_proto_rawDescData + return file_odpf_assets_common_v1beta1_timestamp_proto_rawDescData } -var file_odpf_assets_common_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_common_timestamp_proto_goTypes = []interface{}{ - (*Timestamp)(nil), // 0: odpf.assets.common.Timestamp - (*TimeWindow)(nil), // 1: odpf.assets.common.TimeWindow +var file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_common_v1beta1_timestamp_proto_goTypes = []interface{}{ + (*Timestamp)(nil), // 0: odpf.assets.common.v1beta1.Timestamp + (*TimeWindow)(nil), // 1: odpf.assets.common.v1beta1.TimeWindow (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp } -var file_odpf_assets_common_timestamp_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.common.Timestamp.create_time:type_name -> google.protobuf.Timestamp - 2, // 1: odpf.assets.common.Timestamp.update_time:type_name -> google.protobuf.Timestamp - 2, // 2: odpf.assets.common.TimeWindow.start_time:type_name -> google.protobuf.Timestamp - 2, // 3: odpf.assets.common.TimeWindow.end_time:type_name -> google.protobuf.Timestamp +var file_odpf_assets_common_v1beta1_timestamp_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.common.v1beta1.Timestamp.create_time:type_name -> google.protobuf.Timestamp + 2, // 1: odpf.assets.common.v1beta1.Timestamp.update_time:type_name -> google.protobuf.Timestamp + 2, // 2: odpf.assets.common.v1beta1.TimeWindow.start_time:type_name -> google.protobuf.Timestamp + 2, // 3: odpf.assets.common.v1beta1.TimeWindow.end_time:type_name -> google.protobuf.Timestamp 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -201,13 +203,13 @@ var file_odpf_assets_common_timestamp_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_odpf_assets_common_timestamp_proto_init() } -func file_odpf_assets_common_timestamp_proto_init() { - if File_odpf_assets_common_timestamp_proto != nil { +func init() { file_odpf_assets_common_v1beta1_timestamp_proto_init() } +func file_odpf_assets_common_v1beta1_timestamp_proto_init() { + if File_odpf_assets_common_v1beta1_timestamp_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_common_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Timestamp); i { case 0: return &v.state @@ -219,7 +221,7 @@ func file_odpf_assets_common_timestamp_proto_init() { return nil } } - file_odpf_assets_common_timestamp_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TimeWindow); i { case 0: return &v.state @@ -236,18 +238,18 @@ func file_odpf_assets_common_timestamp_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_common_timestamp_proto_rawDesc, + RawDescriptor: file_odpf_assets_common_v1beta1_timestamp_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_common_timestamp_proto_goTypes, - DependencyIndexes: file_odpf_assets_common_timestamp_proto_depIdxs, - MessageInfos: file_odpf_assets_common_timestamp_proto_msgTypes, + GoTypes: file_odpf_assets_common_v1beta1_timestamp_proto_goTypes, + DependencyIndexes: file_odpf_assets_common_v1beta1_timestamp_proto_depIdxs, + MessageInfos: file_odpf_assets_common_v1beta1_timestamp_proto_msgTypes, }.Build() - File_odpf_assets_common_timestamp_proto = out.File - file_odpf_assets_common_timestamp_proto_rawDesc = nil - file_odpf_assets_common_timestamp_proto_goTypes = nil - file_odpf_assets_common_timestamp_proto_depIdxs = nil + File_odpf_assets_common_v1beta1_timestamp_proto = out.File + file_odpf_assets_common_v1beta1_timestamp_proto_rawDesc = nil + file_odpf_assets_common_v1beta1_timestamp_proto_goTypes = nil + file_odpf_assets_common_v1beta1_timestamp_proto_depIdxs = nil } diff --git a/models/odpf/assets/dashboard.pb.go b/models/odpf/assets/dashboard.pb.go deleted file mode 100644 index e0b3cdf98..000000000 --- a/models/odpf/assets/dashboard.pb.go +++ /dev/null @@ -1,502 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/dashboard.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Dashboard is a resource that represents a dashboard. -type Dashboard struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The list of the charts in the dashboard. - // For an example, check the schema of the chart. - Charts []*Chart `protobuf:"bytes,21,rep,name=charts,proto3" json:"charts,omitempty"` - // The ownership of the topic. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The lineage of the dashboard. - // For an example check out lineage schema. - Lineage *facets.Lineage `protobuf:"bytes,34,opt,name=lineage,proto3" json:"lineage,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Dashboard) Reset() { - *x = Dashboard{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_dashboard_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Dashboard) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Dashboard) ProtoMessage() {} - -func (x *Dashboard) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_dashboard_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Dashboard.ProtoReflect.Descriptor instead. -func (*Dashboard) Descriptor() ([]byte, []int) { - return file_odpf_assets_dashboard_proto_rawDescGZIP(), []int{0} -} - -func (x *Dashboard) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Dashboard) GetCharts() []*Chart { - if x != nil { - return x.Charts - } - return nil -} - -func (x *Dashboard) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Dashboard) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Dashboard) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Dashboard) GetLineage() *facets.Lineage { - if x != nil { - return x.Lineage - } - return nil -} - -func (x *Dashboard) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -type Chart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The URN of the chart. - // Example: `chart:1`. - Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` - // The name of the chart. - // Example: `My Chart`. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // The type of the chart. - // Example: `line`. - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // The source of the chart. - // Example: `metabase`. - Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - // The description of the chart. - // Example: `This is a chart for my dashboard.` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // The url of the chart. - // Example: `http://metabase.com/charts/mychart`. - Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` - // The raw query of the chart. - // Example: `SELECT * FROM my_table`. - RawQuery string `protobuf:"bytes,7,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"` - // The source of the data. - // Example: `bigquery,graphite`. - DataSource string `protobuf:"bytes,8,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` - // The dashboard ur of the chart. - // Example: `dashboard:1`. - DashboardUrn string `protobuf:"bytes,9,opt,name=dashboard_urn,json=dashboardUrn,proto3" json:"dashboard_urn,omitempty"` - // The source of the dashboard of the chart. - // Example: `metabase`. - DashboardSource string `protobuf:"bytes,10,opt,name=dashboard_source,json=dashboardSource,proto3" json:"dashboard_source,omitempty"` - // The ownership of the dashboard. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // The lineage of the chart. - // For an example check out lineage schema. - Lineage *facets.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a dashboard. - Properties *facets.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a dashboard. - Timestamps *common.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Chart) Reset() { - *x = Chart{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_dashboard_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Chart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Chart) ProtoMessage() {} - -func (x *Chart) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_dashboard_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Chart.ProtoReflect.Descriptor instead. -func (*Chart) Descriptor() ([]byte, []int) { - return file_odpf_assets_dashboard_proto_rawDescGZIP(), []int{1} -} - -func (x *Chart) GetUrn() string { - if x != nil { - return x.Urn - } - return "" -} - -func (x *Chart) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Chart) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Chart) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *Chart) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Chart) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Chart) GetRawQuery() string { - if x != nil { - return x.RawQuery - } - return "" -} - -func (x *Chart) GetDataSource() string { - if x != nil { - return x.DataSource - } - return "" -} - -func (x *Chart) GetDashboardUrn() string { - if x != nil { - return x.DashboardUrn - } - return "" -} - -func (x *Chart) GetDashboardSource() string { - if x != nil { - return x.DashboardSource - } - return "" -} - -func (x *Chart) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Chart) GetLineage() *facets.Lineage { - if x != nil { - return x.Lineage - } - return nil -} - -func (x *Chart) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Chart) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Chart) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -var File_odpf_assets_dashboard_proto protoreflect.FileDescriptor - -var file_odpf_assets_dashboard_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x64, 0x61, - 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, - 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, - 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x23, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, - 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x03, 0x0a, - 0x09, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x18, 0x15, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, - 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3e, 0x0a, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, - 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x35, 0x0a, 0x07, - 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, - 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x22, 0xbf, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x61, 0x77, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, - 0x75, 0x72, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x55, 0x72, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x61, 0x73, 0x68, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, - 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, - 0x35, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, - 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, - 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x3f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_dashboard_proto_rawDescOnce sync.Once - file_odpf_assets_dashboard_proto_rawDescData = file_odpf_assets_dashboard_proto_rawDesc -) - -func file_odpf_assets_dashboard_proto_rawDescGZIP() []byte { - file_odpf_assets_dashboard_proto_rawDescOnce.Do(func() { - file_odpf_assets_dashboard_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_dashboard_proto_rawDescData) - }) - return file_odpf_assets_dashboard_proto_rawDescData -} - -var file_odpf_assets_dashboard_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_dashboard_proto_goTypes = []interface{}{ - (*Dashboard)(nil), // 0: odpf.assets.Dashboard - (*Chart)(nil), // 1: odpf.assets.Chart - (*common.Resource)(nil), // 2: odpf.assets.common.Resource - (*facets.Ownership)(nil), // 3: odpf.assets.facets.Ownership - (*facets.Properties)(nil), // 4: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 5: odpf.assets.common.Timestamp - (*facets.Lineage)(nil), // 6: odpf.assets.facets.Lineage - (*common.Event)(nil), // 7: odpf.assets.common.Event -} -var file_odpf_assets_dashboard_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.Dashboard.resource:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.Dashboard.charts:type_name -> odpf.assets.Chart - 3, // 2: odpf.assets.Dashboard.ownership:type_name -> odpf.assets.facets.Ownership - 4, // 3: odpf.assets.Dashboard.properties:type_name -> odpf.assets.facets.Properties - 5, // 4: odpf.assets.Dashboard.timestamps:type_name -> odpf.assets.common.Timestamp - 6, // 5: odpf.assets.Dashboard.lineage:type_name -> odpf.assets.facets.Lineage - 7, // 6: odpf.assets.Dashboard.event:type_name -> odpf.assets.common.Event - 3, // 7: odpf.assets.Chart.ownership:type_name -> odpf.assets.facets.Ownership - 6, // 8: odpf.assets.Chart.lineage:type_name -> odpf.assets.facets.Lineage - 4, // 9: odpf.assets.Chart.properties:type_name -> odpf.assets.facets.Properties - 5, // 10: odpf.assets.Chart.timestamps:type_name -> odpf.assets.common.Timestamp - 7, // 11: odpf.assets.Chart.event:type_name -> odpf.assets.common.Event - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_odpf_assets_dashboard_proto_init() } -func file_odpf_assets_dashboard_proto_init() { - if File_odpf_assets_dashboard_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_dashboard_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dashboard); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_dashboard_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Chart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_dashboard_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_dashboard_proto_goTypes, - DependencyIndexes: file_odpf_assets_dashboard_proto_depIdxs, - MessageInfos: file_odpf_assets_dashboard_proto_msgTypes, - }.Build() - File_odpf_assets_dashboard_proto = out.File - file_odpf_assets_dashboard_proto_rawDesc = nil - file_odpf_assets_dashboard_proto_goTypes = nil - file_odpf_assets_dashboard_proto_depIdxs = nil -} diff --git a/models/odpf/assets/facets/lineage.pb.go b/models/odpf/assets/facets/lineage.pb.go deleted file mode 100644 index 7ce540a3a..000000000 --- a/models/odpf/assets/facets/lineage.pb.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/facets/lineage.proto - -package facets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Linage reprsents the relationship of resource to other resources. -// Relation is way of describing the relationship between two resources. -type Lineage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource that is the source of the relationship. - // Example: a resource that is the parent of another resource. - Upstreams []*common.Resource `protobuf:"bytes,1,rep,name=upstreams,proto3" json:"upstreams,omitempty"` - // The resource that is the destination of the relationship. - // Example: a resource that is the child of another resource. - Downstreams []*common.Resource `protobuf:"bytes,2,rep,name=downstreams,proto3" json:"downstreams,omitempty"` -} - -func (x *Lineage) Reset() { - *x = Lineage{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_lineage_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Lineage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Lineage) ProtoMessage() {} - -func (x *Lineage) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_lineage_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Lineage.ProtoReflect.Descriptor instead. -func (*Lineage) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_lineage_proto_rawDescGZIP(), []int{0} -} - -func (x *Lineage) GetUpstreams() []*common.Resource { - if x != nil { - return x.Upstreams - } - return nil -} - -func (x *Lineage) GetDownstreams() []*common.Resource { - if x != nil { - return x.Downstreams - } - return nil -} - -var File_odpf_assets_facets_lineage_proto protoreflect.FileDescriptor - -var file_odpf_assets_facets_lineage_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x07, 0x4c, 0x69, - 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x73, 0x42, 0x4b, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x42, 0x0c, 0x4c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_facets_lineage_proto_rawDescOnce sync.Once - file_odpf_assets_facets_lineage_proto_rawDescData = file_odpf_assets_facets_lineage_proto_rawDesc -) - -func file_odpf_assets_facets_lineage_proto_rawDescGZIP() []byte { - file_odpf_assets_facets_lineage_proto_rawDescOnce.Do(func() { - file_odpf_assets_facets_lineage_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_lineage_proto_rawDescData) - }) - return file_odpf_assets_facets_lineage_proto_rawDescData -} - -var file_odpf_assets_facets_lineage_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_odpf_assets_facets_lineage_proto_goTypes = []interface{}{ - (*Lineage)(nil), // 0: odpf.assets.facets.Lineage - (*common.Resource)(nil), // 1: odpf.assets.common.Resource -} -var file_odpf_assets_facets_lineage_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.facets.Lineage.upstreams:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.facets.Lineage.downstreams:type_name -> odpf.assets.common.Resource - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_odpf_assets_facets_lineage_proto_init() } -func file_odpf_assets_facets_lineage_proto_init() { - if File_odpf_assets_facets_lineage_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_facets_lineage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Lineage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_facets_lineage_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_facets_lineage_proto_goTypes, - DependencyIndexes: file_odpf_assets_facets_lineage_proto_depIdxs, - MessageInfos: file_odpf_assets_facets_lineage_proto_msgTypes, - }.Build() - File_odpf_assets_facets_lineage_proto = out.File - file_odpf_assets_facets_lineage_proto_rawDesc = nil - file_odpf_assets_facets_lineage_proto_goTypes = nil - file_odpf_assets_facets_lineage_proto_depIdxs = nil -} diff --git a/models/odpf/assets/facets/properties.pb.go b/models/odpf/assets/facets/properties.pb.go deleted file mode 100644 index fb17f9058..000000000 --- a/models/odpf/assets/facets/properties.pb.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/facets/properties.proto - -package facets - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Properties struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional: List of tags the user has. - Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` - //Optional. List of labels the user has. - Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // Optional: List of properties the user has. - Attributes *structpb.Struct `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *Properties) Reset() { - *x = Properties{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_properties_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Properties) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Properties) ProtoMessage() {} - -func (x *Properties) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_properties_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Properties.ProtoReflect.Descriptor instead. -func (*Properties) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_properties_proto_rawDescGZIP(), []int{0} -} - -func (x *Properties) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Properties) GetLabels() map[string]string { - if x != nil { - return x.Labels - } - return nil -} - -func (x *Properties) GetAttributes() *structpb.Struct { - if x != nil { - return x.Attributes - } - return nil -} - -var File_odpf_assets_facets_properties_proto protoreflect.FileDescriptor - -var file_odpf_assets_facets_properties_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x42, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x37, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x42, 0x4e, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x42, 0x0f, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, - 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_facets_properties_proto_rawDescOnce sync.Once - file_odpf_assets_facets_properties_proto_rawDescData = file_odpf_assets_facets_properties_proto_rawDesc -) - -func file_odpf_assets_facets_properties_proto_rawDescGZIP() []byte { - file_odpf_assets_facets_properties_proto_rawDescOnce.Do(func() { - file_odpf_assets_facets_properties_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_properties_proto_rawDescData) - }) - return file_odpf_assets_facets_properties_proto_rawDescData -} - -var file_odpf_assets_facets_properties_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_facets_properties_proto_goTypes = []interface{}{ - (*Properties)(nil), // 0: odpf.assets.facets.Properties - nil, // 1: odpf.assets.facets.Properties.LabelsEntry - (*structpb.Struct)(nil), // 2: google.protobuf.Struct -} -var file_odpf_assets_facets_properties_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.facets.Properties.labels:type_name -> odpf.assets.facets.Properties.LabelsEntry - 2, // 1: odpf.assets.facets.Properties.attributes:type_name -> google.protobuf.Struct - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_odpf_assets_facets_properties_proto_init() } -func file_odpf_assets_facets_properties_proto_init() { - if File_odpf_assets_facets_properties_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_facets_properties_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Properties); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_facets_properties_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_facets_properties_proto_goTypes, - DependencyIndexes: file_odpf_assets_facets_properties_proto_depIdxs, - MessageInfos: file_odpf_assets_facets_properties_proto_msgTypes, - }.Build() - File_odpf_assets_facets_properties_proto = out.File - file_odpf_assets_facets_properties_proto_rawDesc = nil - file_odpf_assets_facets_properties_proto_goTypes = nil - file_odpf_assets_facets_properties_proto_depIdxs = nil -} diff --git a/models/odpf/assets/facets/v1beta1/lineage.pb.go b/models/odpf/assets/facets/v1beta1/lineage.pb.go new file mode 100644 index 000000000..be8d85e15 --- /dev/null +++ b/models/odpf/assets/facets/v1beta1/lineage.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/facets/v1beta1/lineage.proto + +package facetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Linage reprsents the relationship of resource to other resources. +// Relation is way of describing the relationship between two resources. +type Lineage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource that is the source of the relationship. + // Example: a resource that is the parent of another resource. + Upstreams []*v1beta1.Resource `protobuf:"bytes,1,rep,name=upstreams,proto3" json:"upstreams,omitempty"` + // The resource that is the destination of the relationship. + // Example: a resource that is the child of another resource. + Downstreams []*v1beta1.Resource `protobuf:"bytes,2,rep,name=downstreams,proto3" json:"downstreams,omitempty"` +} + +func (x *Lineage) Reset() { + *x = Lineage{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_facets_v1beta1_lineage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Lineage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Lineage) ProtoMessage() {} + +func (x *Lineage) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_facets_v1beta1_lineage_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Lineage.ProtoReflect.Descriptor instead. +func (*Lineage) Descriptor() ([]byte, []int) { + return file_odpf_assets_facets_v1beta1_lineage_proto_rawDescGZIP(), []int{0} +} + +func (x *Lineage) GetUpstreams() []*v1beta1.Resource { + if x != nil { + return x.Upstreams + } + return nil +} + +func (x *Lineage) GetDownstreams() []*v1beta1.Resource { + if x != nil { + return x.Downstreams + } + return nil +} + +var File_odpf_assets_facets_v1beta1_lineage_proto protoreflect.FileDescriptor + +var file_odpf_assets_facets_v1beta1_lineage_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x6e, + 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x07, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, + 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x6f, + 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x42, 0x61, 0x0a, 0x15, 0x69, 0x6f, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, + 0x74, 0x73, 0x42, 0x0c, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, + 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, + 0x61, 0x63, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_facets_v1beta1_lineage_proto_rawDescOnce sync.Once + file_odpf_assets_facets_v1beta1_lineage_proto_rawDescData = file_odpf_assets_facets_v1beta1_lineage_proto_rawDesc +) + +func file_odpf_assets_facets_v1beta1_lineage_proto_rawDescGZIP() []byte { + file_odpf_assets_facets_v1beta1_lineage_proto_rawDescOnce.Do(func() { + file_odpf_assets_facets_v1beta1_lineage_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_v1beta1_lineage_proto_rawDescData) + }) + return file_odpf_assets_facets_v1beta1_lineage_proto_rawDescData +} + +var file_odpf_assets_facets_v1beta1_lineage_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_odpf_assets_facets_v1beta1_lineage_proto_goTypes = []interface{}{ + (*Lineage)(nil), // 0: odpf.assets.facets.v1beta1.Lineage + (*v1beta1.Resource)(nil), // 1: odpf.assets.common.v1beta1.Resource +} +var file_odpf_assets_facets_v1beta1_lineage_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.facets.v1beta1.Lineage.upstreams:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.facets.v1beta1.Lineage.downstreams:type_name -> odpf.assets.common.v1beta1.Resource + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_odpf_assets_facets_v1beta1_lineage_proto_init() } +func file_odpf_assets_facets_v1beta1_lineage_proto_init() { + if File_odpf_assets_facets_v1beta1_lineage_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_facets_v1beta1_lineage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Lineage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_facets_v1beta1_lineage_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_facets_v1beta1_lineage_proto_goTypes, + DependencyIndexes: file_odpf_assets_facets_v1beta1_lineage_proto_depIdxs, + MessageInfos: file_odpf_assets_facets_v1beta1_lineage_proto_msgTypes, + }.Build() + File_odpf_assets_facets_v1beta1_lineage_proto = out.File + file_odpf_assets_facets_v1beta1_lineage_proto_rawDesc = nil + file_odpf_assets_facets_v1beta1_lineage_proto_goTypes = nil + file_odpf_assets_facets_v1beta1_lineage_proto_depIdxs = nil +} diff --git a/models/odpf/assets/facets/ownership.pb.go b/models/odpf/assets/facets/v1beta1/ownership.pb.go similarity index 69% rename from models/odpf/assets/facets/ownership.pb.go rename to models/odpf/assets/facets/v1beta1/ownership.pb.go index bda44c483..4d658e82d 100644 --- a/models/odpf/assets/facets/ownership.pb.go +++ b/models/odpf/assets/facets/v1beta1/ownership.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/facets/ownership.proto +// protoc v3.19.1 +// source: odpf/assets/facets/v1beta1/ownership.proto -package facets +package facetsv1beta1 import ( - _ "github.com/odpf/meteor/models/odpf/assets/common" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,7 +34,7 @@ type Ownership struct { func (x *Ownership) Reset() { *x = Ownership{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_ownership_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -48,7 +47,7 @@ func (x *Ownership) String() string { func (*Ownership) ProtoMessage() {} func (x *Ownership) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_ownership_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -61,7 +60,7 @@ func (x *Ownership) ProtoReflect() protoreflect.Message { // Deprecated: Use Ownership.ProtoReflect.Descriptor instead. func (*Ownership) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_ownership_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_facets_v1beta1_ownership_proto_rawDescGZIP(), []int{0} } func (x *Ownership) GetOwners() []*Owner { @@ -92,7 +91,7 @@ type Owner struct { func (x *Owner) Reset() { *x = Owner{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_ownership_proto_msgTypes[1] + mi := &file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -105,7 +104,7 @@ func (x *Owner) String() string { func (*Owner) ProtoMessage() {} func (x *Owner) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_ownership_proto_msgTypes[1] + mi := &file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -118,7 +117,7 @@ func (x *Owner) ProtoReflect() protoreflect.Message { // Deprecated: Use Owner.ProtoReflect.Descriptor instead. func (*Owner) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_ownership_proto_rawDescGZIP(), []int{1} + return file_odpf_assets_facets_v1beta1_ownership_proto_rawDescGZIP(), []int{1} } func (x *Owner) GetUrn() string { @@ -149,9 +148,9 @@ func (x *Owner) GetEmail() string { return "" } -var File_odpf_assets_facets_ownership_proto protoreflect.FileDescriptor +var File_odpf_assets_facets_v1beta1_ownership_proto protoreflect.FileDescriptor -var File_odpf_assets_facets_ownership_proto_rawDesc = []byte{ +var file_odpf_assets_facets_v1beta1_ownership_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, @@ -177,24 +176,24 @@ var File_odpf_assets_facets_ownership_proto_rawDesc = []byte{ } var ( - File_odpf_assets_facets_ownership_proto_rawDescOnce sync.Once - File_odpf_assets_facets_ownership_proto_rawDescData = File_odpf_assets_facets_ownership_proto_rawDesc + file_odpf_assets_facets_v1beta1_ownership_proto_rawDescOnce sync.Once + file_odpf_assets_facets_v1beta1_ownership_proto_rawDescData = file_odpf_assets_facets_v1beta1_ownership_proto_rawDesc ) -func file_odpf_assets_facets_ownership_proto_rawDescGZIP() []byte { - File_odpf_assets_facets_ownership_proto_rawDescOnce.Do(func() { - File_odpf_assets_facets_ownership_proto_rawDescData = protoimpl.X.CompressGZIP(File_odpf_assets_facets_ownership_proto_rawDescData) +func file_odpf_assets_facets_v1beta1_ownership_proto_rawDescGZIP() []byte { + file_odpf_assets_facets_v1beta1_ownership_proto_rawDescOnce.Do(func() { + file_odpf_assets_facets_v1beta1_ownership_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_v1beta1_ownership_proto_rawDescData) }) - return File_odpf_assets_facets_ownership_proto_rawDescData + return file_odpf_assets_facets_v1beta1_ownership_proto_rawDescData } -var file_odpf_assets_facets_ownership_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var File_odpf_assets_facets_ownership_proto_goTypes = []interface{}{ - (*Ownership)(nil), // 0: odpf.assets.facets.Ownership - (*Owner)(nil), // 1: odpf.assets.facets.Owner +var file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_facets_v1beta1_ownership_proto_goTypes = []interface{}{ + (*Ownership)(nil), // 0: odpf.assets.facets.v1beta1.Ownership + (*Owner)(nil), // 1: odpf.assets.facets.v1beta1.Owner } -var File_odpf_assets_facets_ownership_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.facets.Ownership.owners:type_name -> odpf.assets.facets.Owner +var file_odpf_assets_facets_v1beta1_ownership_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.facets.v1beta1.Ownership.owners:type_name -> odpf.assets.facets.v1beta1.Owner 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -202,13 +201,13 @@ var File_odpf_assets_facets_ownership_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { File_odpf_assets_facets_ownership_proto_init() } -func File_odpf_assets_facets_ownership_proto_init() { - if File_odpf_assets_facets_ownership_proto != nil { +func init() { file_odpf_assets_facets_v1beta1_ownership_proto_init() } +func file_odpf_assets_facets_v1beta1_ownership_proto_init() { + if File_odpf_assets_facets_v1beta1_ownership_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_facets_ownership_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ownership); i { case 0: return &v.state @@ -220,7 +219,7 @@ func File_odpf_assets_facets_ownership_proto_init() { return nil } } - file_odpf_assets_facets_ownership_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Owner); i { case 0: return &v.state @@ -237,18 +236,18 @@ func File_odpf_assets_facets_ownership_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: File_odpf_assets_facets_ownership_proto_rawDesc, + RawDescriptor: file_odpf_assets_facets_v1beta1_ownership_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: File_odpf_assets_facets_ownership_proto_goTypes, - DependencyIndexes: File_odpf_assets_facets_ownership_proto_depIdxs, - MessageInfos: file_odpf_assets_facets_ownership_proto_msgTypes, + GoTypes: file_odpf_assets_facets_v1beta1_ownership_proto_goTypes, + DependencyIndexes: file_odpf_assets_facets_v1beta1_ownership_proto_depIdxs, + MessageInfos: file_odpf_assets_facets_v1beta1_ownership_proto_msgTypes, }.Build() - File_odpf_assets_facets_ownership_proto = out.File - File_odpf_assets_facets_ownership_proto_rawDesc = nil - File_odpf_assets_facets_ownership_proto_goTypes = nil - File_odpf_assets_facets_ownership_proto_depIdxs = nil + File_odpf_assets_facets_v1beta1_ownership_proto = out.File + file_odpf_assets_facets_v1beta1_ownership_proto_rawDesc = nil + file_odpf_assets_facets_v1beta1_ownership_proto_goTypes = nil + file_odpf_assets_facets_v1beta1_ownership_proto_depIdxs = nil } diff --git a/models/odpf/assets/facets/preview.pb.go b/models/odpf/assets/facets/v1beta1/preview.pb.go similarity index 55% rename from models/odpf/assets/facets/preview.pb.go rename to models/odpf/assets/facets/v1beta1/preview.pb.go index f76b15c75..e636d2094 100644 --- a/models/odpf/assets/facets/preview.pb.go +++ b/models/odpf/assets/facets/v1beta1/preview.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/facets/preview.proto +// protoc v3.19.1 +// source: odpf/assets/facets/v1beta1/preview.proto -package facets +package facetsv1beta1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -37,7 +37,7 @@ type Preview struct { func (x *Preview) Reset() { *x = Preview{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_preview_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_preview_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *Preview) String() string { func (*Preview) ProtoMessage() {} func (x *Preview) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_preview_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_preview_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +63,7 @@ func (x *Preview) ProtoReflect() protoreflect.Message { // Deprecated: Use Preview.ProtoReflect.Descriptor instead. func (*Preview) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_preview_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_facets_v1beta1_preview_proto_rawDescGZIP(), []int{0} } func (x *Preview) GetFields() []string { @@ -80,46 +80,49 @@ func (x *Preview) GetRows() *structpb.ListValue { return nil } -var File_odpf_assets_facets_preview_proto protoreflect.FileDescriptor +var File_odpf_assets_facets_v1beta1_preview_proto protoreflect.FileDescriptor -var file_odpf_assets_facets_preview_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, +var file_odpf_assets_facets_v1beta1_preview_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x42, 0x4b, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x42, 0x61, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, - 0x42, 0x0c, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, + 0x42, 0x0c, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_odpf_assets_facets_preview_proto_rawDescOnce sync.Once - file_odpf_assets_facets_preview_proto_rawDescData = file_odpf_assets_facets_preview_proto_rawDesc + file_odpf_assets_facets_v1beta1_preview_proto_rawDescOnce sync.Once + file_odpf_assets_facets_v1beta1_preview_proto_rawDescData = file_odpf_assets_facets_v1beta1_preview_proto_rawDesc ) -func file_odpf_assets_facets_preview_proto_rawDescGZIP() []byte { - file_odpf_assets_facets_preview_proto_rawDescOnce.Do(func() { - file_odpf_assets_facets_preview_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_preview_proto_rawDescData) +func file_odpf_assets_facets_v1beta1_preview_proto_rawDescGZIP() []byte { + file_odpf_assets_facets_v1beta1_preview_proto_rawDescOnce.Do(func() { + file_odpf_assets_facets_v1beta1_preview_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_v1beta1_preview_proto_rawDescData) }) - return file_odpf_assets_facets_preview_proto_rawDescData + return file_odpf_assets_facets_v1beta1_preview_proto_rawDescData } -var file_odpf_assets_facets_preview_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_odpf_assets_facets_preview_proto_goTypes = []interface{}{ - (*Preview)(nil), // 0: odpf.assets.facets.Preview +var file_odpf_assets_facets_v1beta1_preview_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_odpf_assets_facets_v1beta1_preview_proto_goTypes = []interface{}{ + (*Preview)(nil), // 0: odpf.assets.facets.v1beta1.Preview (*structpb.ListValue)(nil), // 1: google.protobuf.ListValue } -var file_odpf_assets_facets_preview_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.facets.Preview.rows:type_name -> google.protobuf.ListValue +var file_odpf_assets_facets_v1beta1_preview_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.facets.v1beta1.Preview.rows:type_name -> google.protobuf.ListValue 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -127,13 +130,13 @@ var file_odpf_assets_facets_preview_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_odpf_assets_facets_preview_proto_init() } -func file_odpf_assets_facets_preview_proto_init() { - if File_odpf_assets_facets_preview_proto != nil { +func init() { file_odpf_assets_facets_v1beta1_preview_proto_init() } +func file_odpf_assets_facets_v1beta1_preview_proto_init() { + if File_odpf_assets_facets_v1beta1_preview_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_facets_preview_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_preview_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Preview); i { case 0: return &v.state @@ -150,18 +153,18 @@ func file_odpf_assets_facets_preview_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_facets_preview_proto_rawDesc, + RawDescriptor: file_odpf_assets_facets_v1beta1_preview_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_facets_preview_proto_goTypes, - DependencyIndexes: file_odpf_assets_facets_preview_proto_depIdxs, - MessageInfos: file_odpf_assets_facets_preview_proto_msgTypes, + GoTypes: file_odpf_assets_facets_v1beta1_preview_proto_goTypes, + DependencyIndexes: file_odpf_assets_facets_v1beta1_preview_proto_depIdxs, + MessageInfos: file_odpf_assets_facets_v1beta1_preview_proto_msgTypes, }.Build() - File_odpf_assets_facets_preview_proto = out.File - file_odpf_assets_facets_preview_proto_rawDesc = nil - file_odpf_assets_facets_preview_proto_goTypes = nil - file_odpf_assets_facets_preview_proto_depIdxs = nil + File_odpf_assets_facets_v1beta1_preview_proto = out.File + file_odpf_assets_facets_v1beta1_preview_proto_rawDesc = nil + file_odpf_assets_facets_v1beta1_preview_proto_goTypes = nil + file_odpf_assets_facets_v1beta1_preview_proto_depIdxs = nil } diff --git a/models/odpf/assets/facets/v1beta1/properties.pb.go b/models/odpf/assets/facets/v1beta1/properties.pb.go new file mode 100644 index 000000000..4bde722e8 --- /dev/null +++ b/models/odpf/assets/facets/v1beta1/properties.pb.go @@ -0,0 +1,188 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/facets/v1beta1/properties.proto + +package facetsv1beta1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Properties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional: List of tags the user has. + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + //Optional. List of labels the user has. + Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional: List of properties the user has. + Attributes *structpb.Struct `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *Properties) Reset() { + *x = Properties{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_facets_v1beta1_properties_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Properties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Properties) ProtoMessage() {} + +func (x *Properties) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_facets_v1beta1_properties_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Properties.ProtoReflect.Descriptor instead. +func (*Properties) Descriptor() ([]byte, []int) { + return file_odpf_assets_facets_v1beta1_properties_proto_rawDescGZIP(), []int{0} +} + +func (x *Properties) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Properties) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Properties) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +var File_odpf_assets_facets_v1beta1_properties_proto protoreflect.FileDescriptor + +var file_odpf_assets_facets_v1beta1_properties_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, + 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x64, 0x0a, 0x15, 0x69, 0x6f, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x42, 0x0f, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x3b, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_facets_v1beta1_properties_proto_rawDescOnce sync.Once + file_odpf_assets_facets_v1beta1_properties_proto_rawDescData = file_odpf_assets_facets_v1beta1_properties_proto_rawDesc +) + +func file_odpf_assets_facets_v1beta1_properties_proto_rawDescGZIP() []byte { + file_odpf_assets_facets_v1beta1_properties_proto_rawDescOnce.Do(func() { + file_odpf_assets_facets_v1beta1_properties_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_v1beta1_properties_proto_rawDescData) + }) + return file_odpf_assets_facets_v1beta1_properties_proto_rawDescData +} + +var file_odpf_assets_facets_v1beta1_properties_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_facets_v1beta1_properties_proto_goTypes = []interface{}{ + (*Properties)(nil), // 0: odpf.assets.facets.v1beta1.Properties + nil, // 1: odpf.assets.facets.v1beta1.Properties.LabelsEntry + (*structpb.Struct)(nil), // 2: google.protobuf.Struct +} +var file_odpf_assets_facets_v1beta1_properties_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.facets.v1beta1.Properties.labels:type_name -> odpf.assets.facets.v1beta1.Properties.LabelsEntry + 2, // 1: odpf.assets.facets.v1beta1.Properties.attributes:type_name -> google.protobuf.Struct + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_odpf_assets_facets_v1beta1_properties_proto_init() } +func file_odpf_assets_facets_v1beta1_properties_proto_init() { + if File_odpf_assets_facets_v1beta1_properties_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_facets_v1beta1_properties_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Properties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_facets_v1beta1_properties_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_facets_v1beta1_properties_proto_goTypes, + DependencyIndexes: file_odpf_assets_facets_v1beta1_properties_proto_depIdxs, + MessageInfos: file_odpf_assets_facets_v1beta1_properties_proto_msgTypes, + }.Build() + File_odpf_assets_facets_v1beta1_properties_proto = out.File + file_odpf_assets_facets_v1beta1_properties_proto_rawDesc = nil + file_odpf_assets_facets_v1beta1_properties_proto_goTypes = nil + file_odpf_assets_facets_v1beta1_properties_proto_depIdxs = nil +} diff --git a/models/odpf/assets/facets/schema.pb.go b/models/odpf/assets/facets/v1beta1/schema.pb.go similarity index 67% rename from models/odpf/assets/facets/schema.pb.go rename to models/odpf/assets/facets/v1beta1/schema.pb.go index 1aa3b8fd1..91284ac08 100644 --- a/models/odpf/assets/facets/schema.pb.go +++ b/models/odpf/assets/facets/v1beta1/schema.pb.go @@ -1,10 +1,10 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/facets/schema.proto +// protoc v3.19.1 +// source: odpf/assets/facets/v1beta1/schema.proto -package facets +package facetsv1beta1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -34,7 +34,7 @@ type Columns struct { func (x *Columns) Reset() { *x = Columns{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *Columns) String() string { func (*Columns) ProtoMessage() {} func (x *Columns) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[0] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *Columns) ProtoReflect() protoreflect.Message { // Deprecated: Use Columns.ProtoReflect.Descriptor instead. func (*Columns) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_schema_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_facets_v1beta1_schema_proto_rawDescGZIP(), []int{0} } func (x *Columns) GetColumns() []*Column { @@ -99,7 +99,7 @@ type Column struct { func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[1] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -112,7 +112,7 @@ func (x *Column) String() string { func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[1] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -125,7 +125,7 @@ func (x *Column) ProtoReflect() protoreflect.Message { // Deprecated: Use Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_schema_proto_rawDescGZIP(), []int{1} + return file_odpf_assets_facets_v1beta1_schema_proto_rawDescGZIP(), []int{1} } func (x *Column) GetName() string { @@ -194,7 +194,7 @@ type ColumnProfile struct { func (x *ColumnProfile) Reset() { *x = ColumnProfile{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[2] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -207,7 +207,7 @@ func (x *ColumnProfile) String() string { func (*ColumnProfile) ProtoMessage() {} func (x *ColumnProfile) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[2] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -220,7 +220,7 @@ func (x *ColumnProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use ColumnProfile.ProtoReflect.Descriptor instead. func (*ColumnProfile) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_schema_proto_rawDescGZIP(), []int{2} + return file_odpf_assets_facets_v1beta1_schema_proto_rawDescGZIP(), []int{2} } func (x *ColumnProfile) GetMin() string { @@ -286,7 +286,7 @@ type TopicSchema struct { func (x *TopicSchema) Reset() { *x = TopicSchema{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[3] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +299,7 @@ func (x *TopicSchema) String() string { func (*TopicSchema) ProtoMessage() {} func (x *TopicSchema) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_facets_schema_proto_msgTypes[3] + mi := &file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +312,7 @@ func (x *TopicSchema) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicSchema.ProtoReflect.Descriptor instead. func (*TopicSchema) Descriptor() ([]byte, []int) { - return file_odpf_assets_facets_schema_proto_rawDescGZIP(), []int{3} + return file_odpf_assets_facets_v1beta1_schema_proto_rawDescGZIP(), []int{3} } func (x *TopicSchema) GetSchemaUrl() string { @@ -329,19 +329,21 @@ func (x *TopicSchema) GetFormat() string { return "" } -var File_odpf_assets_facets_schema_proto protoreflect.FileDescriptor - -var file_odpf_assets_facets_schema_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, - 0x61, 0x63, 0x65, 0x74, 0x73, 0x1a, 0x23, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x07, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x06, +var File_odpf_assets_facets_v1beta1_schema_proto protoreflect.FileDescriptor + +var file_odpf_assets_facets_v1beta1_schema_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x3c, 0x0a, + 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -351,13 +353,14 @@ var file_odpf_assets_facets_schema_proto_rawDesc = []byte{ 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, - 0x74, 0x68, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x74, 0x68, 0x12, 0x43, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, @@ -373,38 +376,39 @@ var file_odpf_assets_facets_schema_proto_rawDesc = []byte{ 0x6d, 0x61, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, - 0x4a, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x60, 0x0a, 0x15, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x42, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x3b, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_odpf_assets_facets_schema_proto_rawDescOnce sync.Once - file_odpf_assets_facets_schema_proto_rawDescData = file_odpf_assets_facets_schema_proto_rawDesc + file_odpf_assets_facets_v1beta1_schema_proto_rawDescOnce sync.Once + file_odpf_assets_facets_v1beta1_schema_proto_rawDescData = file_odpf_assets_facets_v1beta1_schema_proto_rawDesc ) -func file_odpf_assets_facets_schema_proto_rawDescGZIP() []byte { - file_odpf_assets_facets_schema_proto_rawDescOnce.Do(func() { - file_odpf_assets_facets_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_schema_proto_rawDescData) +func file_odpf_assets_facets_v1beta1_schema_proto_rawDescGZIP() []byte { + file_odpf_assets_facets_v1beta1_schema_proto_rawDescOnce.Do(func() { + file_odpf_assets_facets_v1beta1_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_facets_v1beta1_schema_proto_rawDescData) }) - return file_odpf_assets_facets_schema_proto_rawDescData + return file_odpf_assets_facets_v1beta1_schema_proto_rawDescData } -var file_odpf_assets_facets_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_odpf_assets_facets_schema_proto_goTypes = []interface{}{ - (*Columns)(nil), // 0: odpf.assets.facets.Columns - (*Column)(nil), // 1: odpf.assets.facets.Column - (*ColumnProfile)(nil), // 2: odpf.assets.facets.ColumnProfile - (*TopicSchema)(nil), // 3: odpf.assets.facets.TopicSchema - (*Properties)(nil), // 4: odpf.assets.facets.Properties +var file_odpf_assets_facets_v1beta1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_odpf_assets_facets_v1beta1_schema_proto_goTypes = []interface{}{ + (*Columns)(nil), // 0: odpf.assets.facets.v1beta1.Columns + (*Column)(nil), // 1: odpf.assets.facets.v1beta1.Column + (*ColumnProfile)(nil), // 2: odpf.assets.facets.v1beta1.ColumnProfile + (*TopicSchema)(nil), // 3: odpf.assets.facets.v1beta1.TopicSchema + (*Properties)(nil), // 4: odpf.assets.facets.v1beta1.Properties } -var file_odpf_assets_facets_schema_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.facets.Columns.columns:type_name -> odpf.assets.facets.Column - 2, // 1: odpf.assets.facets.Column.profile:type_name -> odpf.assets.facets.ColumnProfile - 4, // 2: odpf.assets.facets.Column.properties:type_name -> odpf.assets.facets.Properties +var file_odpf_assets_facets_v1beta1_schema_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.facets.v1beta1.Columns.columns:type_name -> odpf.assets.facets.v1beta1.Column + 2, // 1: odpf.assets.facets.v1beta1.Column.profile:type_name -> odpf.assets.facets.v1beta1.ColumnProfile + 4, // 2: odpf.assets.facets.v1beta1.Column.properties:type_name -> odpf.assets.facets.v1beta1.Properties 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -412,14 +416,14 @@ var file_odpf_assets_facets_schema_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_odpf_assets_facets_schema_proto_init() } -func file_odpf_assets_facets_schema_proto_init() { - if File_odpf_assets_facets_schema_proto != nil { +func init() { file_odpf_assets_facets_v1beta1_schema_proto_init() } +func file_odpf_assets_facets_v1beta1_schema_proto_init() { + if File_odpf_assets_facets_v1beta1_schema_proto != nil { return } - file_odpf_assets_facets_properties_proto_init() + file_odpf_assets_facets_v1beta1_properties_proto_init() if !protoimpl.UnsafeEnabled { - file_odpf_assets_facets_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Columns); i { case 0: return &v.state @@ -431,7 +435,7 @@ func file_odpf_assets_facets_schema_proto_init() { return nil } } - file_odpf_assets_facets_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column); i { case 0: return &v.state @@ -443,7 +447,7 @@ func file_odpf_assets_facets_schema_proto_init() { return nil } } - file_odpf_assets_facets_schema_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ColumnProfile); i { case 0: return &v.state @@ -455,7 +459,7 @@ func file_odpf_assets_facets_schema_proto_init() { return nil } } - file_odpf_assets_facets_schema_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_facets_v1beta1_schema_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TopicSchema); i { case 0: return &v.state @@ -472,18 +476,18 @@ func file_odpf_assets_facets_schema_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_facets_schema_proto_rawDesc, + RawDescriptor: file_odpf_assets_facets_v1beta1_schema_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_facets_schema_proto_goTypes, - DependencyIndexes: file_odpf_assets_facets_schema_proto_depIdxs, - MessageInfos: file_odpf_assets_facets_schema_proto_msgTypes, + GoTypes: file_odpf_assets_facets_v1beta1_schema_proto_goTypes, + DependencyIndexes: file_odpf_assets_facets_v1beta1_schema_proto_depIdxs, + MessageInfos: file_odpf_assets_facets_v1beta1_schema_proto_msgTypes, }.Build() - File_odpf_assets_facets_schema_proto = out.File - file_odpf_assets_facets_schema_proto_rawDesc = nil - file_odpf_assets_facets_schema_proto_goTypes = nil - file_odpf_assets_facets_schema_proto_depIdxs = nil + File_odpf_assets_facets_v1beta1_schema_proto = out.File + file_odpf_assets_facets_v1beta1_schema_proto_rawDesc = nil + file_odpf_assets_facets_v1beta1_schema_proto_goTypes = nil + file_odpf_assets_facets_v1beta1_schema_proto_depIdxs = nil } diff --git a/models/odpf/assets/group.pb.go b/models/odpf/assets/group.pb.go deleted file mode 100644 index a59cfdc59..000000000 --- a/models/odpf/assets/group.pb.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/group.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Group represents a group of users and resources. -type Group struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The email of the group. - // Example: `xyz@xyz.com` - Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - // The members of the group. - // For example look at schema of the member. - Members []*Member `protobuf:"bytes,21,rep,name=members,proto3" json:"members,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,31,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,32,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Group) Reset() { - *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Group) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Group) ProtoMessage() {} - -func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_group_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Group.ProtoReflect.Descriptor instead. -func (*Group) Descriptor() ([]byte, []int) { - return file_odpf_assets_group_proto_rawDescGZIP(), []int{0} -} - -func (x *Group) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Group) GetEmail() string { - if x != nil { - return x.Email - } - return "" -} - -func (x *Group) GetMembers() []*Member { - if x != nil { - return x.Members - } - return nil -} - -func (x *Group) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Group) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Group) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -// Member represents a user. -type Member struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier for the user. - // Example: `user:example`. - Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` - // The role of the user. - // Example: `owner`. - Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` -} - -func (x *Member) Reset() { - *x = Member{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Member) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Member) ProtoMessage() {} - -func (x *Member) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_group_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Member.ProtoReflect.Descriptor instead. -func (*Member) Descriptor() ([]byte, []int) { - return file_odpf_assets_group_proto_rawDescGZIP(), []int{1} -} - -func (x *Member) GetUrn() string { - if x != nil { - return x.Urn - } - return "" -} - -func (x *Member) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -var File_odpf_assets_group_proto protoreflect.FileDescriptor - -var file_odpf_assets_group_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, - 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, - 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb6, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x38, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x2d, 0x0a, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, - 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, - 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x06, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x3b, 0x0a, 0x0e, 0x69, - 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_group_proto_rawDescOnce sync.Once - file_odpf_assets_group_proto_rawDescData = file_odpf_assets_group_proto_rawDesc -) - -func file_odpf_assets_group_proto_rawDescGZIP() []byte { - file_odpf_assets_group_proto_rawDescOnce.Do(func() { - file_odpf_assets_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_group_proto_rawDescData) - }) - return file_odpf_assets_group_proto_rawDescData -} - -var file_odpf_assets_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_group_proto_goTypes = []interface{}{ - (*Group)(nil), // 0: odpf.assets.Group - (*Member)(nil), // 1: odpf.assets.Member - (*common.Resource)(nil), // 2: odpf.assets.common.Resource - (*facets.Properties)(nil), // 3: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 4: odpf.assets.common.Timestamp - (*common.Event)(nil), // 5: odpf.assets.common.Event -} -var file_odpf_assets_group_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.Group.resource:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.Group.members:type_name -> odpf.assets.Member - 3, // 2: odpf.assets.Group.properties:type_name -> odpf.assets.facets.Properties - 4, // 3: odpf.assets.Group.timestamps:type_name -> odpf.assets.common.Timestamp - 5, // 4: odpf.assets.Group.event:type_name -> odpf.assets.common.Event - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_odpf_assets_group_proto_init() } -func file_odpf_assets_group_proto_init() { - if File_odpf_assets_group_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Member); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_group_proto_goTypes, - DependencyIndexes: file_odpf_assets_group_proto_depIdxs, - MessageInfos: file_odpf_assets_group_proto_msgTypes, - }.Build() - File_odpf_assets_group_proto = out.File - file_odpf_assets_group_proto_rawDesc = nil - file_odpf_assets_group_proto_goTypes = nil - file_odpf_assets_group_proto_depIdxs = nil -} diff --git a/models/odpf/assets/job.pb.go b/models/odpf/assets/job.pb.go deleted file mode 100644 index 125935b28..000000000 --- a/models/odpf/assets/job.pb.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/job.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Job is a resource that represents a job. -type Job struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The ownership of the topic. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // The lineage of the topic. - // For an example check out lineage schema. - Lineage *facets.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Job) Reset() { - *x = Job{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_job_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Job) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Job) ProtoMessage() {} - -func (x *Job) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_job_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Job.ProtoReflect.Descriptor instead. -func (*Job) Descriptor() ([]byte, []int) { - return file_odpf_assets_job_proto_rawDescGZIP(), []int{0} -} - -func (x *Job) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Job) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Job) GetLineage() *facets.Lineage { - if x != nil { - return x.Lineage - } - return nil -} - -func (x *Job) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Job) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Job) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -var File_odpf_assets_job_proto protoreflect.FileDescriptor - -var file_odpf_assets_job_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x6a, 0x6f, - 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x6e, - 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, 0x64, 0x70, 0x66, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x02, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x38, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, - 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x35, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, - 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, - 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x39, 0x0a, 0x0e, - 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x08, - 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, - 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_job_proto_rawDescOnce sync.Once - file_odpf_assets_job_proto_rawDescData = file_odpf_assets_job_proto_rawDesc -) - -func file_odpf_assets_job_proto_rawDescGZIP() []byte { - file_odpf_assets_job_proto_rawDescOnce.Do(func() { - file_odpf_assets_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_job_proto_rawDescData) - }) - return file_odpf_assets_job_proto_rawDescData -} - -var file_odpf_assets_job_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_odpf_assets_job_proto_goTypes = []interface{}{ - (*Job)(nil), // 0: odpf.assets.Job - (*common.Resource)(nil), // 1: odpf.assets.common.Resource - (*facets.Ownership)(nil), // 2: odpf.assets.facets.Ownership - (*facets.Lineage)(nil), // 3: odpf.assets.facets.Lineage - (*facets.Properties)(nil), // 4: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 5: odpf.assets.common.Timestamp - (*common.Event)(nil), // 6: odpf.assets.common.Event -} -var file_odpf_assets_job_proto_depIdxs = []int32{ - 1, // 0: odpf.assets.Job.resource:type_name -> odpf.assets.common.Resource - 2, // 1: odpf.assets.Job.ownership:type_name -> odpf.assets.facets.Ownership - 3, // 2: odpf.assets.Job.lineage:type_name -> odpf.assets.facets.Lineage - 4, // 3: odpf.assets.Job.properties:type_name -> odpf.assets.facets.Properties - 5, // 4: odpf.assets.Job.timestamps:type_name -> odpf.assets.common.Timestamp - 6, // 5: odpf.assets.Job.event:type_name -> odpf.assets.common.Event - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_odpf_assets_job_proto_init() } -func file_odpf_assets_job_proto_init() { - if File_odpf_assets_job_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Job); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_job_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_job_proto_goTypes, - DependencyIndexes: file_odpf_assets_job_proto_depIdxs, - MessageInfos: file_odpf_assets_job_proto_msgTypes, - }.Build() - File_odpf_assets_job_proto = out.File - file_odpf_assets_job_proto_rawDesc = nil - file_odpf_assets_job_proto_goTypes = nil - file_odpf_assets_job_proto_depIdxs = nil -} diff --git a/models/odpf/assets/table.pb.go b/models/odpf/assets/table.pb.go deleted file mode 100644 index 05bae5bfa..000000000 --- a/models/odpf/assets/table.pb.go +++ /dev/null @@ -1,497 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.1 -// source: odpf/assets/table.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Table is a table in a database. -// It can be a file, a table, a view, a materialized view, a temporary table, or a virtual table. -type Table struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The metrics about the table. - // For example check the profile schem. - Profile *TableProfile `protobuf:"bytes,21,opt,name=profile,proto3" json:"profile,omitempty"` - // The columns of the table. - // Example: 'id', `name`, `age'. - Schema *facets.Columns `protobuf:"bytes,22,opt,name=schema,proto3" json:"schema,omitempty"` - // Previews of the table. - // For an example check out preview facet. - Preview *facets.Preview `protobuf:"bytes,23,opt,name=preview,proto3" json:"preview,omitempty"` - // The ownership of the topic. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` - // The lineage of the topic. - // For an example check out lineage. - Lineage *facets.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Table) Reset() { - *x = Table{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_table_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Table) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Table) ProtoMessage() {} - -func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_table_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Table.ProtoReflect.Descriptor instead. -func (*Table) Descriptor() ([]byte, []int) { - return file_odpf_assets_table_proto_rawDescGZIP(), []int{0} -} - -func (x *Table) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Table) GetProfile() *TableProfile { - if x != nil { - return x.Profile - } - return nil -} - -func (x *Table) GetSchema() *facets.Columns { - if x != nil { - return x.Schema - } - return nil -} - -func (x *Table) GetPreview() *facets.Preview { - if x != nil { - return x.Preview - } - return nil -} - -func (x *Table) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Table) GetLineage() *facets.Lineage { - if x != nil { - return x.Lineage - } - return nil -} - -func (x *Table) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Table) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Table) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -// TableProfile is the metrics about the table. -type TableProfile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The number of rows in the table. - // Example: `100`. - TotalRows int64 `protobuf:"varint,1,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` - // The number of rows in the table that are not deleted. - // Example: `event_timestamp`. - PartitionKey string `protobuf:"bytes,2,opt,name=partition_key,json=partitionKey,proto3" json:"partition_key,omitempty"` - PartitionValue string `protobuf:"bytes,3,opt,name=partition_value,json=partitionValue,proto3" json:"partition_value,omitempty"` - UsageCount int64 `protobuf:"varint,4,opt,name=usage_count,json=usageCount,proto3" json:"usage_count,omitempty"` - Joins []*Join `protobuf:"bytes,5,rep,name=joins,proto3" json:"joins,omitempty"` - Filters []string `protobuf:"bytes,6,rep,name=filters,proto3" json:"filters,omitempty"` -} - -func (x *TableProfile) Reset() { - *x = TableProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_table_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TableProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TableProfile) ProtoMessage() {} - -func (x *TableProfile) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_table_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TableProfile.ProtoReflect.Descriptor instead. -func (*TableProfile) Descriptor() ([]byte, []int) { - return file_odpf_assets_table_proto_rawDescGZIP(), []int{1} -} - -func (x *TableProfile) GetTotalRows() int64 { - if x != nil { - return x.TotalRows - } - return 0 -} - -func (x *TableProfile) GetPartitionKey() string { - if x != nil { - return x.PartitionKey - } - return "" -} - -func (x *TableProfile) GetPartitionValue() string { - if x != nil { - return x.PartitionValue - } - return "" -} - -func (x *TableProfile) GetUsageCount() int64 { - if x != nil { - return x.UsageCount - } - return 0 -} - -func (x *TableProfile) GetJoins() []*Join { - if x != nil { - return x.Joins - } - return nil -} - -func (x *TableProfile) GetFilters() []string { - if x != nil { - return x.Filters - } - return nil -} - -// Join is the metric of which are other tables that are joined with this table -type Join struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` - Conditions []string `protobuf:"bytes,3,rep,name=conditions,proto3" json:"conditions,omitempty"` -} - -func (x *Join) Reset() { - *x = Join{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_table_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Join) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Join) ProtoMessage() {} - -func (x *Join) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_table_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Join.ProtoReflect.Descriptor instead. -func (*Join) Descriptor() ([]byte, []int) { - return file_odpf_assets_table_proto_rawDescGZIP(), []int{2} -} - -func (x *Join) GetUrn() string { - if x != nil { - return x.Urn - } - return "" -} - -func (x *Join) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *Join) GetConditions() []string { - if x != nil { - return x.Conditions - } - return nil -} - -var File_odpf_assets_table_proto protoreflect.FileDescriptor - -var file_odpf_assets_table_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x76, - 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6f, - 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, - 0x73, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x23, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, - 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, - 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x04, 0x0a, 0x05, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x33, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x16, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x72, 0x65, - 0x76, 0x69, 0x65, 0x77, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, - 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, - 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x35, 0x0a, - 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, - 0x65, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, - 0x65, 0x61, 0x67, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x22, 0xdf, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, - 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x52, 0x6f, 0x77, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x3b, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_table_proto_rawDescOnce sync.Once - file_odpf_assets_table_proto_rawDescData = file_odpf_assets_table_proto_rawDesc -) - -func file_odpf_assets_table_proto_rawDescGZIP() []byte { - file_odpf_assets_table_proto_rawDescOnce.Do(func() { - file_odpf_assets_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_table_proto_rawDescData) - }) - return file_odpf_assets_table_proto_rawDescData -} - -var file_odpf_assets_table_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_odpf_assets_table_proto_goTypes = []interface{}{ - (*Table)(nil), // 0: odpf.assets.Table - (*TableProfile)(nil), // 1: odpf.assets.TableProfile - (*Join)(nil), // 2: odpf.assets.Join - (*common.Resource)(nil), // 3: odpf.assets.common.Resource - (*facets.Columns)(nil), // 4: odpf.assets.facets.Columns - (*facets.Preview)(nil), // 5: odpf.assets.facets.Preview - (*facets.Ownership)(nil), // 6: odpf.assets.facets.Ownership - (*facets.Lineage)(nil), // 7: odpf.assets.facets.Lineage - (*facets.Properties)(nil), // 8: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 9: odpf.assets.common.Timestamp - (*common.Event)(nil), // 10: odpf.assets.common.Event -} -var file_odpf_assets_table_proto_depIdxs = []int32{ - 3, // 0: odpf.assets.Table.resource:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.Table.profile:type_name -> odpf.assets.TableProfile - 4, // 2: odpf.assets.Table.schema:type_name -> odpf.assets.facets.Columns - 5, // 3: odpf.assets.Table.preview:type_name -> odpf.assets.facets.Preview - 6, // 4: odpf.assets.Table.ownership:type_name -> odpf.assets.facets.Ownership - 7, // 5: odpf.assets.Table.lineage:type_name -> odpf.assets.facets.Lineage - 8, // 6: odpf.assets.Table.properties:type_name -> odpf.assets.facets.Properties - 9, // 7: odpf.assets.Table.timestamps:type_name -> odpf.assets.common.Timestamp - 10, // 8: odpf.assets.Table.event:type_name -> odpf.assets.common.Event - 2, // 9: odpf.assets.TableProfile.joins:type_name -> odpf.assets.Join - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_odpf_assets_table_proto_init() } -func file_odpf_assets_table_proto_init() { - if File_odpf_assets_table_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_table_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Table); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_table_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_table_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Join); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_table_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_table_proto_goTypes, - DependencyIndexes: file_odpf_assets_table_proto_depIdxs, - MessageInfos: file_odpf_assets_table_proto_msgTypes, - }.Build() - File_odpf_assets_table_proto = out.File - file_odpf_assets_table_proto_rawDesc = nil - file_odpf_assets_table_proto_goTypes = nil - file_odpf_assets_table_proto_depIdxs = nil -} diff --git a/models/odpf/assets/topic.pb.go b/models/odpf/assets/topic.pb.go deleted file mode 100644 index 1d6421f73..000000000 --- a/models/odpf/assets/topic.pb.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/topic.proto - -package assets - -import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Topic is resource that represents a logical group of messages -// in message bus like kafka, pubsub, pulsar etc. -type Topic struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - // The metrics of the topic. - // For an example check out topic profile schema. - Profile *TopicProfile `protobuf:"bytes,21,opt,name=profile,proto3" json:"profile,omitempty"` - // The schama of the topic. - // For an example check out topic schema. - Schema *facets.TopicSchema `protobuf:"bytes,31,opt,name=schema,proto3" json:"schema,omitempty"` - // The ownership of the topic. - // For an example check out ownership. - Ownership *facets.Ownership `protobuf:"bytes,32,opt,name=ownership,proto3" json:"ownership,omitempty"` - // The lineage of the topic. - // For an example check out lineage schema. - Lineage *facets.Lineage `protobuf:"bytes,33,opt,name=lineage,proto3" json:"lineage,omitempty"` - // List of the user's custom properties. - // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,34,opt,name=properties,proto3" json:"properties,omitempty"` - // The timestamp of the user's creation. - // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,35,opt,name=timestamps,proto3" json:"timestamps,omitempty"` - // The timestamp of the generated event. - // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` -} - -func (x *Topic) Reset() { - *x = Topic{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_topic_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Topic) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Topic) ProtoMessage() {} - -func (x *Topic) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_topic_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Topic.ProtoReflect.Descriptor instead. -func (*Topic) Descriptor() ([]byte, []int) { - return file_odpf_assets_topic_proto_rawDescGZIP(), []int{0} -} - -func (x *Topic) GetResource() *common.Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (x *Topic) GetProfile() *TopicProfile { - if x != nil { - return x.Profile - } - return nil -} - -func (x *Topic) GetSchema() *facets.TopicSchema { - if x != nil { - return x.Schema - } - return nil -} - -func (x *Topic) GetOwnership() *facets.Ownership { - if x != nil { - return x.Ownership - } - return nil -} - -func (x *Topic) GetLineage() *facets.Lineage { - if x != nil { - return x.Lineage - } - return nil -} - -func (x *Topic) GetProperties() *facets.Properties { - if x != nil { - return x.Properties - } - return nil -} - -func (x *Topic) GetTimestamps() *common.Timestamp { - if x != nil { - return x.Timestamps - } - return nil -} - -func (x *Topic) GetEvent() *common.Event { - if x != nil { - return x.Event - } - return nil -} - -// TopicProfile is the profile of the topic. -type TopicProfile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The thrroughput of the topic. - // Example: `1m/minute`. - Throughput string `protobuf:"bytes,1,opt,name=throughput,proto3" json:"throughput,omitempty"` - // The number of partitions in the topic. - // Example: `12`. - NumberOfPartitions int64 `protobuf:"varint,2,opt,name=number_of_partitions,json=numberOfPartitions,proto3" json:"number_of_partitions,omitempty"` -} - -func (x *TopicProfile) Reset() { - *x = TopicProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_topic_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TopicProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TopicProfile) ProtoMessage() {} - -func (x *TopicProfile) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_topic_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TopicProfile.ProtoReflect.Descriptor instead. -func (*TopicProfile) Descriptor() ([]byte, []int) { - return file_odpf_assets_topic_proto_rawDescGZIP(), []int{1} -} - -func (x *TopicProfile) GetThroughput() string { - if x != nil { - return x.Throughput - } - return "" -} - -func (x *TopicProfile) GetNumberOfPartitions() int64 { - if x != nil { - return x.NumberOfPartitions - } - return 0 -} - -var File_odpf_assets_topic_proto protoreflect.FileDescriptor - -var file_odpf_assets_topic_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6f, - 0x70, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, 0x2e, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6f, 0x64, 0x70, - 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, - 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, - 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, - 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x03, 0x0a, 0x05, 0x54, 0x6f, - 0x70, 0x69, 0x63, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, - 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x1f, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3b, 0x0a, 0x09, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, - 0x65, 0x74, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x35, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, - 0x61, 0x67, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x4c, - 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, - 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x22, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x23, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x2f, - 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, - 0x60, 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x1e, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, - 0x30, 0x0a, 0x14, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x3b, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x42, 0x0a, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, - 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_odpf_assets_topic_proto_rawDescOnce sync.Once - file_odpf_assets_topic_proto_rawDescData = file_odpf_assets_topic_proto_rawDesc -) - -func file_odpf_assets_topic_proto_rawDescGZIP() []byte { - file_odpf_assets_topic_proto_rawDescOnce.Do(func() { - file_odpf_assets_topic_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_topic_proto_rawDescData) - }) - return file_odpf_assets_topic_proto_rawDescData -} - -var file_odpf_assets_topic_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_odpf_assets_topic_proto_goTypes = []interface{}{ - (*Topic)(nil), // 0: odpf.assets.Topic - (*TopicProfile)(nil), // 1: odpf.assets.TopicProfile - (*common.Resource)(nil), // 2: odpf.assets.common.Resource - (*facets.TopicSchema)(nil), // 3: odpf.assets.facets.TopicSchema - (*facets.Ownership)(nil), // 4: odpf.assets.facets.Ownership - (*facets.Lineage)(nil), // 5: odpf.assets.facets.Lineage - (*facets.Properties)(nil), // 6: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 7: odpf.assets.common.Timestamp - (*common.Event)(nil), // 8: odpf.assets.common.Event -} -var file_odpf_assets_topic_proto_depIdxs = []int32{ - 2, // 0: odpf.assets.Topic.resource:type_name -> odpf.assets.common.Resource - 1, // 1: odpf.assets.Topic.profile:type_name -> odpf.assets.TopicProfile - 3, // 2: odpf.assets.Topic.schema:type_name -> odpf.assets.facets.TopicSchema - 4, // 3: odpf.assets.Topic.ownership:type_name -> odpf.assets.facets.Ownership - 5, // 4: odpf.assets.Topic.lineage:type_name -> odpf.assets.facets.Lineage - 6, // 5: odpf.assets.Topic.properties:type_name -> odpf.assets.facets.Properties - 7, // 6: odpf.assets.Topic.timestamps:type_name -> odpf.assets.common.Timestamp - 8, // 7: odpf.assets.Topic.event:type_name -> odpf.assets.common.Event - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_odpf_assets_topic_proto_init() } -func file_odpf_assets_topic_proto_init() { - if File_odpf_assets_topic_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_odpf_assets_topic_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Topic); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_odpf_assets_topic_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TopicProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_topic_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_odpf_assets_topic_proto_goTypes, - DependencyIndexes: file_odpf_assets_topic_proto_depIdxs, - MessageInfos: file_odpf_assets_topic_proto_msgTypes, - }.Build() - File_odpf_assets_topic_proto = out.File - file_odpf_assets_topic_proto_rawDesc = nil - file_odpf_assets_topic_proto_goTypes = nil - file_odpf_assets_topic_proto_depIdxs = nil -} diff --git a/models/odpf/assets/v1beta1/bucket.pb.go b/models/odpf/assets/v1beta1/bucket.pb.go new file mode 100644 index 000000000..e0d5e97ca --- /dev/null +++ b/models/odpf/assets/v1beta1/bucket.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/bucket.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Bucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The description of the bucket. + // Example: `This bucket was created by the product team.` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // The location of the bucket. Can differ based on cloud storage used. (e.g. GCS, S3, etc) + // Example: `ASIA` + Location string `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` + // The type of the storage. Can differ based on cloud storage used. (e.g. GCS, S3, etc) + // Example: `STANDARD` + StorageType string `protobuf:"bytes,6,opt,name=storage_type,json=storageType,proto3" json:"storage_type,omitempty"` + // List of blobs in the bucket. + Blobs []*Blob `protobuf:"bytes,7,rep,name=blobs,proto3" json:"blobs,omitempty"` + // The ownership of the bucket. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the bucket's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a bucket. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Bucket) Reset() { + *x = Bucket{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_bucket_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bucket) ProtoMessage() {} + +func (x *Bucket) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_bucket_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Bucket.ProtoReflect.Descriptor instead. +func (*Bucket) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_bucket_proto_rawDescGZIP(), []int{0} +} + +func (x *Bucket) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Bucket) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Bucket) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *Bucket) GetStorageType() string { + if x != nil { + return x.StorageType + } + return "" +} + +func (x *Bucket) GetBlobs() []*Blob { + if x != nil { + return x.Blobs + } + return nil +} + +func (x *Bucket) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Bucket) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Bucket) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Bucket) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +type Blob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The URN of the blob. + // Example: `location/bucket-name/file-name`. + Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` + // The name of the blob. + // Example: `file-name`. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The source of the blob. + // Example: `gcs`. + Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` + // The length of the object content. + // Example: `300` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + // Delete time of the blob object. + DeleteTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=delete_time,json=deleteTime,proto3" json:"delete_time,omitempty"` + // Expire time of the blob object. + ExpireTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` + // The ownership of the blob. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the blob's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a blob. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` +} + +func (x *Blob) Reset() { + *x = Blob{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_bucket_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Blob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Blob) ProtoMessage() {} + +func (x *Blob) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_bucket_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Blob.ProtoReflect.Descriptor instead. +func (*Blob) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_bucket_proto_rawDescGZIP(), []int{1} +} + +func (x *Blob) GetUrn() string { + if x != nil { + return x.Urn + } + return "" +} + +func (x *Blob) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Blob) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Blob) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *Blob) GetDeleteTime() *timestamppb.Timestamp { + if x != nil { + return x.DeleteTime + } + return nil +} + +func (x *Blob) GetExpireTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpireTime + } + return nil +} + +func (x *Blob) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Blob) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Blob) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +var File_odpf_assets_v1beta1_bucket_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_bucket_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, + 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xe9, 0x03, 0x0a, 0x06, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, + 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x12, + 0x43, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xa6, 0x03, 0x0a, + 0x04, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x43, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, + 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x73, 0x42, 0x52, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_odpf_assets_v1beta1_bucket_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_bucket_proto_rawDescData = file_odpf_assets_v1beta1_bucket_proto_rawDesc +) + +func file_odpf_assets_v1beta1_bucket_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_bucket_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_bucket_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_bucket_proto_rawDescData +} + +var file_odpf_assets_v1beta1_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_v1beta1_bucket_proto_goTypes = []interface{}{ + (*Bucket)(nil), // 0: odpf.assets.v1beta1.Bucket + (*Blob)(nil), // 1: odpf.assets.v1beta1.Blob + (*v1beta1.Resource)(nil), // 2: odpf.assets.common.v1beta1.Resource + (*v1beta11.Ownership)(nil), // 3: odpf.assets.facets.v1beta1.Ownership + (*v1beta11.Properties)(nil), // 4: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 5: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 6: odpf.assets.common.v1beta1.Event + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp +} +var file_odpf_assets_v1beta1_bucket_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.v1beta1.Bucket.resource:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.v1beta1.Bucket.blobs:type_name -> odpf.assets.v1beta1.Blob + 3, // 2: odpf.assets.v1beta1.Bucket.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 4, // 3: odpf.assets.v1beta1.Bucket.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 4: odpf.assets.v1beta1.Bucket.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 6, // 5: odpf.assets.v1beta1.Bucket.event:type_name -> odpf.assets.common.v1beta1.Event + 7, // 6: odpf.assets.v1beta1.Blob.delete_time:type_name -> google.protobuf.Timestamp + 7, // 7: odpf.assets.v1beta1.Blob.expire_time:type_name -> google.protobuf.Timestamp + 3, // 8: odpf.assets.v1beta1.Blob.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 4, // 9: odpf.assets.v1beta1.Blob.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 10: odpf.assets.v1beta1.Blob.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_bucket_proto_init() } +func file_odpf_assets_v1beta1_bucket_proto_init() { + if File_odpf_assets_v1beta1_bucket_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_bucket_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Blob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_bucket_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_bucket_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_bucket_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_bucket_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_bucket_proto = out.File + file_odpf_assets_v1beta1_bucket_proto_rawDesc = nil + file_odpf_assets_v1beta1_bucket_proto_goTypes = nil + file_odpf_assets_v1beta1_bucket_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta1/dashboard.pb.go b/models/odpf/assets/v1beta1/dashboard.pb.go new file mode 100644 index 000000000..65f79c89b --- /dev/null +++ b/models/odpf/assets/v1beta1/dashboard.pb.go @@ -0,0 +1,514 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/dashboard.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Dashboard is a resource that represents a dashboard. +type Dashboard struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The list of the charts in the dashboard. + // For an example, check the schema of the chart. + Charts []*Chart `protobuf:"bytes,21,rep,name=charts,proto3" json:"charts,omitempty"` + // The ownership of the dashboard. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,32,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a user. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,33,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The lineage of the dashboard. + // For an example check out lineage schema. + Lineage *v1beta11.Lineage `protobuf:"bytes,34,opt,name=lineage,proto3" json:"lineage,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Dashboard) Reset() { + *x = Dashboard{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_dashboard_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dashboard) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dashboard) ProtoMessage() {} + +func (x *Dashboard) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_dashboard_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dashboard.ProtoReflect.Descriptor instead. +func (*Dashboard) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_dashboard_proto_rawDescGZIP(), []int{0} +} + +func (x *Dashboard) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Dashboard) GetCharts() []*Chart { + if x != nil { + return x.Charts + } + return nil +} + +func (x *Dashboard) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Dashboard) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Dashboard) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Dashboard) GetLineage() *v1beta11.Lineage { + if x != nil { + return x.Lineage + } + return nil +} + +func (x *Dashboard) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +type Chart struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The URN of the chart. + // Example: `chart:1`. + Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` + // The name of the chart. + // Example: `My Chart`. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The type of the chart. + // Example: `line`. + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + // The source of the chart. + // Example: `metabase`. + Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` + // The description of the chart. + // Example: `This is a chart for my dashboard.` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // The url of the chart. + // Example: `http://metabase.com/charts/mychart`. + Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` + // The raw query of the chart. + // Example: `SELECT * FROM my_table`. + RawQuery string `protobuf:"bytes,7,opt,name=raw_query,json=rawQuery,proto3" json:"raw_query,omitempty"` + // The source of the data. + // Example: `bigquery,graphite`. + DataSource string `protobuf:"bytes,8,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` + // The dashboard ur of the chart. + // Example: `dashboard:1`. + DashboardUrn string `protobuf:"bytes,9,opt,name=dashboard_urn,json=dashboardUrn,proto3" json:"dashboard_urn,omitempty"` + // The source of the dashboard of the chart. + // Example: `metabase`. + DashboardSource string `protobuf:"bytes,10,opt,name=dashboard_source,json=dashboardSource,proto3" json:"dashboard_source,omitempty"` + // The ownership of the dashboard. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // The lineage of the chart. + // For an example check out lineage schema. + Lineage *v1beta11.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a dashboard. + Properties *v1beta11.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a dashboard. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Chart) Reset() { + *x = Chart{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_dashboard_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Chart) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Chart) ProtoMessage() {} + +func (x *Chart) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_dashboard_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Chart.ProtoReflect.Descriptor instead. +func (*Chart) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_dashboard_proto_rawDescGZIP(), []int{1} +} + +func (x *Chart) GetUrn() string { + if x != nil { + return x.Urn + } + return "" +} + +func (x *Chart) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Chart) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Chart) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Chart) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Chart) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Chart) GetRawQuery() string { + if x != nil { + return x.RawQuery + } + return "" +} + +func (x *Chart) GetDataSource() string { + if x != nil { + return x.DataSource + } + return "" +} + +func (x *Chart) GetDashboardUrn() string { + if x != nil { + return x.DashboardUrn + } + return "" +} + +func (x *Chart) GetDashboardSource() string { + if x != nil { + return x.DashboardSource + } + return "" +} + +func (x *Chart) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Chart) GetLineage() *v1beta11.Lineage { + if x != nil { + return x.Lineage + } + return nil +} + +func (x *Chart) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Chart) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Chart) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +var File_odpf_assets_v1beta1_dashboard_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_dashboard_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, + 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x03, 0x0a, + 0x09, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x06, + 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, + 0x12, 0x43, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, + 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, + 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xe7, 0x04, 0x0a, + 0x05, 0x43, 0x68, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, + 0x72, 0x61, 0x77, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x61, 0x77, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, + 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x55, 0x72, 0x6e, 0x12, + 0x29, 0x0a, 0x10, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x61, 0x73, 0x68, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, + 0x3d, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, + 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, 0x46, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x55, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0e, 0x44, 0x61, 0x73, 0x68, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta1_dashboard_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_dashboard_proto_rawDescData = file_odpf_assets_v1beta1_dashboard_proto_rawDesc +) + +func file_odpf_assets_v1beta1_dashboard_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_dashboard_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_dashboard_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_dashboard_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_dashboard_proto_rawDescData +} + +var file_odpf_assets_v1beta1_dashboard_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_v1beta1_dashboard_proto_goTypes = []interface{}{ + (*Dashboard)(nil), // 0: odpf.assets.v1beta1.Dashboard + (*Chart)(nil), // 1: odpf.assets.v1beta1.Chart + (*v1beta1.Resource)(nil), // 2: odpf.assets.common.v1beta1.Resource + (*v1beta11.Ownership)(nil), // 3: odpf.assets.facets.v1beta1.Ownership + (*v1beta11.Properties)(nil), // 4: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 5: odpf.assets.common.v1beta1.Timestamp + (*v1beta11.Lineage)(nil), // 6: odpf.assets.facets.v1beta1.Lineage + (*v1beta1.Event)(nil), // 7: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_dashboard_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.v1beta1.Dashboard.resource:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.v1beta1.Dashboard.charts:type_name -> odpf.assets.v1beta1.Chart + 3, // 2: odpf.assets.v1beta1.Dashboard.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 4, // 3: odpf.assets.v1beta1.Dashboard.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 4: odpf.assets.v1beta1.Dashboard.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 6, // 5: odpf.assets.v1beta1.Dashboard.lineage:type_name -> odpf.assets.facets.v1beta1.Lineage + 7, // 6: odpf.assets.v1beta1.Dashboard.event:type_name -> odpf.assets.common.v1beta1.Event + 3, // 7: odpf.assets.v1beta1.Chart.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 6, // 8: odpf.assets.v1beta1.Chart.lineage:type_name -> odpf.assets.facets.v1beta1.Lineage + 4, // 9: odpf.assets.v1beta1.Chart.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 10: odpf.assets.v1beta1.Chart.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 7, // 11: odpf.assets.v1beta1.Chart.event:type_name -> odpf.assets.common.v1beta1.Event + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_dashboard_proto_init() } +func file_odpf_assets_v1beta1_dashboard_proto_init() { + if File_odpf_assets_v1beta1_dashboard_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_dashboard_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dashboard); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_dashboard_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Chart); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_dashboard_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_dashboard_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_dashboard_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_dashboard_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_dashboard_proto = out.File + file_odpf_assets_v1beta1_dashboard_proto_rawDesc = nil + file_odpf_assets_v1beta1_dashboard_proto_goTypes = nil + file_odpf_assets_v1beta1_dashboard_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta1/group.pb.go b/models/odpf/assets/v1beta1/group.pb.go new file mode 100644 index 000000000..e7dffb9e1 --- /dev/null +++ b/models/odpf/assets/v1beta1/group.pb.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/group.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Group represents a group of users and resources. +type Group struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The email of the group. + // Example: `xyz@xyz.com` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + // The members of the group. + // For example look at schema of the member. + Members []*Member `protobuf:"bytes,21,rep,name=members,proto3" json:"members,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,31,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a user. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,32,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Group) Reset() { + *x = Group{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_group_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Group) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Group) ProtoMessage() {} + +func (x *Group) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_group_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Group.ProtoReflect.Descriptor instead. +func (*Group) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_group_proto_rawDescGZIP(), []int{0} +} + +func (x *Group) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Group) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *Group) GetMembers() []*Member { + if x != nil { + return x.Members + } + return nil +} + +func (x *Group) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Group) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Group) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +// Member represents a user. +type Member struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier for the user. + // Example: `user:example`. + Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` + // The role of the user. + // Example: `owner`. + Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` +} + +func (x *Member) Reset() { + *x = Member{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_group_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Member) ProtoMessage() {} + +func (x *Member) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_group_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Member.ProtoReflect.Descriptor instead. +func (*Member) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_group_proto_rawDescGZIP(), []int{1} +} + +func (x *Member) GetUrn() string { + if x != nil { + return x.Urn + } + return "" +} + +func (x *Member) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +var File_odpf_assets_v1beta1_group_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_group_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x40, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, + 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, + 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x42, 0x51, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, + 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta1_group_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_group_proto_rawDescData = file_odpf_assets_v1beta1_group_proto_rawDesc +) + +func file_odpf_assets_v1beta1_group_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_group_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_group_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_group_proto_rawDescData +} + +var file_odpf_assets_v1beta1_group_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_v1beta1_group_proto_goTypes = []interface{}{ + (*Group)(nil), // 0: odpf.assets.v1beta1.Group + (*Member)(nil), // 1: odpf.assets.v1beta1.Member + (*v1beta1.Resource)(nil), // 2: odpf.assets.common.v1beta1.Resource + (*v1beta11.Properties)(nil), // 3: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 4: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 5: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_group_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.v1beta1.Group.resource:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.v1beta1.Group.members:type_name -> odpf.assets.v1beta1.Member + 3, // 2: odpf.assets.v1beta1.Group.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 4, // 3: odpf.assets.v1beta1.Group.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 5, // 4: odpf.assets.v1beta1.Group.event:type_name -> odpf.assets.common.v1beta1.Event + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_group_proto_init() } +func file_odpf_assets_v1beta1_group_proto_init() { + if File_odpf_assets_v1beta1_group_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Member); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_group_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_group_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_group_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_group_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_group_proto = out.File + file_odpf_assets_v1beta1_group_proto_rawDesc = nil + file_odpf_assets_v1beta1_group_proto_goTypes = nil + file_odpf_assets_v1beta1_group_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta1/job.pb.go b/models/odpf/assets/v1beta1/job.pb.go new file mode 100644 index 000000000..423d55466 --- /dev/null +++ b/models/odpf/assets/v1beta1/job.pb.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/job.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Job is a resource that represents a job. +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The ownership of the job. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // The lineage of the job. + // For an example check out lineage schema. + Lineage *v1beta11.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a user. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_job_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_job_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Job) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Job) GetLineage() *v1beta11.Lineage { + if x != nil { + return x.Lineage + } + return nil +} + +func (x *Job) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Job) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Job) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +var File_odpf_assets_v1beta1_job_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_job_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, + 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x6e, + 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, + 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x03, 0x0a, 0x03, 0x4a, 0x6f, 0x62, 0x12, 0x40, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x43, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, + 0x65, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x4f, 0x0a, 0x0e, + 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x08, + 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, + 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta1_job_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_job_proto_rawDescData = file_odpf_assets_v1beta1_job_proto_rawDesc +) + +func file_odpf_assets_v1beta1_job_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_job_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_job_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_job_proto_rawDescData +} + +var file_odpf_assets_v1beta1_job_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_odpf_assets_v1beta1_job_proto_goTypes = []interface{}{ + (*Job)(nil), // 0: odpf.assets.v1beta1.Job + (*v1beta1.Resource)(nil), // 1: odpf.assets.common.v1beta1.Resource + (*v1beta11.Ownership)(nil), // 2: odpf.assets.facets.v1beta1.Ownership + (*v1beta11.Lineage)(nil), // 3: odpf.assets.facets.v1beta1.Lineage + (*v1beta11.Properties)(nil), // 4: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 5: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 6: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_job_proto_depIdxs = []int32{ + 1, // 0: odpf.assets.v1beta1.Job.resource:type_name -> odpf.assets.common.v1beta1.Resource + 2, // 1: odpf.assets.v1beta1.Job.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 3, // 2: odpf.assets.v1beta1.Job.lineage:type_name -> odpf.assets.facets.v1beta1.Lineage + 4, // 3: odpf.assets.v1beta1.Job.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 4: odpf.assets.v1beta1.Job.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 6, // 5: odpf.assets.v1beta1.Job.event:type_name -> odpf.assets.common.v1beta1.Event + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_job_proto_init() } +func file_odpf_assets_v1beta1_job_proto_init() { + if File_odpf_assets_v1beta1_job_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_job_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_job_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_job_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_job_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_job_proto = out.File + file_odpf_assets_v1beta1_job_proto_rawDesc = nil + file_odpf_assets_v1beta1_job_proto_goTypes = nil + file_odpf_assets_v1beta1_job_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta1/table.pb.go b/models/odpf/assets/v1beta1/table.pb.go new file mode 100644 index 000000000..2912f4687 --- /dev/null +++ b/models/odpf/assets/v1beta1/table.pb.go @@ -0,0 +1,514 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/table.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Table is a table in a database. +// It can be a file, a table, a view, a materialized view, a temporary table, or a virtual table. +type Table struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The metrics about the table. + // For example check the profile schem. + Profile *TableProfile `protobuf:"bytes,21,opt,name=profile,proto3" json:"profile,omitempty"` + // The columns of the table. + // Example: 'id', `name`, `age'. + Schema *v1beta11.Columns `protobuf:"bytes,22,opt,name=schema,proto3" json:"schema,omitempty"` + // Previews of the table. + // For an example check out preview facet. + Preview *v1beta11.Preview `protobuf:"bytes,23,opt,name=preview,proto3" json:"preview,omitempty"` + // The ownership of the table. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,31,opt,name=ownership,proto3" json:"ownership,omitempty"` + // The lineage of the table. + // For an example check out lineage. + Lineage *v1beta11.Lineage `protobuf:"bytes,32,opt,name=lineage,proto3" json:"lineage,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,33,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a user. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,34,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Table) Reset() { + *x = Table{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Table) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Table) ProtoMessage() {} + +func (x *Table) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Table.ProtoReflect.Descriptor instead. +func (*Table) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_table_proto_rawDescGZIP(), []int{0} +} + +func (x *Table) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Table) GetProfile() *TableProfile { + if x != nil { + return x.Profile + } + return nil +} + +func (x *Table) GetSchema() *v1beta11.Columns { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Table) GetPreview() *v1beta11.Preview { + if x != nil { + return x.Preview + } + return nil +} + +func (x *Table) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Table) GetLineage() *v1beta11.Lineage { + if x != nil { + return x.Lineage + } + return nil +} + +func (x *Table) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Table) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Table) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +// TableProfile is the metrics about the table. +type TableProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of rows in the table. + // Example: `100`. + TotalRows int64 `protobuf:"varint,1,opt,name=total_rows,json=totalRows,proto3" json:"total_rows,omitempty"` + // The number of rows in the table that are not deleted. + // Example: `event_timestamp`. + PartitionKey string `protobuf:"bytes,2,opt,name=partition_key,json=partitionKey,proto3" json:"partition_key,omitempty"` + PartitionValue string `protobuf:"bytes,3,opt,name=partition_value,json=partitionValue,proto3" json:"partition_value,omitempty"` + // The number of how many times table is being used + UsageCount int64 `protobuf:"varint,4,opt,name=usage_count,json=usageCount,proto3" json:"usage_count,omitempty"` + // The information of `join` applied to the table + Joins []*Join `protobuf:"bytes,5,rep,name=joins,proto3" json:"joins,omitempty"` + // The information of `filter` applied to the table + Filters []string `protobuf:"bytes,6,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *TableProfile) Reset() { + *x = TableProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableProfile) ProtoMessage() {} + +func (x *TableProfile) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableProfile.ProtoReflect.Descriptor instead. +func (*TableProfile) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_table_proto_rawDescGZIP(), []int{1} +} + +func (x *TableProfile) GetTotalRows() int64 { + if x != nil { + return x.TotalRows + } + return 0 +} + +func (x *TableProfile) GetPartitionKey() string { + if x != nil { + return x.PartitionKey + } + return "" +} + +func (x *TableProfile) GetPartitionValue() string { + if x != nil { + return x.PartitionValue + } + return "" +} + +func (x *TableProfile) GetUsageCount() int64 { + if x != nil { + return x.UsageCount + } + return 0 +} + +func (x *TableProfile) GetJoins() []*Join { + if x != nil { + return x.Joins + } + return nil +} + +func (x *TableProfile) GetFilters() []string { + if x != nil { + return x.Filters + } + return nil +} + +// Join is the metric of which are other tables that are joined with this table +type Join struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Urn string `protobuf:"bytes,1,opt,name=urn,proto3" json:"urn,omitempty"` + // The number of how many times table is being joined with a certain table urn + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + // The information of `join conditions` applied to the table + Conditions []string `protobuf:"bytes,3,rep,name=conditions,proto3" json:"conditions,omitempty"` +} + +func (x *Join) Reset() { + *x = Join{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Join) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Join) ProtoMessage() {} + +func (x *Join) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_table_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Join.ProtoReflect.Descriptor instead. +func (*Join) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_table_proto_rawDescGZIP(), []int{2} +} + +func (x *Join) GetUrn() string { + if x != nil { + return x.Urn + } + return "" +} + +func (x *Join) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *Join) GetConditions() []string { + if x != nil { + return x.Conditions + } + return nil +} + +var File_odpf_assets_v1beta1_table_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_table_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x27, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x64, + 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x04, 0x0a, 0x05, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x16, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, + 0x12, 0x43, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, + 0x65, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xe7, 0x01, 0x0a, + 0x0c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x05, 0x6a, + 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x6a, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x04, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6e, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x51, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_odpf_assets_v1beta1_table_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_table_proto_rawDescData = file_odpf_assets_v1beta1_table_proto_rawDesc +) + +func file_odpf_assets_v1beta1_table_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_table_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_table_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_table_proto_rawDescData +} + +var file_odpf_assets_v1beta1_table_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_odpf_assets_v1beta1_table_proto_goTypes = []interface{}{ + (*Table)(nil), // 0: odpf.assets.v1beta1.Table + (*TableProfile)(nil), // 1: odpf.assets.v1beta1.TableProfile + (*Join)(nil), // 2: odpf.assets.v1beta1.Join + (*v1beta1.Resource)(nil), // 3: odpf.assets.common.v1beta1.Resource + (*v1beta11.Columns)(nil), // 4: odpf.assets.facets.v1beta1.Columns + (*v1beta11.Preview)(nil), // 5: odpf.assets.facets.v1beta1.Preview + (*v1beta11.Ownership)(nil), // 6: odpf.assets.facets.v1beta1.Ownership + (*v1beta11.Lineage)(nil), // 7: odpf.assets.facets.v1beta1.Lineage + (*v1beta11.Properties)(nil), // 8: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 9: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 10: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_table_proto_depIdxs = []int32{ + 3, // 0: odpf.assets.v1beta1.Table.resource:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.v1beta1.Table.profile:type_name -> odpf.assets.v1beta1.TableProfile + 4, // 2: odpf.assets.v1beta1.Table.schema:type_name -> odpf.assets.facets.v1beta1.Columns + 5, // 3: odpf.assets.v1beta1.Table.preview:type_name -> odpf.assets.facets.v1beta1.Preview + 6, // 4: odpf.assets.v1beta1.Table.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 7, // 5: odpf.assets.v1beta1.Table.lineage:type_name -> odpf.assets.facets.v1beta1.Lineage + 8, // 6: odpf.assets.v1beta1.Table.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 9, // 7: odpf.assets.v1beta1.Table.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 10, // 8: odpf.assets.v1beta1.Table.event:type_name -> odpf.assets.common.v1beta1.Event + 2, // 9: odpf.assets.v1beta1.TableProfile.joins:type_name -> odpf.assets.v1beta1.Join + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_table_proto_init() } +func file_odpf_assets_v1beta1_table_proto_init() { + if File_odpf_assets_v1beta1_table_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_table_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Table); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_table_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_table_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Join); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_table_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_table_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_table_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_table_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_table_proto = out.File + file_odpf_assets_v1beta1_table_proto_rawDesc = nil + file_odpf_assets_v1beta1_table_proto_goTypes = nil + file_odpf_assets_v1beta1_table_proto_depIdxs = nil +} diff --git a/models/odpf/assets/v1beta1/topic.pb.go b/models/odpf/assets/v1beta1/topic.pb.go new file mode 100644 index 000000000..a6a3dc5e5 --- /dev/null +++ b/models/odpf/assets/v1beta1/topic.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: odpf/assets/v1beta1/topic.proto + +package assetsv1beta1 + +import ( + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Topic is resource that represents a logical group of messages +// in message bus like kafka, pubsub, pulsar etc. +type Topic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Representation of the resource + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + // The metrics of the topic. + // For an example check out topic profile schema. + Profile *TopicProfile `protobuf:"bytes,21,opt,name=profile,proto3" json:"profile,omitempty"` + // The schama of the topic. + // For an example check out topic schema. + Schema *v1beta11.TopicSchema `protobuf:"bytes,31,opt,name=schema,proto3" json:"schema,omitempty"` + // The ownership of the topic. + // For an example check out ownership. + Ownership *v1beta11.Ownership `protobuf:"bytes,32,opt,name=ownership,proto3" json:"ownership,omitempty"` + // The lineage of the topic. + // For an example check out lineage schema. + Lineage *v1beta11.Lineage `protobuf:"bytes,33,opt,name=lineage,proto3" json:"lineage,omitempty"` + // List of the user's custom properties. + // Properties facet can be used to set custom properties, tags and labels for a user. + Properties *v1beta11.Properties `protobuf:"bytes,34,opt,name=properties,proto3" json:"properties,omitempty"` + // The timestamp of the user's creation. + // Timstamp facet can be used to set the creation and updation timestamp of a user. + Timestamps *v1beta1.Timestamp `protobuf:"bytes,35,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + // The timestamp of the generated event. + // Event schemas is defined in the common event schema. + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` +} + +func (x *Topic) Reset() { + *x = Topic{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_topic_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Topic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Topic) ProtoMessage() {} + +func (x *Topic) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_topic_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Topic.ProtoReflect.Descriptor instead. +func (*Topic) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_topic_proto_rawDescGZIP(), []int{0} +} + +func (x *Topic) GetResource() *v1beta1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *Topic) GetProfile() *TopicProfile { + if x != nil { + return x.Profile + } + return nil +} + +func (x *Topic) GetSchema() *v1beta11.TopicSchema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Topic) GetOwnership() *v1beta11.Ownership { + if x != nil { + return x.Ownership + } + return nil +} + +func (x *Topic) GetLineage() *v1beta11.Lineage { + if x != nil { + return x.Lineage + } + return nil +} + +func (x *Topic) GetProperties() *v1beta11.Properties { + if x != nil { + return x.Properties + } + return nil +} + +func (x *Topic) GetTimestamps() *v1beta1.Timestamp { + if x != nil { + return x.Timestamps + } + return nil +} + +func (x *Topic) GetEvent() *v1beta1.Event { + if x != nil { + return x.Event + } + return nil +} + +// TopicProfile is the profile of the topic. +type TopicProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The thrroughput of the topic. + // Example: `1m/minute`. + Throughput string `protobuf:"bytes,1,opt,name=throughput,proto3" json:"throughput,omitempty"` + // The number of partitions in the topic. + // Example: `12`. + NumberOfPartitions int64 `protobuf:"varint,2,opt,name=number_of_partitions,json=numberOfPartitions,proto3" json:"number_of_partitions,omitempty"` +} + +func (x *TopicProfile) Reset() { + *x = TopicProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_odpf_assets_v1beta1_topic_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopicProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopicProfile) ProtoMessage() {} + +func (x *TopicProfile) ProtoReflect() protoreflect.Message { + mi := &file_odpf_assets_v1beta1_topic_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopicProfile.ProtoReflect.Descriptor instead. +func (*TopicProfile) Descriptor() ([]byte, []int) { + return file_odpf_assets_v1beta1_topic_proto_rawDescGZIP(), []int{1} +} + +func (x *TopicProfile) GetThroughput() string { + if x != nil { + return x.Throughput + } + return "" +} + +func (x *TopicProfile) GetNumberOfPartitions() int64 { + if x != nil { + return x.NumberOfPartitions + } + return 0 +} + +var File_odpf_assets_v1beta1_topic_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_topic_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x27, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x6f, 0x64, 0x70, + 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6f, + 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x93, 0x04, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x40, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x0a, + 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x64, 0x70, + 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x43, 0x0a, 0x09, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x12, 0x3d, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, + 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, + 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x67, 0x65, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x22, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, + 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x37, + 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x6f, 0x70, 0x69, 0x63, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x68, 0x72, + 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x51, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, + 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x0a, 0x54, 0x6f, 0x70, + 0x69, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_odpf_assets_v1beta1_topic_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_topic_proto_rawDescData = file_odpf_assets_v1beta1_topic_proto_rawDesc +) + +func file_odpf_assets_v1beta1_topic_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_topic_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_topic_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_topic_proto_rawDescData) + }) + return file_odpf_assets_v1beta1_topic_proto_rawDescData +} + +var file_odpf_assets_v1beta1_topic_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_odpf_assets_v1beta1_topic_proto_goTypes = []interface{}{ + (*Topic)(nil), // 0: odpf.assets.v1beta1.Topic + (*TopicProfile)(nil), // 1: odpf.assets.v1beta1.TopicProfile + (*v1beta1.Resource)(nil), // 2: odpf.assets.common.v1beta1.Resource + (*v1beta11.TopicSchema)(nil), // 3: odpf.assets.facets.v1beta1.TopicSchema + (*v1beta11.Ownership)(nil), // 4: odpf.assets.facets.v1beta1.Ownership + (*v1beta11.Lineage)(nil), // 5: odpf.assets.facets.v1beta1.Lineage + (*v1beta11.Properties)(nil), // 6: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 7: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 8: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_topic_proto_depIdxs = []int32{ + 2, // 0: odpf.assets.v1beta1.Topic.resource:type_name -> odpf.assets.common.v1beta1.Resource + 1, // 1: odpf.assets.v1beta1.Topic.profile:type_name -> odpf.assets.v1beta1.TopicProfile + 3, // 2: odpf.assets.v1beta1.Topic.schema:type_name -> odpf.assets.facets.v1beta1.TopicSchema + 4, // 3: odpf.assets.v1beta1.Topic.ownership:type_name -> odpf.assets.facets.v1beta1.Ownership + 5, // 4: odpf.assets.v1beta1.Topic.lineage:type_name -> odpf.assets.facets.v1beta1.Lineage + 6, // 5: odpf.assets.v1beta1.Topic.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 7, // 6: odpf.assets.v1beta1.Topic.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 8, // 7: odpf.assets.v1beta1.Topic.event:type_name -> odpf.assets.common.v1beta1.Event + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_odpf_assets_v1beta1_topic_proto_init() } +func file_odpf_assets_v1beta1_topic_proto_init() { + if File_odpf_assets_v1beta1_topic_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_odpf_assets_v1beta1_topic_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Topic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_odpf_assets_v1beta1_topic_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopicProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_odpf_assets_v1beta1_topic_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_odpf_assets_v1beta1_topic_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_topic_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_topic_proto_msgTypes, + }.Build() + File_odpf_assets_v1beta1_topic_proto = out.File + file_odpf_assets_v1beta1_topic_proto_rawDesc = nil + file_odpf_assets_v1beta1_topic_proto_goTypes = nil + file_odpf_assets_v1beta1_topic_proto_depIdxs = nil +} diff --git a/models/odpf/assets/user.pb.go b/models/odpf/assets/v1beta1/user.pb.go similarity index 55% rename from models/odpf/assets/user.pb.go rename to models/odpf/assets/v1beta1/user.pb.go index b64bf60d1..be630adee 100644 --- a/models/odpf/assets/user.pb.go +++ b/models/odpf/assets/v1beta1/user.pb.go @@ -1,14 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 -// source: odpf/assets/user.proto +// protoc v3.19.1 +// source: odpf/assets/v1beta1/user.proto -package assets +package assetsv1beta1 import ( - common "github.com/odpf/meteor/models/odpf/assets/common" - facets "github.com/odpf/meteor/models/odpf/assets/facets" + v1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + v1beta11 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -31,7 +31,7 @@ type User struct { unknownFields protoimpl.UnknownFields // Representation of the resource - Resource *common.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Resource *v1beta1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // The emai address of the user. // Example: `job.deo@gmail.com` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` @@ -67,19 +67,19 @@ type User struct { Memberships []*Membership `protobuf:"bytes,22,rep,name=memberships,proto3" json:"memberships,omitempty"` // Representation of custom properties of user. // Properties facet can be used to set custom properties, tags and labels for a user. - Properties *facets.Properties `protobuf:"bytes,31,opt,name=properties,proto3" json:"properties,omitempty"` + Properties *v1beta11.Properties `protobuf:"bytes,31,opt,name=properties,proto3" json:"properties,omitempty"` // The timestamp of the user's creation. // Timstamp facet can be used to set the creation and updation timestamp of a user. - Timestamps *common.Timestamp `protobuf:"bytes,32,opt,name=timestamps,proto3" json:"timestamps,omitempty"` + Timestamps *v1beta1.Timestamp `protobuf:"bytes,32,opt,name=timestamps,proto3" json:"timestamps,omitempty"` // The timestamp of the generated event. // Event schemas is defined in the common event schema. - Event *common.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` + Event *v1beta1.Event `protobuf:"bytes,100,opt,name=event,proto3" json:"event,omitempty"` } func (x *User) Reset() { *x = User{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_user_proto_msgTypes[0] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -92,7 +92,7 @@ func (x *User) String() string { func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_user_proto_msgTypes[0] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -105,10 +105,10 @@ func (x *User) ProtoReflect() protoreflect.Message { // Deprecated: Use User.ProtoReflect.Descriptor instead. func (*User) Descriptor() ([]byte, []int) { - return file_odpf_assets_user_proto_rawDescGZIP(), []int{0} + return file_odpf_assets_v1beta1_user_proto_rawDescGZIP(), []int{0} } -func (x *User) GetResource() *common.Resource { +func (x *User) GetResource() *v1beta1.Resource { if x != nil { return x.Resource } @@ -192,21 +192,21 @@ func (x *User) GetMemberships() []*Membership { return nil } -func (x *User) GetProperties() *facets.Properties { +func (x *User) GetProperties() *v1beta11.Properties { if x != nil { return x.Properties } return nil } -func (x *User) GetTimestamps() *common.Timestamp { +func (x *User) GetTimestamps() *v1beta1.Timestamp { if x != nil { return x.Timestamps } return nil } -func (x *User) GetEvent() *common.Event { +func (x *User) GetEvent() *v1beta1.Event { if x != nil { return x.Event } @@ -230,7 +230,7 @@ type Membership struct { func (x *Membership) Reset() { *x = Membership{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_user_proto_msgTypes[1] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -243,7 +243,7 @@ func (x *Membership) String() string { func (*Membership) ProtoMessage() {} func (x *Membership) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_user_proto_msgTypes[1] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -256,7 +256,7 @@ func (x *Membership) ProtoReflect() protoreflect.Message { // Deprecated: Use Membership.ProtoReflect.Descriptor instead. func (*Membership) Descriptor() ([]byte, []int) { - return file_odpf_assets_user_proto_rawDescGZIP(), []int{1} + return file_odpf_assets_v1beta1_user_proto_rawDescGZIP(), []int{1} } func (x *Membership) GetGroupUrn() string { @@ -293,7 +293,7 @@ type Profile struct { func (x *Profile) Reset() { *x = Profile{} if protoimpl.UnsafeEnabled { - mi := &file_odpf_assets_user_proto_msgTypes[2] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -306,7 +306,7 @@ func (x *Profile) String() string { func (*Profile) ProtoMessage() {} func (x *Profile) ProtoReflect() protoreflect.Message { - mi := &file_odpf_assets_user_proto_msgTypes[2] + mi := &file_odpf_assets_v1beta1_user_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -319,7 +319,7 @@ func (x *Profile) ProtoReflect() protoreflect.Message { // Deprecated: Use Profile.ProtoReflect.Descriptor instead. func (*Profile) Descriptor() ([]byte, []int) { - return file_odpf_assets_user_proto_rawDescGZIP(), []int{2} + return file_odpf_assets_v1beta1_user_proto_rawDescGZIP(), []int{2} } func (x *Profile) GetId() string { @@ -343,58 +343,64 @@ func (x *Profile) GetUrl() string { return "" } -var File_odpf_assets_user_proto protoreflect.FileDescriptor - -var file_odpf_assets_user_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x1a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x64, 0x70, 0x66, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, 0x64, - 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, +var File_odpf_assets_v1beta1_user_proto protoreflect.FileDescriptor + +var file_odpf_assets_v1beta1_user_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x13, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x2a, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x26, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x64, 0x70, 0x66, 0x2f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xde, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, + 0x6f, 0x22, 0x8e, 0x05, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, - 0x70, 0x73, 0x12, 0x3e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, - 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, 0x65, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, + 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x38, 0x0a, + 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0b, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x66, 0x61, 0x63, + 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, - 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, + 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x37, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x3d, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x75, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x72, 0x6e, 0x12, 0x12, 0x0a, @@ -403,42 +409,44 @@ var file_odpf_assets_user_proto_rawDesc = []byte{ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x42, 0x3a, 0x0a, 0x0e, 0x69, 0x6f, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x42, 0x09, 0x55, 0x73, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_odpf_assets_user_proto_rawDescOnce sync.Once - file_odpf_assets_user_proto_rawDescData = file_odpf_assets_user_proto_rawDesc + file_odpf_assets_v1beta1_user_proto_rawDescOnce sync.Once + file_odpf_assets_v1beta1_user_proto_rawDescData = file_odpf_assets_v1beta1_user_proto_rawDesc ) -func file_odpf_assets_user_proto_rawDescGZIP() []byte { - file_odpf_assets_user_proto_rawDescOnce.Do(func() { - file_odpf_assets_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_user_proto_rawDescData) +func file_odpf_assets_v1beta1_user_proto_rawDescGZIP() []byte { + file_odpf_assets_v1beta1_user_proto_rawDescOnce.Do(func() { + file_odpf_assets_v1beta1_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_odpf_assets_v1beta1_user_proto_rawDescData) }) - return file_odpf_assets_user_proto_rawDescData -} - -var file_odpf_assets_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_odpf_assets_user_proto_goTypes = []interface{}{ - (*User)(nil), // 0: odpf.assets.User - (*Membership)(nil), // 1: odpf.assets.Membership - (*Profile)(nil), // 2: odpf.assets.Profile - (*common.Resource)(nil), // 3: odpf.assets.common.Resource - (*facets.Properties)(nil), // 4: odpf.assets.facets.Properties - (*common.Timestamp)(nil), // 5: odpf.assets.common.Timestamp - (*common.Event)(nil), // 6: odpf.assets.common.Event -} -var file_odpf_assets_user_proto_depIdxs = []int32{ - 3, // 0: odpf.assets.User.resource:type_name -> odpf.assets.common.Resource - 2, // 1: odpf.assets.User.profiles:type_name -> odpf.assets.Profile - 1, // 2: odpf.assets.User.memberships:type_name -> odpf.assets.Membership - 4, // 3: odpf.assets.User.properties:type_name -> odpf.assets.facets.Properties - 5, // 4: odpf.assets.User.timestamps:type_name -> odpf.assets.common.Timestamp - 6, // 5: odpf.assets.User.event:type_name -> odpf.assets.common.Event + return file_odpf_assets_v1beta1_user_proto_rawDescData +} + +var file_odpf_assets_v1beta1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_odpf_assets_v1beta1_user_proto_goTypes = []interface{}{ + (*User)(nil), // 0: odpf.assets.v1beta1.User + (*Membership)(nil), // 1: odpf.assets.v1beta1.Membership + (*Profile)(nil), // 2: odpf.assets.v1beta1.Profile + (*v1beta1.Resource)(nil), // 3: odpf.assets.common.v1beta1.Resource + (*v1beta11.Properties)(nil), // 4: odpf.assets.facets.v1beta1.Properties + (*v1beta1.Timestamp)(nil), // 5: odpf.assets.common.v1beta1.Timestamp + (*v1beta1.Event)(nil), // 6: odpf.assets.common.v1beta1.Event +} +var file_odpf_assets_v1beta1_user_proto_depIdxs = []int32{ + 3, // 0: odpf.assets.v1beta1.User.resource:type_name -> odpf.assets.common.v1beta1.Resource + 2, // 1: odpf.assets.v1beta1.User.profiles:type_name -> odpf.assets.v1beta1.Profile + 1, // 2: odpf.assets.v1beta1.User.memberships:type_name -> odpf.assets.v1beta1.Membership + 4, // 3: odpf.assets.v1beta1.User.properties:type_name -> odpf.assets.facets.v1beta1.Properties + 5, // 4: odpf.assets.v1beta1.User.timestamps:type_name -> odpf.assets.common.v1beta1.Timestamp + 6, // 5: odpf.assets.v1beta1.User.event:type_name -> odpf.assets.common.v1beta1.Event 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -446,13 +454,13 @@ var file_odpf_assets_user_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_odpf_assets_user_proto_init() } -func file_odpf_assets_user_proto_init() { - if File_odpf_assets_user_proto != nil { +func init() { file_odpf_assets_v1beta1_user_proto_init() } +func file_odpf_assets_v1beta1_user_proto_init() { + if File_odpf_assets_v1beta1_user_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_odpf_assets_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_v1beta1_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*User); i { case 0: return &v.state @@ -464,7 +472,7 @@ func file_odpf_assets_user_proto_init() { return nil } } - file_odpf_assets_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_v1beta1_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Membership); i { case 0: return &v.state @@ -476,7 +484,7 @@ func file_odpf_assets_user_proto_init() { return nil } } - file_odpf_assets_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_odpf_assets_v1beta1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Profile); i { case 0: return &v.state @@ -493,18 +501,18 @@ func file_odpf_assets_user_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_odpf_assets_user_proto_rawDesc, + RawDescriptor: file_odpf_assets_v1beta1_user_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_odpf_assets_user_proto_goTypes, - DependencyIndexes: file_odpf_assets_user_proto_depIdxs, - MessageInfos: file_odpf_assets_user_proto_msgTypes, + GoTypes: file_odpf_assets_v1beta1_user_proto_goTypes, + DependencyIndexes: file_odpf_assets_v1beta1_user_proto_depIdxs, + MessageInfos: file_odpf_assets_v1beta1_user_proto_msgTypes, }.Build() - File_odpf_assets_user_proto = out.File - file_odpf_assets_user_proto_rawDesc = nil - file_odpf_assets_user_proto_goTypes = nil - file_odpf_assets_user_proto_depIdxs = nil + File_odpf_assets_v1beta1_user_proto = out.File + file_odpf_assets_v1beta1_user_proto_rawDesc = nil + file_odpf_assets_v1beta1_user_proto_goTypes = nil + file_odpf_assets_v1beta1_user_proto_depIdxs = nil } diff --git a/plugins/external/plugin.go b/plugins/external/plugin.go index 3f0f28848..3f652cf15 100644 --- a/plugins/external/plugin.go +++ b/plugins/external/plugin.go @@ -1,9 +1,10 @@ package plugins import ( - "github.com/pkg/errors" "os/exec" + "github.com/pkg/errors" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" ) diff --git a/plugins/extractors/bigquery/bigquery.go b/plugins/extractors/bigquery/bigquery.go index 928e7d611..969c2e2ea 100644 --- a/plugins/extractors/bigquery/bigquery.go +++ b/plugins/extractors/bigquery/bigquery.go @@ -10,9 +10,9 @@ import ( "cloud.google.com/go/bigquery" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/bigquery/auditlog" "github.com/odpf/meteor/registry" @@ -180,7 +180,7 @@ func (e *Extractor) extractTable(ctx context.Context, ds *bigquery.Dataset, emit } // Build the bigquery table metadata -func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigquery.TableMetadata) *assets.Table { +func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigquery.TableMetadata) *assetsv1beta1.Table { tableFQN := t.FullyQualifiedName() tableURN := models.TableURN("bigquery", t.ProjectID, t.DatasetID, t.TableID) @@ -191,7 +191,7 @@ func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigqu partitionField = md.TimePartitioning.Field } - var preview *facets.Preview + var preview *facetsv1beta1.Preview if md.Type == bigquery.RegularTable { var err error preview, err = e.buildPreview(ctx, t) @@ -200,18 +200,18 @@ func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigqu } } - return &assets.Table{ - Resource: &common.Resource{ + return &assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: tableURN, Name: t.TableID, Description: md.Description, Service: "bigquery", }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: e.buildColumns(ctx, md), }, Preview: preview, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "full_qualified_name": tableFQN, "dataset": t.DatasetID, @@ -222,7 +222,7 @@ func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigqu Labels: md.Labels, }, Profile: tableProfile, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(md.CreationTime), UpdateTime: timestamppb.New(md.LastModifiedTime), }, @@ -230,12 +230,12 @@ func (e *Extractor) buildTable(ctx context.Context, t *bigquery.Table, md *bigqu } // Extract table schema -func (e *Extractor) buildColumns(ctx context.Context, tm *bigquery.TableMetadata) []*facets.Column { +func (e *Extractor) buildColumns(ctx context.Context, tm *bigquery.TableMetadata) []*facetsv1beta1.Column { schema := tm.Schema var wg sync.WaitGroup wg.Add(len(schema)) - columns := make([]*facets.Column, len(schema)) + columns := make([]*facetsv1beta1.Column, len(schema)) for i, b := range schema { index := i go func(s *bigquery.FieldSchema) { @@ -249,13 +249,13 @@ func (e *Extractor) buildColumns(ctx context.Context, tm *bigquery.TableMetadata return columns } -func (e *Extractor) buildColumn(ctx context.Context, field *bigquery.FieldSchema, tm *bigquery.TableMetadata) (col *facets.Column) { - col = &facets.Column{ +func (e *Extractor) buildColumn(ctx context.Context, field *bigquery.FieldSchema, tm *bigquery.TableMetadata) (col *facetsv1beta1.Column) { + col = &facetsv1beta1.Column{ Name: field.Name, Description: field.Description, DataType: string(field.Type), IsNullable: !(field.Required || field.Repeated), - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "mode": e.getColumnMode(field), }), @@ -273,8 +273,8 @@ func (e *Extractor) buildColumn(ctx context.Context, field *bigquery.FieldSchema return } -func (e *Extractor) buildPreview(ctx context.Context, t *bigquery.Table) (preview *facets.Preview, err error) { - preview = &facets.Preview{ +func (e *Extractor) buildPreview(ctx context.Context, t *bigquery.Table) (preview *facetsv1beta1.Preview, err error) { + preview = &facetsv1beta1.Preview{ Fields: []string{}, } if e.config.MaxPreviewRows == 0 { @@ -328,7 +328,7 @@ func (e *Extractor) buildPreview(ctx context.Context, t *bigquery.Table) (previe return } -func (e *Extractor) getColumnProfile(ctx context.Context, col *bigquery.FieldSchema, tm *bigquery.TableMetadata) (cp *facets.ColumnProfile, err error) { +func (e *Extractor) getColumnProfile(ctx context.Context, col *bigquery.FieldSchema, tm *bigquery.TableMetadata) (cp *facetsv1beta1.ColumnProfile, err error) { if col.Type == bigquery.BytesFieldType || col.Repeated || col.Type == bigquery.RecordFieldType { e.logger.Info("Skip profiling " + col.Name + " column") return @@ -362,7 +362,7 @@ func (e *Extractor) getColumnProfile(ctx context.Context, col *bigquery.FieldSch } // map row data to column profile - cp = &facets.ColumnProfile{ + cp = &facetsv1beta1.ColumnProfile{ Min: row.Min, Max: row.Max, Avg: row.Avg, diff --git a/plugins/extractors/bigquery/bigquery_test.go b/plugins/extractors/bigquery/bigquery_test.go index 7b79f2a0c..8b1d00ed8 100644 --- a/plugins/extractors/bigquery/bigquery_test.go +++ b/plugins/extractors/bigquery/bigquery_test.go @@ -5,9 +5,10 @@ package bigquery_test import ( "context" - "github.com/odpf/meteor/test/utils" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/bigquery" "github.com/stretchr/testify/assert" diff --git a/plugins/extractors/bigquery/profile.go b/plugins/extractors/bigquery/profile.go index 91c8755cd..2875e9ef0 100644 --- a/plugins/extractors/bigquery/profile.go +++ b/plugins/extractors/bigquery/profile.go @@ -1,10 +1,10 @@ package bigquery -import "github.com/odpf/meteor/models/odpf/assets" +import assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" -func (e *Extractor) buildTableProfile(tableURN string) (tp *assets.TableProfile) { +func (e *Extractor) buildTableProfile(tableURN string) (tp *assetsv1beta1.TableProfile) { var tableUsage int64 - var commonJoins []*assets.Join + var commonJoins []*assetsv1beta1.Join var filterConditions []string if e.config.IsCollectTableUsage && e.tableStats != nil { @@ -18,7 +18,7 @@ func (e *Extractor) buildTableProfile(tableURN string) (tp *assets.TableProfile) for jc := range jd.Conditions { joinConditions = append(joinConditions, jc) } - commonJoins = append(commonJoins, &assets.Join{ + commonJoins = append(commonJoins, &assetsv1beta1.Join{ Urn: joinedTableURN, Count: jd.Usage, Conditions: joinConditions, @@ -34,7 +34,7 @@ func (e *Extractor) buildTableProfile(tableURN string) (tp *assets.TableProfile) } } - tp = &assets.TableProfile{ + tp = &assetsv1beta1.TableProfile{ UsageCount: tableUsage, Joins: commonJoins, Filters: filterConditions, diff --git a/plugins/extractors/bigquery/profile_test.go b/plugins/extractors/bigquery/profile_test.go index 002871981..6b54445d2 100644 --- a/plugins/extractors/bigquery/profile_test.go +++ b/plugins/extractors/bigquery/profile_test.go @@ -5,7 +5,7 @@ import ( "github.com/alecthomas/assert" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins/extractors/bigquery/auditlog" ) @@ -68,15 +68,15 @@ func TestBuildTableProfile(t *testing.T) { tp := extr.buildTableProfile(tableURN) assert.EqualValues(t, 5, tp.UsageCount) - assert.Contains(t, tp.Joins, &assets.Join{ + assert.Contains(t, tp.Joins, &assetsv1beta1.Join{ Urn: models.TableURN("bigquery", "project2", "dataset1", "table1"), Count: 1, }) - assert.Contains(t, tp.Joins, &assets.Join{ + assert.Contains(t, tp.Joins, &assetsv1beta1.Join{ Urn: models.TableURN("bigquery", "project3", "dataset1", "table1"), Count: 3, }) - assert.Contains(t, tp.Joins, &assets.Join{ + assert.Contains(t, tp.Joins, &assetsv1beta1.Join{ Urn: models.TableURN("bigquery", "project4", "dataset1", "table1"), Count: 1, }) diff --git a/plugins/extractors/bigtable/bigtable.go b/plugins/extractors/bigtable/bigtable.go index f6e77a1b7..1758d0162 100644 --- a/plugins/extractors/bigtable/bigtable.go +++ b/plugins/extractors/bigtable/bigtable.go @@ -8,9 +8,9 @@ import ( "sync" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/registry" "cloud.google.com/go/bigtable" @@ -126,13 +126,13 @@ func (e *Extractor) getTablesInfo(ctx context.Context, emit plugins.Emit) (err e return } familyInfoBytes, _ := json.Marshal(tableInfo.FamilyInfos) - emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s.%s", e.config.ProjectID, instance, table), Name: table, Service: "bigtable", }, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "column_family": string(familyInfoBytes), }), diff --git a/plugins/extractors/bigtable/bigtable_test.go b/plugins/extractors/bigtable/bigtable_test.go index 27cc35e2b..3a4baba9e 100644 --- a/plugins/extractors/bigtable/bigtable_test.go +++ b/plugins/extractors/bigtable/bigtable_test.go @@ -1,14 +1,16 @@ -//+build integration +//go:build integration +// +build integration package bigtable_test import ( "context" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + "cloud.google.com/go/bigtable" "github.com/odpf/meteor/plugins" bt "github.com/odpf/meteor/plugins/extractors/bigtable" diff --git a/plugins/extractors/cassandra/cassandra.go b/plugins/extractors/cassandra/cassandra.go index 818fd0b1a..ffcee87af 100644 --- a/plugins/extractors/cassandra/cassandra.go +++ b/plugins/extractors/cassandra/cassandra.go @@ -4,14 +4,15 @@ import ( "context" _ "embed" // used to print the embedded assets "fmt" + "github.com/pkg/errors" "github.com/gocql/gocql" "github.com/odpf/meteor/models" _ "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -154,19 +155,19 @@ func (e *Extractor) extractTables(keyspace string) (err error) { // processTable build and push table to out channel func (e *Extractor) processTable(keyspace string, tableName string) (err error) { - var columns []*facets.Column + var columns []*facetsv1beta1.Column columns, err = e.extractColumns(keyspace, tableName) if err != nil { return errors.Wrap(err, "failed to extract columns") } // push table to channel - e.emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + e.emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", keyspace, tableName), Name: tableName, }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, })) @@ -175,7 +176,7 @@ func (e *Extractor) processTable(keyspace string, tableName string) (err error) } // extractColumns extract columns from a given table -func (e *Extractor) extractColumns(keyspace string, tableName string) (columns []*facets.Column, err error) { +func (e *Extractor) extractColumns(keyspace string, tableName string) (columns []*facetsv1beta1.Column, err error) { query := `SELECT column_name, type FROM system_schema.columns WHERE keyspace_name = ? @@ -192,7 +193,7 @@ func (e *Extractor) extractColumns(keyspace string, tableName string) (columns [ continue } - columns = append(columns, &facets.Column{ + columns = append(columns, &facetsv1beta1.Column{ Name: fieldName, DataType: dataType, }) diff --git a/plugins/extractors/cassandra/cassandra_test.go b/plugins/extractors/cassandra/cassandra_test.go index ea4a0b0b3..daeddd6a1 100644 --- a/plugins/extractors/cassandra/cassandra_test.go +++ b/plugins/extractors/cassandra/cassandra_test.go @@ -1,20 +1,22 @@ -//+build integration +//go:build integration +// +build integration package cassandra_test import ( "context" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/gocql/gocql" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/cassandra" "github.com/odpf/meteor/test/mocks" @@ -122,7 +124,7 @@ func TestExtract(t *testing.T) { "user_id": user, "password": pass, "host": host, - "port": port, + "port": port, }) if err != nil { t.Fatal(err) @@ -181,46 +183,46 @@ func newExtractor() *cassandra.Extractor { // getExpected returns the expected result func getExpected() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ - Urn: keyspace +".applicant", + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ + Urn: keyspace + ".applicant", Name: "applicant", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { - Name: "applicantid", - DataType: "int", + Name: "applicantid", + DataType: "int", }, { - Name: "first_name", - DataType: "text", + Name: "first_name", + DataType: "text", }, { - Name: "last_name", - DataType: "text", + Name: "last_name", + DataType: "text", }, }, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ - Urn: keyspace +".jobs", + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ + Urn: keyspace + ".jobs", Name: "jobs", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { - Name: "department", - DataType: "text", + Name: "department", + DataType: "text", }, { - Name: "job", - DataType: "text", + Name: "job", + DataType: "text", }, { - Name: "jobid", - DataType: "int", + Name: "jobid", + DataType: "int", }, }, }, diff --git a/plugins/extractors/clickhouse/clickhouse.go b/plugins/extractors/clickhouse/clickhouse.go index bfa2d57b2..4fc220fda 100644 --- a/plugins/extractors/clickhouse/clickhouse.go +++ b/plugins/extractors/clickhouse/clickhouse.go @@ -5,13 +5,14 @@ import ( "database/sql" _ "embed" // used to print the embedded assets "fmt" + "github.com/pkg/errors" _ "github.com/ClickHouse/clickhouse-go" // clickhouse driver "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -70,8 +71,7 @@ func (e *Extractor) Init(ctx context.Context, configMap map[string]interface{}) } if e.db, err = sql.Open("clickhouse", - fmt.Sprintf("tcp://%s?username=%s&password=%s&debug=true", e.config.Host, e.config.UserID, e.config.Password)); - err != nil { + fmt.Sprintf("tcp://%s?username=%s&password=%s&debug=true", e.config.Host, e.config.UserID, e.config.Password)); err != nil { return errors.Wrap(err, "failed to create a client") } @@ -103,17 +103,17 @@ func (e *Extractor) extractTables(emit plugins.Emit) (err error) { return } - var columns []*facets.Column + var columns []*facetsv1beta1.Column columns, err = e.getColumnsInfo(dbName, tableName) if err != nil { return } - emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", dbName, tableName), Name: tableName, - }, Schema: &facets.Columns{ + }, Schema: &facetsv1beta1.Columns{ Columns: columns, }, })) @@ -121,13 +121,13 @@ func (e *Extractor) extractTables(emit plugins.Emit) (err error) { return } -func (e *Extractor) getColumnsInfo(dbName string, tableName string) (result []*facets.Column, err error) { +func (e *Extractor) getColumnsInfo(dbName string, tableName string) (result []*facetsv1beta1.Column, err error) { sqlStr := fmt.Sprintf("DESCRIBE TABLE %s.%s", dbName, tableName) rows, err := e.db.Query(sqlStr) if err != nil { err = errors.Wrapf(err, "failed to execute query %s", sqlStr) - return + return } for rows.Next() { var colName, colDesc, dataType string @@ -136,7 +136,7 @@ func (e *Extractor) getColumnsInfo(dbName string, tableName string) (result []*f if err != nil { return } - result = append(result, &facets.Column{ + result = append(result, &facetsv1beta1.Column{ Name: colName, DataType: dataType, Description: colDesc, diff --git a/plugins/extractors/clickhouse/clickhouse_test.go b/plugins/extractors/clickhouse/clickhouse_test.go index 42b697d49..cf75c10b5 100644 --- a/plugins/extractors/clickhouse/clickhouse_test.go +++ b/plugins/extractors/clickhouse/clickhouse_test.go @@ -1,22 +1,24 @@ -//+build integration +//go:build integration +// +build integration package clickhouse_test import ( "context" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + "database/sql" _ "github.com/ClickHouse/clickhouse-go" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/clickhouse" "github.com/odpf/meteor/test/mocks" @@ -120,13 +122,13 @@ func TestExtract(t *testing.T) { func getExpected() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.applicant", Name: "applicant", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "applicant_id", DataType: "Int32", @@ -145,13 +147,13 @@ func getExpected() []models.Record { }, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.jobs", Name: "jobs", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "job_id", DataType: "Int32", diff --git a/plugins/extractors/couchdb/couchdb.go b/plugins/extractors/couchdb/couchdb.go index 32f1a9167..f3885514a 100644 --- a/plugins/extractors/couchdb/couchdb.go +++ b/plugins/extractors/couchdb/couchdb.go @@ -9,9 +9,9 @@ import ( _ "github.com/go-kivik/couchdb" "github.com/go-kivik/kivik" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -136,19 +136,19 @@ func (e *Extractor) extractTables(ctx context.Context, dbName string) (err error // Build and push document to output channel func (e *Extractor) processTable(ctx context.Context, dbName string, docID string) (err error) { - var columns []*facets.Column + var columns []*facetsv1beta1.Column columns, err = e.extractColumns(ctx, docID) if err != nil { return } // push table to channel - e.emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + e.emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", dbName, docID), Name: docID, }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, })) @@ -157,7 +157,7 @@ func (e *Extractor) processTable(ctx context.Context, dbName string, docID strin } // Extract columns from a given table -func (e *Extractor) extractColumns(ctx context.Context, docID string) (columns []*facets.Column, err error) { +func (e *Extractor) extractColumns(ctx context.Context, docID string) (columns []*facetsv1beta1.Column, err error) { size, rev, err := e.db.GetMeta(ctx, docID) if err != nil { return @@ -174,7 +174,7 @@ func (e *Extractor) extractColumns(ctx context.Context, docID string) (columns [ continue } - columns = append(columns, &facets.Column{ + columns = append(columns, &facetsv1beta1.Column{ Name: k, DataType: reflect.ValueOf(fields[k]).Kind().String(), Description: rev, diff --git a/plugins/extractors/couchdb/couchdb_test.go b/plugins/extractors/couchdb/couchdb_test.go index dbc442f9e..53adf9ee2 100644 --- a/plugins/extractors/couchdb/couchdb_test.go +++ b/plugins/extractors/couchdb/couchdb_test.go @@ -1,16 +1,18 @@ -//+build integration +//go:build integration +// +build integration package couchdb_test import ( "context" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "strconv" "testing" + "github.com/odpf/meteor/test/utils" + _ "github.com/go-kivik/couchdb" "github.com/go-kivik/kivik" "github.com/odpf/meteor/plugins" diff --git a/plugins/extractors/csv/csv.go b/plugins/extractors/csv/csv.go index 6ce888814..a49ef959e 100644 --- a/plugins/extractors/csv/csv.go +++ b/plugins/extractors/csv/csv.go @@ -11,9 +11,9 @@ import ( "path/filepath" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" "github.com/pkg/errors" @@ -95,7 +95,7 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) return } -func (e *Extractor) buildTable(filePath string) (table *assets.Table, err error) { +func (e *Extractor) buildTable(filePath string) (table *assetsv1beta1.Table, err error) { file, err := os.Open(filePath) if err != nil { err = errors.New("unable to open the csv file") @@ -114,13 +114,13 @@ func (e *Extractor) buildTable(filePath string) (table *assets.Table, err error) } fileName := stat.Name() - table = &assets.Table{ - Resource: &common.Resource{ + table = &assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fileName, Name: fileName, Service: "csv", }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: e.buildColumns(content), }, } @@ -133,9 +133,9 @@ func (e *Extractor) readCSVFile(r io.Reader) (columns []string, err error) { return reader.Read() } -func (e *Extractor) buildColumns(csvColumns []string) (result []*facets.Column) { +func (e *Extractor) buildColumns(csvColumns []string) (result []*facetsv1beta1.Column) { for _, singleColumn := range csvColumns { - result = append(result, &facets.Column{ + result = append(result, &facetsv1beta1.Column{ Name: singleColumn, }) } diff --git a/plugins/extractors/csv/csv_test.go b/plugins/extractors/csv/csv_test.go index 007b6e844..10fef5cf1 100644 --- a/plugins/extractors/csv/csv_test.go +++ b/plugins/extractors/csv/csv_test.go @@ -1,16 +1,18 @@ -//+build integration +//go:build integration +// +build integration package csv_test import ( "context" - "github.com/odpf/meteor/test/utils" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/csv" "github.com/odpf/meteor/test/mocks" @@ -43,14 +45,14 @@ func TestExtract(t *testing.T) { assert.NoError(t, err) expected := []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "test.csv", Name: "test.csv", Service: "csv", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ {Name: "name"}, {Name: "age"}, {Name: "phone"}, @@ -77,28 +79,28 @@ func TestExtract(t *testing.T) { assert.NoError(t, err) expected := []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "test-2.csv", Name: "test-2.csv", Service: "csv", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ {Name: "order"}, {Name: "transaction_id"}, {Name: "total_price"}, }, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "test.csv", Name: "test.csv", Service: "csv", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ {Name: "name"}, {Name: "age"}, {Name: "phone"}, diff --git a/plugins/extractors/elastic/elastic.go b/plugins/extractors/elastic/elastic.go index 9a3779557..771806c2e 100644 --- a/plugins/extractors/elastic/elastic.go +++ b/plugins/extractors/elastic/elastic.go @@ -5,14 +5,15 @@ import ( _ "embed" "encoding/json" "fmt" - "github.com/pkg/errors" "reflect" + "github.com/pkg/errors" + "github.com/elastic/go-elasticsearch/v8" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -107,9 +108,9 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) err = err1 return } - var columns []*facets.Column + var columns []*facetsv1beta1.Column for i := range docProperties { - columns = append(columns, &facets.Column{ + columns = append(columns, &facetsv1beta1.Column{ Name: i, DataType: docProperties[i].(map[string]interface{})["type"].(string), }) @@ -129,15 +130,15 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) } docCount := len(t["hits"].(map[string]interface{})["hits"].([]interface{})) - emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", "elasticsearch", indexName), Name: indexName, }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: int64(docCount), }, })) diff --git a/plugins/extractors/elastic/elastic_test.go b/plugins/extractors/elastic/elastic_test.go index b893b2117..8bd9b8446 100644 --- a/plugins/extractors/elastic/elastic_test.go +++ b/plugins/extractors/elastic/elastic_test.go @@ -1,4 +1,5 @@ -//+build integration +//go:build integration +// +build integration package elastic_test @@ -6,19 +7,20 @@ import ( "context" "encoding/json" "fmt" - "github.com/odpf/meteor/test/utils" "log" "net/http" "os" "strings" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/elastic/go-elasticsearch/esapi" "github.com/elastic/go-elasticsearch/v8" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/elastic" "github.com/odpf/meteor/test/mocks" @@ -189,13 +191,13 @@ func newExtractor() *elastic.Extractor { func getExpectedVal() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "elasticsearch.index1", Name: "index1", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "SomeInt", DataType: "long", @@ -206,17 +208,17 @@ func getExpectedVal() []models.Record { }, }, }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: 1, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "elastic.index2", Name: "index2", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "SomeInt", DataType: "long", @@ -227,7 +229,7 @@ func getExpectedVal() []models.Record { }, }, }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: 1, }, }), diff --git a/plugins/extractors/gcs/gcs.go b/plugins/extractors/gcs/gcs.go index 70d7edb27..6dc7cf491 100644 --- a/plugins/extractors/gcs/gcs.go +++ b/plugins/extractors/gcs/gcs.go @@ -4,12 +4,13 @@ import ( "context" _ "embed" // used to print the embedded assets "fmt" + "github.com/pkg/errors" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/registry" "google.golang.org/protobuf/types/known/timestamppb" @@ -107,7 +108,7 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) return errors.Wrapf(err, "failed to iterate over %s", bucket.Name) } - var blobs []*assets.Blob + var blobs []*assetsv1beta1.Blob if e.config.ExtractBlob { blobs, err = e.extractBlobs(ctx, bucket.Name, e.config.ProjectID) if err != nil { @@ -121,7 +122,7 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) return } -func (e *Extractor) extractBlobs(ctx context.Context, bucketName string, projectID string) (blobs []*assets.Blob, err error) { +func (e *Extractor) extractBlobs(ctx context.Context, bucketName string, projectID string) (blobs []*assetsv1beta1.Blob, err error) { it := e.client.Bucket(bucketName).Objects(ctx, nil) object, err := it.Next() @@ -136,19 +137,19 @@ func (e *Extractor) extractBlobs(ctx context.Context, bucketName string, project return } -func (e *Extractor) buildBucket(b *storage.BucketAttrs, projectID string, blobs []*assets.Blob) (bucket *assets.Bucket) { - bucket = &assets.Bucket{ - Resource: &common.Resource{ +func (e *Extractor) buildBucket(b *storage.BucketAttrs, projectID string, blobs []*assetsv1beta1.Blob) (bucket *assetsv1beta1.Bucket) { + bucket = &assetsv1beta1.Bucket{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s/%s", projectID, b.Name), Name: b.Name, Service: metadataSource, }, Location: b.Location, StorageType: b.StorageClass, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(b.Created), }, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Labels: b.Labels, }, } @@ -159,19 +160,19 @@ func (e *Extractor) buildBucket(b *storage.BucketAttrs, projectID string, blobs return } -func (e *Extractor) buildBlob(blob *storage.ObjectAttrs, projectID string) *assets.Blob { - return &assets.Blob{ +func (e *Extractor) buildBlob(blob *storage.ObjectAttrs, projectID string) *assetsv1beta1.Blob { + return &assetsv1beta1.Blob{ Urn: fmt.Sprintf("%s/%s/%s", projectID, blob.Bucket, blob.Name), Name: blob.Name, Size: blob.Size, DeleteTime: timestamppb.New(blob.Deleted), ExpireTime: timestamppb.New(blob.RetentionExpirationTime), - Ownership: &facets.Ownership{ - Owners: []*facets.Owner{ + Ownership: &facetsv1beta1.Ownership{ + Owners: []*facetsv1beta1.Owner{ {Name: blob.Owner}, }, }, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(blob.Created), UpdateTime: timestamppb.New(blob.Updated), }, diff --git a/plugins/extractors/gcs/gcs_test.go b/plugins/extractors/gcs/gcs_test.go index fcfbeb7ba..6803697c1 100644 --- a/plugins/extractors/gcs/gcs_test.go +++ b/plugins/extractors/gcs/gcs_test.go @@ -1,12 +1,14 @@ -//+build integration +//go:build integration +// +build integration package gcs_test import ( "context" - "github.com/odpf/meteor/test/utils" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/gcs" "github.com/stretchr/testify/assert" diff --git a/plugins/extractors/github/github.go b/plugins/extractors/github/github.go index 280aba390..1ae216560 100644 --- a/plugins/extractors/github/github.go +++ b/plugins/extractors/github/github.go @@ -3,12 +3,13 @@ package github import ( "context" _ "embed" // used to print the embedded assets + "github.com/pkg/errors" "github.com/google/go-github/v37/github" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -78,11 +79,11 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) for _, user := range users { usr, _, err := e.client.Users.Get(ctx, *user.Login) if err != nil { - e.logger.Error("failed to fetch user" , "error", err) + e.logger.Error("failed to fetch user", "error", err) continue } - emit(models.NewRecord(&assets.User{ - Resource: &common.Resource{ + emit(models.NewRecord(&assetsv1beta1.User{ + Resource: &commonv1beta1.Resource{ Urn: usr.GetURL(), }, Email: usr.GetEmail(), diff --git a/plugins/extractors/grafana/grafana.go b/plugins/extractors/grafana/grafana.go index 60fce89db..84204390b 100644 --- a/plugins/extractors/grafana/grafana.go +++ b/plugins/extractors/grafana/grafana.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -94,14 +94,14 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) } // grafanaDashboardToMeteorDashboard converts a grafana dashboard to a meteor dashboard -func (e *Extractor) grafanaDashboardToMeteorDashboard(dashboard DashboardDetail) *assets.Dashboard { - charts := make([]*assets.Chart, len(dashboard.Dashboard.Panels)) +func (e *Extractor) grafanaDashboardToMeteorDashboard(dashboard DashboardDetail) *assetsv1beta1.Dashboard { + charts := make([]*assetsv1beta1.Chart, len(dashboard.Dashboard.Panels)) for i, panel := range dashboard.Dashboard.Panels { c := e.grafanaPanelToMeteorChart(panel, dashboard.Dashboard.UID, dashboard.Meta.URL) charts[i] = &c } - return &assets.Dashboard{ - Resource: &common.Resource{ + return &assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("grafana.%s", dashboard.Dashboard.UID), Name: dashboard.Meta.Slug, Service: "grafana", @@ -113,12 +113,12 @@ func (e *Extractor) grafanaDashboardToMeteorDashboard(dashboard DashboardDetail) } // grafanaPanelToMeteorChart converts a grafana panel to a meteor chart -func (e *Extractor) grafanaPanelToMeteorChart(panel Panel, dashboardUID string, metaURL string) assets.Chart { +func (e *Extractor) grafanaPanelToMeteorChart(panel Panel, dashboardUID string, metaURL string) assetsv1beta1.Chart { var rawQuery string if len(panel.Targets) > 0 { rawQuery = panel.Targets[0].RawSQL } - return assets.Chart{ + return assetsv1beta1.Chart{ Urn: fmt.Sprintf("%s.%d", dashboardUID, panel.ID), Name: panel.Title, Type: panel.Type, diff --git a/plugins/extractors/grafana/grafana_test.go b/plugins/extractors/grafana/grafana_test.go index 6ea66da56..404e62c9f 100644 --- a/plugins/extractors/grafana/grafana_test.go +++ b/plugins/extractors/grafana/grafana_test.go @@ -14,8 +14,8 @@ import ( "github.com/odpf/meteor/test/utils" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/grafana" "github.com/odpf/meteor/test/mocks" @@ -58,15 +58,15 @@ func TestExtract(t *testing.T) { t.Run("should extract grafana metadata into meta dashboard", func(t *testing.T) { expectedData := []models.Record{ - models.NewRecord(&assets.Dashboard{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: "grafana.HzK8qNW7z", Name: "new-dashboard-copy", Service: "grafana", Url: fmt.Sprintf("%s/d/HzK8qNW7z/new-dashboard-copy", testServer.URL), Description: "", }, - Charts: []*assets.Chart{ + Charts: []*assetsv1beta1.Chart{ { Urn: "HzK8qNW7z.2", Name: "Panel Title", @@ -81,15 +81,15 @@ func TestExtract(t *testing.T) { }, }, }), - models.NewRecord(&assets.Dashboard{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: "grafana.5WsKOvW7z", Name: "test-dashboard-updated", Service: "grafana", Url: fmt.Sprintf("%s/d/5WsKOvW7z/test-dashboard-updated", testServer.URL), Description: "this is description for testing", }, - Charts: []*assets.Chart{ + Charts: []*assetsv1beta1.Chart{ { Urn: "5WsKOvW7z.4", Name: "Panel Random", diff --git a/plugins/extractors/kafka/kafka.go b/plugins/extractors/kafka/kafka.go index ba30bc0b4..1933e40a8 100644 --- a/plugins/extractors/kafka/kafka.go +++ b/plugins/extractors/kafka/kafka.go @@ -8,8 +8,8 @@ import ( "github.com/pkg/errors" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" kafka "github.com/segmentio/kafka-go" @@ -121,14 +121,14 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) } // Build topic metadata model using a topic and number of partitions -func (e *Extractor) buildTopic(topic string, numOfPartitions int) *assets.Topic { - return &assets.Topic{ - Resource: &common.Resource{ +func (e *Extractor) buildTopic(topic string, numOfPartitions int) *assetsv1beta1.Topic { + return &assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("kafka::%s/%s", e.config.Label, topic), Name: topic, Service: "kafka", }, - Profile: &assets.TopicProfile{ + Profile: &assetsv1beta1.TopicProfile{ NumberOfPartitions: int64(numOfPartitions), }, } diff --git a/plugins/extractors/kafka/kafka_test.go b/plugins/extractors/kafka/kafka_test.go index cbf30f37a..274f7e0c3 100644 --- a/plugins/extractors/kafka/kafka_test.go +++ b/plugins/extractors/kafka/kafka_test.go @@ -15,8 +15,8 @@ import ( "testing" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/kafka" "github.com/odpf/meteor/test/mocks" @@ -112,33 +112,33 @@ func TestExtract(t *testing.T) { // assert results with expected data expected := []models.Record{ - models.NewRecord(&assets.Topic{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "kafka::my-kafka-cluster/meteor-test-topic-1", Name: "meteor-test-topic-1", Service: "kafka", }, - Profile: &assets.TopicProfile{ + Profile: &assetsv1beta1.TopicProfile{ NumberOfPartitions: 1, }, }), - models.NewRecord(&assets.Topic{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "kafka::my-kafka-cluster/meteor-test-topic-2", Name: "meteor-test-topic-2", Service: "kafka", }, - Profile: &assets.TopicProfile{ + Profile: &assetsv1beta1.TopicProfile{ NumberOfPartitions: 1, }, }), - models.NewRecord(&assets.Topic{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "kafka::my-kafka-cluster/meteor-test-topic-3", Name: "meteor-test-topic-3", Service: "kafka", }, - Profile: &assets.TopicProfile{ + Profile: &assetsv1beta1.TopicProfile{ NumberOfPartitions: 1, }, }), @@ -180,14 +180,14 @@ func newExtractor() *kafka.Extractor { func assertResults(t *testing.T, expected []models.Record, result []models.Record) { assert.Len(t, result, len(expected)) - expectedMap := make(map[string]*assets.Topic) + expectedMap := make(map[string]*assetsv1beta1.Topic) for _, record := range expected { - topic := record.Data().(*assets.Topic) + topic := record.Data().(*assetsv1beta1.Topic) expectedMap[topic.Resource.Urn] = topic } for _, record := range result { - topic := record.Data().(*assets.Topic) + topic := record.Data().(*assetsv1beta1.Topic) assert.Contains(t, expectedMap, topic.Resource.Urn) assert.Equal(t, expectedMap[topic.Resource.Urn], topic) diff --git a/plugins/extractors/metabase/metabase.go b/plugins/extractors/metabase/metabase.go index 9da684184..85b375441 100644 --- a/plugins/extractors/metabase/metabase.go +++ b/plugins/extractors/metabase/metabase.go @@ -11,9 +11,9 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -100,7 +100,7 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) return nil } -func (e *Extractor) buildDashboard(d Dashboard) (data *assets.Dashboard, err error) { +func (e *Extractor) buildDashboard(d Dashboard) (data *assetsv1beta1.Dashboard, err error) { // we fetch dashboard again individually to get more fields dashboard, err := e.client.GetDashboard(d.ID) if err != nil { @@ -112,33 +112,33 @@ func (e *Extractor) buildDashboard(d Dashboard) (data *assets.Dashboard, err err charts := e.buildCharts(dashboardUrn, dashboard) dashboardUpstreams := e.buildDashboardUpstreams(charts) - data = &assets.Dashboard{ - Resource: &common.Resource{ + data = &assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: dashboardUrn, Name: dashboard.Name, Service: "metabase", Description: dashboard.Description, }, Charts: charts, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "id": dashboard.ID, "collection_id": dashboard.CollectionID, "creator_id": dashboard.CreatorID, }), }, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(time.Time(dashboard.CreatedAt)), UpdateTime: timestamppb.New(time.Time(dashboard.UpdatedAt)), }, - Lineage: &facets.Lineage{ + Lineage: &facetsv1beta1.Lineage{ Upstreams: dashboardUpstreams, }, } return } -func (e *Extractor) buildCharts(dashboardUrn string, dashboard Dashboard) (charts []*assets.Chart) { +func (e *Extractor) buildCharts(dashboardUrn string, dashboard Dashboard) (charts []*assetsv1beta1.Chart) { for _, oc := range dashboard.OrderedCards { chart, err := e.buildChart(oc.Card, dashboardUrn) if err != nil { @@ -151,20 +151,20 @@ func (e *Extractor) buildCharts(dashboardUrn string, dashboard Dashboard) (chart return } -func (e *Extractor) buildChart(card Card, dashboardUrn string) (chart *assets.Chart, err error) { - var upstreams []*common.Resource +func (e *Extractor) buildChart(card Card, dashboardUrn string) (chart *assetsv1beta1.Chart, err error) { + var upstreams []*commonv1beta1.Resource upstreams, err = e.buildUpstreams(card) if err != nil { e.logger.Warn("error building upstreams for a card", "card_id", card.ID, "err", err) } - return &assets.Chart{ + return &assetsv1beta1.Chart{ Urn: fmt.Sprintf("metabase::%s/card/%d", e.config.Host, card.ID), DashboardUrn: dashboardUrn, Source: "metabase", Name: card.Name, Description: card.Description, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "id": card.ID, "collection_id": card.CollectionID, @@ -176,13 +176,13 @@ func (e *Extractor) buildChart(card Card, dashboardUrn string) (chart *assets.Ch "archived": card.Archived, }), }, - Lineage: &facets.Lineage{ + Lineage: &facetsv1beta1.Lineage{ Upstreams: upstreams, }, }, nil } -func (e *Extractor) buildUpstreams(card Card) (upstreams []*common.Resource, err error) { +func (e *Extractor) buildUpstreams(card Card) (upstreams []*commonv1beta1.Resource, err error) { switch card.DatasetQuery.Type { case datasetQueryTypeQuery: upstreams, err = e.buildUpstreamsFromQuery(card) @@ -201,7 +201,7 @@ func (e *Extractor) buildUpstreams(card Card) (upstreams []*common.Resource, err } } -func (e *Extractor) buildUpstreamsFromQuery(card Card) (upstreams []*common.Resource, err error) { +func (e *Extractor) buildUpstreamsFromQuery(card Card) (upstreams []*commonv1beta1.Resource, err error) { table, err := e.client.GetTable(card.DatasetQuery.Query.SourceTable) if err != nil { err = errors.Wrap(err, "error getting table") @@ -209,7 +209,7 @@ func (e *Extractor) buildUpstreamsFromQuery(card Card) (upstreams []*common.Reso } service, cluster, dbName := e.extractDbComponent(table.Db) - upstreams = append(upstreams, &common.Resource{ + upstreams = append(upstreams, &commonv1beta1.Resource{ Urn: e.buildURN(service, cluster, dbName, table.Name), Service: service, Type: "table", @@ -218,7 +218,7 @@ func (e *Extractor) buildUpstreamsFromQuery(card Card) (upstreams []*common.Reso return } -func (e *Extractor) buildUpstreamsFromNative(card Card) (upstreams []*common.Resource, err error) { +func (e *Extractor) buildUpstreamsFromNative(card Card) (upstreams []*commonv1beta1.Resource, err error) { database, err := e.client.GetDatabase(card.DatasetQuery.Database) if err != nil { err = errors.Wrap(err, "error getting database") @@ -233,7 +233,7 @@ func (e *Extractor) buildUpstreamsFromNative(card Card) (upstreams []*common.Res service, cluster, dbName := e.extractDbComponent(database) for _, tableName := range tableNames { - upstreams = append(upstreams, &common.Resource{ + upstreams = append(upstreams, &commonv1beta1.Resource{ Urn: e.buildURN(service, cluster, dbName, tableName), Service: service, Type: "table", @@ -243,7 +243,7 @@ func (e *Extractor) buildUpstreamsFromNative(card Card) (upstreams []*common.Res return } -func (e *Extractor) buildDashboardUpstreams(charts []*assets.Chart) (upstreams []*common.Resource) { +func (e *Extractor) buildDashboardUpstreams(charts []*assetsv1beta1.Chart) (upstreams []*commonv1beta1.Resource) { existing := map[string]bool{} for _, chart := range charts { if chart.Lineage == nil { diff --git a/plugins/extractors/mongodb/mongodb.go b/plugins/extractors/mongodb/mongodb.go index 5e30e535a..eedd9e37e 100644 --- a/plugins/extractors/mongodb/mongodb.go +++ b/plugins/extractors/mongodb/mongodb.go @@ -4,12 +4,13 @@ import ( "context" _ "embed" // used to print the embedded assets "fmt" - "github.com/pkg/errors" "sort" + "github.com/pkg/errors" + "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -136,7 +137,7 @@ func (e *Extractor) extractCollections(ctx context.Context, db *mongo.Database, } // Build table metadata model from a collection -func (e *Extractor) buildTable(ctx context.Context, db *mongo.Database, collectionName string) (table *assets.Table, err error) { +func (e *Extractor) buildTable(ctx context.Context, db *mongo.Database, collectionName string) (table *assetsv1beta1.Table, err error) { // get total rows totalRows, err := db.Collection(collectionName).EstimatedDocumentCount(ctx) if err != nil { @@ -144,12 +145,12 @@ func (e *Extractor) buildTable(ctx context.Context, db *mongo.Database, collecti return } - table = &assets.Table{ - Resource: &common.Resource{ + table = &assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", db.Name(), collectionName), Name: collectionName, }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: totalRows, }, } diff --git a/plugins/extractors/mongodb/mongodb_test.go b/plugins/extractors/mongodb/mongodb_test.go index 329ddd296..5f5e217b9 100644 --- a/plugins/extractors/mongodb/mongodb_test.go +++ b/plugins/extractors/mongodb/mongodb_test.go @@ -1,18 +1,20 @@ -//+build integration +//go:build integration +// +build integration package mongodb_test import ( "context" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/mongodb" "github.com/odpf/meteor/test/mocks" @@ -162,30 +164,30 @@ func createCollection(ctx context.Context, collectionName string, data []interfa func getExpected() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: testDB + ".connections", Name: "connections", }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: 3, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: testDB + ".posts", Name: "posts", }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: 2, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: testDB + ".stats", Name: "stats", }, - Profile: &assets.TableProfile{ + Profile: &assetsv1beta1.TableProfile{ TotalRows: 1, }, }), diff --git a/plugins/extractors/mssql/mssql.go b/plugins/extractors/mssql/mssql.go index 73f44b942..b30e2dec8 100644 --- a/plugins/extractors/mssql/mssql.go +++ b/plugins/extractors/mssql/mssql.go @@ -5,6 +5,7 @@ import ( "database/sql" _ "embed" // used to print the embedded assets "fmt" + "github.com/pkg/errors" "github.com/odpf/salt/log" @@ -13,11 +14,11 @@ import ( "github.com/odpf/meteor/models" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" - - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" "github.com/odpf/meteor/utils" + + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" ) //go:embed README.md @@ -152,12 +153,12 @@ func (e *Extractor) processTable(database string, tableName string) (err error) } // push table to channel - e.emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + e.emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", database, tableName), Name: tableName, }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, })) @@ -166,7 +167,7 @@ func (e *Extractor) processTable(database string, tableName string) (err error) } // getColumns extract columns from the given table -func (e *Extractor) getColumns(database, tableName string) (columns []*facets.Column, err error) { +func (e *Extractor) getColumns(database, tableName string) (columns []*facetsv1beta1.Column, err error) { query := fmt.Sprintf( `SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, coalesce(CHARACTER_MAXIMUM_LENGTH,0) @@ -186,7 +187,7 @@ func (e *Extractor) getColumns(database, tableName string) (columns []*facets.Co e.logger.Error("failed to scan fields", "error", err) continue } - columns = append(columns, &facets.Column{ + columns = append(columns, &facetsv1beta1.Column{ Name: fieldName, DataType: dataType, IsNullable: e.isNullable(isNullableString), @@ -196,6 +197,7 @@ func (e *Extractor) getColumns(database, tableName string) (columns []*facets.Co return } + // isExcludedDB checks if the given db is in the list of excluded databases func (e *Extractor) buildExcludedDBs() { excludedMap := make(map[string]bool) diff --git a/plugins/extractors/mssql/mssql_test.go b/plugins/extractors/mssql/mssql_test.go index 38b1fd2c5..8cb73d03c 100644 --- a/plugins/extractors/mssql/mssql_test.go +++ b/plugins/extractors/mssql/mssql_test.go @@ -1,4 +1,5 @@ -//+build integration +//go:build integration +// +build integration package mssql_test @@ -6,16 +7,17 @@ import ( "context" "database/sql" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + _ "github.com/denisenkom/go-mssqldb" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/mssql" "github.com/odpf/meteor/test/mocks" @@ -145,13 +147,13 @@ func execute(db *sql.DB, queries []string) (err error) { func getExpected() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.applicant", Name: "applicant", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { DataType: "int", Name: "applicant_id", @@ -173,13 +175,13 @@ func getExpected() []models.Record { }, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.jobs", Name: "jobs", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { DataType: "varchar", Name: "department", diff --git a/plugins/extractors/mysql/mysql.go b/plugins/extractors/mysql/mysql.go index 15832fa27..17ffbdb12 100644 --- a/plugins/extractors/mysql/mysql.go +++ b/plugins/extractors/mysql/mysql.go @@ -5,13 +5,16 @@ import ( "database/sql" _ "embed" // used to print the embedded assets "fmt" + "github.com/pkg/errors" _ "github.com/go-sql-driver/mysql" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" + "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -148,18 +151,18 @@ func (e *Extractor) extractTables(database string) (err error) { // processTable builds and push table to emitter func (e *Extractor) processTable(database string, tableName string) (err error) { - var columns []*facets.Column + var columns []*facetsv1beta1.Column if columns, err = e.extractColumns(tableName); err != nil { return errors.Wrap(err, "failed to extract columns") } // push table to channel - e.emit(models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + e.emit(models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("%s.%s", database, tableName), Name: tableName, }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, })) @@ -168,7 +171,7 @@ func (e *Extractor) processTable(database string, tableName string) (err error) } // Extract columns from a given table -func (e *Extractor) extractColumns(tableName string) (columns []*facets.Column, err error) { +func (e *Extractor) extractColumns(tableName string) (columns []*facetsv1beta1.Column, err error) { query := `SELECT COLUMN_NAME,column_comment,DATA_TYPE, IS_NULLABLE,IFNULL(CHARACTER_MAXIMUM_LENGTH,0) FROM information_schema.columns @@ -188,7 +191,7 @@ func (e *Extractor) extractColumns(tableName string) (columns []*facets.Column, continue } - columns = append(columns, &facets.Column{ + columns = append(columns, &facetsv1beta1.Column{ Name: fieldName, DataType: dataType, Description: fieldDesc, diff --git a/plugins/extractors/mysql/mysql_test.go b/plugins/extractors/mysql/mysql_test.go index b4637f208..3f48f1d40 100644 --- a/plugins/extractors/mysql/mysql_test.go +++ b/plugins/extractors/mysql/mysql_test.go @@ -1,22 +1,24 @@ -//+build integration +//go:build integration +// +build integration package mysql_test import ( "context" "fmt" - "github.com/odpf/meteor/test/utils" "log" "os" "testing" + "github.com/odpf/meteor/test/utils" + "database/sql" _ "github.com/go-sql-driver/mysql" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/mysql" "github.com/odpf/meteor/test/mocks" @@ -151,13 +153,13 @@ func execute(db *sql.DB, queries []string) (err error) { func getExpected() []models.Record { return []models.Record{ - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.applicant", Name: "applicant", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "applicant_id", DataType: "int", @@ -182,13 +184,13 @@ func getExpected() []models.Record { }, }, }), - models.NewRecord(&assets.Table{ - Resource: &common.Resource{ + models.NewRecord(&assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: "mockdata_meteor_metadata_test.jobs", Name: "jobs", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "department", DataType: "varchar", diff --git a/plugins/extractors/optimus/optimus.go b/plugins/extractors/optimus/optimus.go index 0dbd41e22..a8055081e 100644 --- a/plugins/extractors/optimus/optimus.go +++ b/plugins/extractors/optimus/optimus.go @@ -7,9 +7,9 @@ import ( "strings" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -119,7 +119,7 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error { return nil } -func (e *Extractor) buildJob(ctx context.Context, jobSpec *pb.JobSpecification, project, namespace string) (job *assets.Job, err error) { +func (e *Extractor) buildJob(ctx context.Context, jobSpec *pb.JobSpecification, project, namespace string) (job *assetsv1beta1.Job, err error) { jobResp, err := e.client.GetJobTask(ctx, &pb.GetJobTaskRequest{ ProjectName: project, Namespace: namespace, @@ -139,26 +139,26 @@ func (e *Extractor) buildJob(ctx context.Context, jobSpec *pb.JobSpecification, jobID := fmt.Sprintf("%s.%s.%s", project, namespace, jobSpec.Name) urn := models.JobURN(service, e.config.Host, jobID) - job = &assets.Job{ - Resource: &common.Resource{ + job = &assetsv1beta1.Job{ + Resource: &commonv1beta1.Resource{ Urn: urn, Name: jobSpec.Name, Service: service, Description: jobSpec.Description, }, - Ownership: &facets.Ownership{ - Owners: []*facets.Owner{ + Ownership: &facetsv1beta1.Ownership{ + Owners: []*facetsv1beta1.Owner{ { Urn: jobSpec.Owner, Email: jobSpec.Owner, }, }, }, - Lineage: &facets.Lineage{ + Lineage: &facetsv1beta1.Lineage{ Upstreams: upstreams, Downstreams: downstreams, }, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "version": jobSpec.Version, "project": project, @@ -186,7 +186,7 @@ func (e *Extractor) buildJob(ctx context.Context, jobSpec *pb.JobSpecification, return } -func (e *Extractor) buildLineage(task *pb.JobTask) (upstreams, downstreams []*common.Resource, err error) { +func (e *Extractor) buildLineage(task *pb.JobTask) (upstreams, downstreams []*commonv1beta1.Resource, err error) { upstreams, err = e.buildUpstreams(task) if err != nil { err = errors.Wrap(err, "error building upstreams") @@ -201,7 +201,7 @@ func (e *Extractor) buildLineage(task *pb.JobTask) (upstreams, downstreams []*co return } -func (e *Extractor) buildUpstreams(task *pb.JobTask) (upstreams []*common.Resource, err error) { +func (e *Extractor) buildUpstreams(task *pb.JobTask) (upstreams []*commonv1beta1.Resource, err error) { for _, dependency := range task.Dependencies { var urn string urn, err = e.mapURN(dependency.Dependency) @@ -209,7 +209,7 @@ func (e *Extractor) buildUpstreams(task *pb.JobTask) (upstreams []*common.Resour return } - upstreams = append(upstreams, &common.Resource{ + upstreams = append(upstreams, &commonv1beta1.Resource{ Urn: urn, Type: "table", Service: "bigquery", @@ -219,7 +219,7 @@ func (e *Extractor) buildUpstreams(task *pb.JobTask) (upstreams []*common.Resour return } -func (e *Extractor) buildDownstreams(task *pb.JobTask) (downstreams []*common.Resource, err error) { +func (e *Extractor) buildDownstreams(task *pb.JobTask) (downstreams []*commonv1beta1.Resource, err error) { if task.Destination == nil { return } @@ -230,7 +230,7 @@ func (e *Extractor) buildDownstreams(task *pb.JobTask) (downstreams []*common.Re return } - downstreams = append(downstreams, &common.Resource{ + downstreams = append(downstreams, &commonv1beta1.Resource{ Urn: urn, Type: "table", Service: "bigquery", diff --git a/plugins/extractors/populate.go b/plugins/extractors/populate.go index 8b7cf03f9..c9fa59671 100644 --- a/plugins/extractors/populate.go +++ b/plugins/extractors/populate.go @@ -13,11 +13,11 @@ import ( _ "github.com/odpf/meteor/plugins/extractors/grafana" _ "github.com/odpf/meteor/plugins/extractors/kafka" _ "github.com/odpf/meteor/plugins/extractors/metabase" - _ "github.com/odpf/meteor/plugins/extractors/tableau" _ "github.com/odpf/meteor/plugins/extractors/mongodb" _ "github.com/odpf/meteor/plugins/extractors/mssql" _ "github.com/odpf/meteor/plugins/extractors/mysql" _ "github.com/odpf/meteor/plugins/extractors/optimus" _ "github.com/odpf/meteor/plugins/extractors/postgres" _ "github.com/odpf/meteor/plugins/extractors/superset" + _ "github.com/odpf/meteor/plugins/extractors/tableau" ) diff --git a/plugins/extractors/postgres/postgres.go b/plugins/extractors/postgres/postgres.go index 2929eadf6..186f7cbcd 100644 --- a/plugins/extractors/postgres/postgres.go +++ b/plugins/extractors/postgres/postgres.go @@ -11,9 +11,9 @@ import ( _ "github.com/lib/pq" // used to register the postgres driver "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -174,20 +174,20 @@ func (e *Extractor) getTables(db *sql.DB, dbName string) (list []string, err err } // Prepares the list of tables and the attached metadata -func (e *Extractor) getTableMetadata(db *sql.DB, dbName string, tableName string) (result *assets.Table, err error) { - var columns []*facets.Column +func (e *Extractor) getTableMetadata(db *sql.DB, dbName string, tableName string) (result *assetsv1beta1.Table, err error) { + var columns []*facetsv1beta1.Column columns, err = e.getColumnMetadata(db, dbName, tableName) if err != nil { return result, nil } - result = &assets.Table{ - Resource: &common.Resource{ + result = &assetsv1beta1.Table{ + Resource: &commonv1beta1.Resource{ Urn: models.TableURN("postgres", e.config.Host, dbName, tableName), Name: tableName, Service: "postgres", }, - Schema: &facets.Columns{ + Schema: &facetsv1beta1.Columns{ Columns: columns, }, } @@ -196,7 +196,7 @@ func (e *Extractor) getTableMetadata(db *sql.DB, dbName string, tableName string } // Prepares the list of columns and the attached metadata -func (e *Extractor) getColumnMetadata(db *sql.DB, dbName string, tableName string) (result []*facets.Column, err error) { +func (e *Extractor) getColumnMetadata(db *sql.DB, dbName string, tableName string) (result []*facetsv1beta1.Column, err error) { sqlStr := `SELECT COLUMN_NAME,DATA_TYPE, IS_NULLABLE,coalesce(CHARACTER_MAXIMUM_LENGTH,0) FROM information_schema.columns @@ -213,7 +213,7 @@ func (e *Extractor) getColumnMetadata(db *sql.DB, dbName string, tableName strin e.logger.Error("failed to get fields", "error", err) continue } - result = append(result, &facets.Column{ + result = append(result, &facetsv1beta1.Column{ Name: fieldName, DataType: dataType, IsNullable: isNullable(isNullableString), diff --git a/plugins/extractors/postgres/postgres_test.go b/plugins/extractors/postgres/postgres_test.go index 26672d089..1465d34d9 100644 --- a/plugins/extractors/postgres/postgres_test.go +++ b/plugins/extractors/postgres/postgres_test.go @@ -10,12 +10,12 @@ import ( "os" "testing" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/test/utils" "database/sql" _ "github.com/lib/pq" - "github.com/odpf/meteor/models/odpf/assets" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/postgres" "github.com/odpf/meteor/test/mocks" @@ -105,7 +105,7 @@ func TestExtract(t *testing.T) { var urns []string for _, record := range emitter.Get() { - table := record.Data().(*assets.Table) + table := record.Data().(*assetsv1beta1.Table) urns = append(urns, table.Resource.Urn) } diff --git a/plugins/extractors/superset/superset.go b/plugins/extractors/superset/superset.go index 0d1adb0ea..522b1c6ac 100644 --- a/plugins/extractors/superset/superset.go +++ b/plugins/extractors/superset/superset.go @@ -6,18 +6,19 @@ import ( _ "embed" // used to print the embedded assets "encoding/json" "fmt" + "io/ioutil" + "net/http" + "strconv" + "time" + "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" "github.com/odpf/salt/log" "github.com/pkg/errors" - "io/ioutil" - "net/http" - "strconv" - "time" ) //go:embed README.md @@ -107,15 +108,15 @@ func (e *Extractor) Extract(_ context.Context, emit plugins.Emit) (err error) { } // buildDashboard builds a dashboard from superset server -func (e *Extractor) buildDashboard(id int) (data *assets.Dashboard, err error) { +func (e *Extractor) buildDashboard(id int) (data *assetsv1beta1.Dashboard, err error) { var dashboard Dashboard chart, err := e.getChartsList(id) if err != nil { err = errors.Wrap(err, "failed to get chart list") return } - data = &assets.Dashboard{ - Resource: &common.Resource{ + data = &assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: fmt.Sprintf("superset.%s", dashboard.DashboardTitle), Name: dashboard.DashboardTitle, Service: "superset", @@ -140,7 +141,7 @@ func (e *Extractor) getDashboardsList() (dashboards []Dashboard, err error) { } // getChartsList gets a list of charts from superset server -func (e *Extractor) getChartsList(id int) (charts []*assets.Chart, err error) { +func (e *Extractor) getChartsList(id int) (charts []*assetsv1beta1.Chart, err error) { type responseChart struct { Result []Chart `json:"result"` } @@ -150,9 +151,9 @@ func (e *Extractor) getChartsList(id int) (charts []*assets.Chart, err error) { err = errors.Wrap(err, "failed to get list of chart details") return } - var tempCharts []*assets.Chart + var tempCharts []*assetsv1beta1.Chart for _, res := range data.Result { - var tempChart assets.Chart + var tempChart assetsv1beta1.Chart tempChart.Name = res.SliceName tempChart.Source = "superset" tempChart.Description = res.Description diff --git a/plugins/extractors/superset/superset_test.go b/plugins/extractors/superset/superset_test.go index 78c3f3e0c..e24399678 100644 --- a/plugins/extractors/superset/superset_test.go +++ b/plugins/extractors/superset/superset_test.go @@ -16,9 +16,9 @@ import ( "testing" "time" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/test/utils" - "github.com/odpf/meteor/models/odpf/assets" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/extractors/superset" "github.com/odpf/meteor/test/mocks" @@ -136,7 +136,7 @@ func TestExtract(t *testing.T) { var urns []string fmt.Println(emitter.Get()) for _, record := range emitter.Get() { - dashboard := record.Data().(*assets.Dashboard) + dashboard := record.Data().(*assetsv1beta1.Dashboard) urns = append(urns, dashboard.Resource.Urn) } assert.Equal(t, 10, len(urns)) diff --git a/plugins/extractors/tableau/builder.go b/plugins/extractors/tableau/builder.go index 6e76de76b..8e3763721 100644 --- a/plugins/extractors/tableau/builder.go +++ b/plugins/extractors/tableau/builder.go @@ -2,13 +2,13 @@ package tableau import ( "github.com/mitchellh/mapstructure" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" "github.com/pkg/errors" ) -func (e *Extractor) buildLineage(tables []*Table) (lineage *facets.Lineage) { - upstreamLineages := []*common.Resource{} +func (e *Extractor) buildLineage(tables []*Table) (lineage *facetsv1beta1.Lineage) { + upstreamLineages := []*commonv1beta1.Resource{} for _, t := range tables { res, err := e.buildLineageResources(t) if err != nil { @@ -17,11 +17,11 @@ func (e *Extractor) buildLineage(tables []*Table) (lineage *facets.Lineage) { } upstreamLineages = append(upstreamLineages, res) } - lineage = &facets.Lineage{Upstreams: upstreamLineages} + lineage = &facetsv1beta1.Lineage{Upstreams: upstreamLineages} return } -func (e *Extractor) buildLineageResources(t *Table) (resource *common.Resource, err error) { +func (e *Extractor) buildLineageResources(t *Table) (resource *commonv1beta1.Resource, err error) { if t == nil { err = errors.New("no table found") return diff --git a/plugins/extractors/tableau/builder_test.go b/plugins/extractors/tableau/builder_test.go index d5ccc3463..a7d5bd50b 100644 --- a/plugins/extractors/tableau/builder_test.go +++ b/plugins/extractors/tableau/builder_test.go @@ -3,8 +3,8 @@ package tableau import ( "testing" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" testutils "github.com/odpf/meteor/test/utils" "github.com/stretchr/testify/assert" ) @@ -28,7 +28,7 @@ func TestBuildLineageResource(t *testing.T) { e := New(testutils.Logger) res, err := e.buildLineageResources(table) - expectedResource := &common.Resource{ + expectedResource := &commonv1beta1.Resource{ Urn: "bigquery::database_server/access_data/table1", Type: "table", Service: table.Database["connectionType"].(string), @@ -55,7 +55,7 @@ func TestBuildLineageResource(t *testing.T) { e := New(testutils.Logger) res, err := e.buildLineageResources(table) - expectedResource := &common.Resource{ + expectedResource := &commonv1beta1.Resource{ Urn: "postgres::localhost:5432/database_server/table1", Type: "table", Service: table.Database["connectionType"].(string), @@ -81,7 +81,7 @@ func TestBuildLineageResource(t *testing.T) { e := New(testutils.Logger) res, err := e.buildLineageResources(table) - expectedResource := &common.Resource{ + expectedResource := &commonv1beta1.Resource{ Urn: "gcs::gcs/database_cloud_file/table_name", Type: "bucket", Service: table.Database["connectionType"].(string), @@ -107,7 +107,7 @@ func TestBuildLineageResource(t *testing.T) { e := New(testutils.Logger) res, err := e.buildLineageResources(table) - expectedResource := &common.Resource{ + expectedResource := &commonv1beta1.Resource{ Urn: "file::/this/is/file/database_file/table_name", Type: "bucket", Service: table.Database["connectionType"].(string), @@ -133,7 +133,7 @@ func TestBuildLineageResource(t *testing.T) { e := New(testutils.Logger) res, err := e.buildLineageResources(table) - expectedResource := &common.Resource{ + expectedResource := &commonv1beta1.Resource{ Urn: "web_data_connector::http://link_to_connector/database_wdc/table_name", Type: "table", Service: table.Database["connectionType"].(string), @@ -191,8 +191,8 @@ func TestBuildLineage(t *testing.T) { UpstreamTables: upstreamTables, } - expectedLineage := &facets.Lineage{ - Upstreams: []*common.Resource{ + expectedLineage := &facetsv1beta1.Lineage{ + Upstreams: []*commonv1beta1.Resource{ { Urn: "postgres::localhost:5432/database_1/table_name_1", Type: "table", diff --git a/plugins/extractors/tableau/models.go b/plugins/extractors/tableau/models.go index 60945be66..4b220ed49 100644 --- a/plugins/extractors/tableau/models.go +++ b/plugins/extractors/tableau/models.go @@ -7,7 +7,7 @@ import ( "time" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets/common" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" "github.com/pkg/errors" ) @@ -74,7 +74,7 @@ type Sheet struct { // https://help.tableau.com/current/api/metadata_api/en-us/docs/meta_api_model.html type DatabaseInterface interface { - CreateResource(tableInfo Table) (resource *common.Resource) + CreateResource(tableInfo Table) (resource *commonv1beta1.Resource) } type Database map[string]interface{} @@ -106,7 +106,7 @@ func parseBQTableFullName(fullName string) (splittedFN []string, err error) { return } -func (dbs *DatabaseServer) CreateResource(tableInfo Table) (resource *common.Resource) { +func (dbs *DatabaseServer) CreateResource(tableInfo Table) (resource *commonv1beta1.Resource) { source := mapConnectionTypeToSource(dbs.ConnectionType) var urn string @@ -127,7 +127,7 @@ func (dbs *DatabaseServer) CreateResource(tableInfo Table) (resource *common.Res urn = models.TableURN(source, host, dbs.Name, tableInfo.Name) } - resource = &common.Resource{ + resource = &commonv1beta1.Resource{ Urn: urn, Type: "table", Service: source, @@ -146,10 +146,10 @@ type CloudFile struct { RequestURL string `json:"requestUrl"` } -func (cf *CloudFile) CreateResource(tableInfo Table) (resource *common.Resource) { +func (cf *CloudFile) CreateResource(tableInfo Table) (resource *commonv1beta1.Resource) { source := mapConnectionTypeToSource(cf.ConnectionType) urn := fmt.Sprintf("%s::%s/%s/%s", source, cf.Provider, cf.Name, tableInfo.Name) - resource = &common.Resource{ + resource = &commonv1beta1.Resource{ Urn: urn, Type: "bucket", // TODO need to check what would be the appropriate type for this Service: source, @@ -165,10 +165,10 @@ type File struct { FilePath string `json:"filePath"` } -func (f *File) CreateResource(tableInfo Table) (resource *common.Resource) { +func (f *File) CreateResource(tableInfo Table) (resource *commonv1beta1.Resource) { source := mapConnectionTypeToSource(f.ConnectionType) urn := fmt.Sprintf("%s::%s/%s/%s", source, f.FilePath, f.Name, tableInfo.Name) - resource = &common.Resource{ + resource = &commonv1beta1.Resource{ Urn: urn, Type: "bucket", // TODO need to check what would be the appropriate type for this Service: source, @@ -184,10 +184,10 @@ type WebDataConnector struct { ConnectorURL string `json:"connectorUrl"` } -func (wdc *WebDataConnector) CreateResource(tableInfo Table) (resource *common.Resource) { +func (wdc *WebDataConnector) CreateResource(tableInfo Table) (resource *commonv1beta1.Resource) { source := mapConnectionTypeToSource(wdc.ConnectionType) urn := fmt.Sprintf("%s::%s/%s/%s", source, wdc.ConnectorURL, wdc.Name, tableInfo.Name) - resource = &common.Resource{ + resource = &commonv1beta1.Resource{ Urn: urn, Type: "table", // TODO need to check what would be the appropriate type for this Service: source, diff --git a/plugins/extractors/tableau/tableau.go b/plugins/extractors/tableau/tableau.go index e76e9b957..9442682e5 100644 --- a/plugins/extractors/tableau/tableau.go +++ b/plugins/extractors/tableau/tableau.go @@ -7,9 +7,9 @@ import ( "net/http" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/registry" "github.com/odpf/meteor/utils" @@ -127,18 +127,18 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) (err error) return } -func (e *Extractor) buildDashboard(wb *Workbook) (data *assets.Dashboard, err error) { +func (e *Extractor) buildDashboard(wb *Workbook) (data *assetsv1beta1.Dashboard, err error) { lineages := e.buildLineage(wb.UpstreamTables) dashboardURN := models.DashboardURN("tableau", e.config.Host, fmt.Sprintf("workbook/%s", wb.ID)) - data = &assets.Dashboard{ - Resource: &common.Resource{ + data = &assetsv1beta1.Dashboard{ + Resource: &commonv1beta1.Resource{ Urn: dashboardURN, Name: wb.Name, Service: "tableau", Description: wb.Description, }, Charts: e.buildCharts(dashboardURN, wb, lineages), - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "id": wb.ID, "name": wb.Name, @@ -149,8 +149,8 @@ func (e *Extractor) buildDashboard(wb *Workbook) (data *assets.Dashboard, err er "owner_email": wb.Owner.Email, }), }, - Ownership: &facets.Ownership{ - Owners: []*facets.Owner{ + Ownership: &facetsv1beta1.Ownership{ + Owners: []*facetsv1beta1.Owner{ { Urn: wb.Owner.Email, Name: wb.Owner.Name, @@ -159,7 +159,7 @@ func (e *Extractor) buildDashboard(wb *Workbook) (data *assets.Dashboard, err er }, }, Lineage: lineages, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(wb.CreatedAt), UpdateTime: timestamppb.New(wb.UpdatedAt), }, @@ -167,21 +167,21 @@ func (e *Extractor) buildDashboard(wb *Workbook) (data *assets.Dashboard, err er return } -func (e *Extractor) buildCharts(dashboardURN string, wb *Workbook, lineages *facets.Lineage) (charts []*assets.Chart) { +func (e *Extractor) buildCharts(dashboardURN string, wb *Workbook, lineages *facetsv1beta1.Lineage) (charts []*assetsv1beta1.Chart) { for _, sh := range wb.Sheets { chartURN := models.DashboardURN("tableau", e.config.Host, fmt.Sprintf("sheet/%s", sh.ID)) - charts = append(charts, &assets.Chart{ + charts = append(charts, &assetsv1beta1.Chart{ Urn: chartURN, Name: sh.Name, DashboardUrn: dashboardURN, Source: "tableau", - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "id": sh.ID, "name": sh.Name, }), }, - Timestamps: &common.Timestamp{ + Timestamps: &commonv1beta1.Timestamp{ CreateTime: timestamppb.New(sh.CreatedAt), UpdateTime: timestamppb.New(sh.UpdatedAt), }, diff --git a/plugins/sinks/columbus/sink_test.go b/plugins/sinks/columbus/sink_test.go index 3c610acc3..e3db01e5a 100644 --- a/plugins/sinks/columbus/sink_test.go +++ b/plugins/sinks/columbus/sink_test.go @@ -14,9 +14,9 @@ import ( "github.com/odpf/meteor/utils" "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/odpf/meteor/plugins" "github.com/odpf/meteor/plugins/sinks/columbus" "github.com/stretchr/testify/assert" @@ -74,7 +74,7 @@ func TestSink(t *testing.T) { t.Fatal(err) } - data := &assets.Topic{Resource: &common.Resource{}} + data := &assetsv1beta1.Topic{Resource: &commonv1beta1.Resource{}} err = columbusSink.Sink(ctx, []models.Record{models.NewRecord(data)}) assert.Equal(t, errMessage, err.Error()) }) @@ -96,7 +96,7 @@ func TestSink(t *testing.T) { t.Fatal(err) } - data := &assets.Topic{Resource: &common.Resource{}} + data := &assetsv1beta1.Topic{Resource: &commonv1beta1.Resource{}} err = columbusSink.Sink(ctx, []models.Record{models.NewRecord(data)}) assert.True(t, errors.Is(err, plugins.RetryError{})) }) @@ -111,8 +111,8 @@ func TestSink(t *testing.T) { }{ { description: "should create the right request to columbus", - data: &assets.User{ - Resource: &common.Resource{ + data: &assetsv1beta1.User{ + Resource: &commonv1beta1.Resource{ Urn: "my-topic-urn", Name: "my-topic", Service: "kafka", @@ -130,13 +130,13 @@ func TestSink(t *testing.T) { }, { description: "should build columbus labels if labels is defined in config", - data: &assets.Topic{ - Resource: &common.Resource{ + data: &assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "my-topic-urn", Name: "my-topic", Service: "kafka", }, - Properties: &facets.Properties{ + Properties: &facetsv1beta1.Properties{ Attributes: utils.TryParseMapToProto(map[string]interface{}{ "attrA": "valueAttrA", "attrB": "valueAttrB", @@ -167,14 +167,14 @@ func TestSink(t *testing.T) { }, { description: "should send upstreams if data has upstreams", - data: &assets.Topic{ - Resource: &common.Resource{ + data: &assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "my-topic-urn", Name: "my-topic", Service: "kafka", }, - Lineage: &facets.Lineage{ - Upstreams: []*common.Resource{ + Lineage: &facetsv1beta1.Lineage{ + Upstreams: []*commonv1beta1.Resource{ { Urn: "urn-1", Type: "type-a", @@ -208,14 +208,14 @@ func TestSink(t *testing.T) { }, { description: "should send downstreams if data has downstreams", - data: &assets.Topic{ - Resource: &common.Resource{ + data: &assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "my-topic-urn", Name: "my-topic", Service: "kafka", }, - Lineage: &facets.Lineage{ - Downstreams: []*common.Resource{ + Lineage: &facetsv1beta1.Lineage{ + Downstreams: []*commonv1beta1.Resource{ { Urn: "urn-1", Type: "type-a", @@ -249,28 +249,31 @@ func TestSink(t *testing.T) { }, { description: "should send owners if data has ownership", - data: &assets.Topic{ - Resource: &common.Resource{ + data: &assetsv1beta1.Topic{ + Resource: &commonv1beta1.Resource{ Urn: "my-topic-urn", Name: "my-topic", Service: "kafka", }, - Ownership: &facets.Ownership{ - Owners: []*facets.Owner{ + Ownership: &facetsv1beta1.Ownership{ + Owners: []*facetsv1beta1.Owner{ { - Urn: "urn-1", - Name: "owner-a", - Role: "role-a", + Urn: "urn-1", + Name: "owner-a", + Role: "role-a", + Email: "email-1", }, { - Urn: "urn-2", - Name: "owner-b", - Role: "role-b", + Urn: "urn-2", + Name: "owner-b", + Role: "role-b", + Email: "email-2", }, { - Urn: "urn-3", - Name: "owner-c", - Role: "role-c", + Urn: "urn-3", + Name: "owner-c", + Role: "role-c", + Email: "email-3", }, }, }, @@ -285,19 +288,22 @@ func TestSink(t *testing.T) { Service: "kafka", Owners: []columbus.Owner{ { - URN: "urn-1", - Name: "owner-a", - Role: "role-a", + URN: "urn-1", + Name: "owner-a", + Role: "role-a", + Email: "email-1", }, { - URN: "urn-2", - Name: "owner-b", - Role: "role-b", + URN: "urn-2", + Name: "owner-b", + Role: "role-b", + Email: "email-2", }, { - URN: "urn-3", - Name: "owner-c", - Role: "role-c", + URN: "urn-3", + Name: "owner-c", + Role: "role-c", + Email: "email-3", }, }, }, diff --git a/recipe/recipe.go b/recipe/recipe.go index 6a959cedb..8afb18e1b 100644 --- a/recipe/recipe.go +++ b/recipe/recipe.go @@ -21,7 +21,7 @@ type ProcessorRecipe struct { Config map[string]interface{} `json:"config" yaml:"config"` } -// Recipe contains the json data for a recipe +// Recipe contains the json data for a recipe type Recipe struct { Name string `json:"name" yaml:"name" validate:"required"` Source SourceRecipe `json:"source" yaml:"source" validate:"required"` diff --git a/registry/registry.go b/registry/registry.go index 5647c6d55..309265737 100644 --- a/registry/registry.go +++ b/registry/registry.go @@ -8,7 +8,7 @@ var ( // Extractors is a factory for extractors Extractors = NewExtractorFactory() // Sinks is a factory for sinks - Sinks = NewSinkFactory() + Sinks = NewSinkFactory() // Processors is a factory for processors Processors = NewProcessorFactory() ) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 166ece476..5a7c9c751 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -1,4 +1,5 @@ -//+build integration +//go:build integration +// +build integration package e2e_test @@ -6,9 +7,6 @@ import ( "context" "database/sql" "fmt" - "github.com/odpf/meteor/test/utils" - "github.com/ory/dockertest/v3" - "github.com/ory/dockertest/v3/docker" "log" "net" "os" @@ -17,11 +15,15 @@ import ( "testing" "time" + "github.com/odpf/meteor/test/utils" + "github.com/ory/dockertest/v3" + "github.com/ory/dockertest/v3/docker" + "github.com/odpf/meteor/cmd" "github.com/odpf/meteor/config" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/common" - "github.com/odpf/meteor/models/odpf/assets/facets" + commonv1beta1 "github.com/odpf/meteor/models/odpf/assets/common/v1beta1" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" _ "github.com/odpf/meteor/plugins/extractors" _ "github.com/odpf/meteor/plugins/processors" _ "github.com/odpf/meteor/plugins/sinks" @@ -95,7 +97,7 @@ func TestMySqlToKafka(t *testing.T) { t.Fatal(err) } - var sinkData []*assets.Table + var sinkData []*assetsv1beta1.Table ctx, cancel := context.WithCancel(context.TODO()) go func() { err = listenToTopic(ctx, testTopic, &sinkData) @@ -136,7 +138,7 @@ func TestMySqlToKafka(t *testing.T) { } // listenToTopic listens to a topic and stores the data in sinkData -func listenToTopic(ctx context.Context, topic string, data *[]*assets.Table) error { +func listenToTopic(ctx context.Context, topic string, data *[]*assetsv1beta1.Table) error { reader := kafka.NewReader(kafka.ReaderConfig{ Brokers: []string{brokerHost}, Topic: topic, @@ -295,15 +297,15 @@ func mysqlDockerSetup() (purge func() error, err error) { } // getExpectedTables returns the expected tables -func getExpectedTables() []*assets.Table { - return []*assets.Table{ +func getExpectedTables() []*assetsv1beta1.Table { + return []*assetsv1beta1.Table{ { - Resource: &common.Resource{ + Resource: &commonv1beta1.Resource{ Urn: testDB + ".applicant", Name: "applicant", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "applicant_id", DataType: "int", @@ -326,12 +328,12 @@ func getExpectedTables() []*assets.Table { }, }, { - Resource: &common.Resource{ + Resource: &commonv1beta1.Resource{ Urn: testDB + ".jobs", Name: "jobs", }, - Schema: &facets.Columns{ - Columns: []*facets.Column{ + Schema: &facetsv1beta1.Columns{ + Columns: []*facetsv1beta1.Column{ { Name: "department", DataType: "varchar", diff --git a/test/utils/dockertest.go b/test/utils/dockertest.go index 4f2ad1051..b19e78469 100644 --- a/test/utils/dockertest.go +++ b/test/utils/dockertest.go @@ -36,7 +36,7 @@ func CreateContainer(opts dockertest.RunOptions, retryOp func(r *dockertest.Reso return }); err != nil { - if err := purgeFn(); err != nil { + if err := purgeFn(); err != nil { return nil, err } return purgeFn, fmt.Errorf("could not connect to docker: %s", err.Error()) diff --git a/utils/custom_properties.go b/utils/custom_properties.go index 975418b3e..36e737aed 100644 --- a/utils/custom_properties.go +++ b/utils/custom_properties.go @@ -2,8 +2,8 @@ package utils import ( "github.com/odpf/meteor/models" - "github.com/odpf/meteor/models/odpf/assets" - "github.com/odpf/meteor/models/odpf/assets/facets" + facetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/facets/v1beta1" + assetsv1beta1 "github.com/odpf/meteor/models/odpf/assets/v1beta1" "github.com/pkg/errors" "google.golang.org/protobuf/types/known/structpb" ) @@ -29,29 +29,29 @@ func SetCustomProperties(metadata models.Metadata, customFields map[string]inter } switch metadata := metadata.(type) { - case *assets.Table: + case *assetsv1beta1.Table: metadata.Properties = properties - case *assets.Topic: + case *assetsv1beta1.Topic: metadata.Properties = properties - case *assets.Dashboard: + case *assetsv1beta1.Dashboard: metadata.Properties = properties - case *assets.Bucket: + case *assetsv1beta1.Bucket: metadata.Properties = properties - case *assets.Group: + case *assetsv1beta1.Group: metadata.Properties = properties - case *assets.Job: + case *assetsv1beta1.Job: metadata.Properties = properties - case *assets.User: + case *assetsv1beta1.User: metadata.Properties = properties } return metadata, nil } -func appendCustomFields(metadata models.Metadata, customFields map[string]interface{}) (*facets.Properties, error) { +func appendCustomFields(metadata models.Metadata, customFields map[string]interface{}) (*facetsv1beta1.Properties, error) { properties := metadata.GetProperties() if properties == nil { - properties = &facets.Properties{ + properties = &facetsv1beta1.Properties{ Attributes: &structpb.Struct{}, } }