From fb40cdc2cb4b4b9aaf7276c163a512b9d503ff96 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula <85502298+pokeeffe-molecula@users.noreply.github.com> Date: Wed, 26 Oct 2022 11:23:40 -0500 Subject: [PATCH] fb-1729 Enriched Table Metadata (#2255) enriched metadata for tables added support for the concept of a table and field owners in metadata; mechanism to derive owner from http request metadata; metadata for table description --- Makefile | 8 +- api.go | 27 +- api_test.go | 4 +- cluster.go | 5 +- dbshard_internal_test.go | 4 +- disco/disco.go | 26 +- encoding/proto/proto.go | 6 + etcd/embed.go | 35 +- executor.go | 2 +- executor_internal_test.go | 10 +- executor_test.go | 196 +- field.go | 2 + field_test.go | 20 +- fragment_internal_test.go | 6 +- go.mod | 2 +- holder.go | 33 +- holder_internal_test.go | 4 +- holder_test.go | 26 +- http_handler.go | 86 +- http_translator_test.go | 2 +- index.go | 57 +- index_internal_test.go | 2 +- index_test.go | 20 +- internal_client_test.go | 10 +- pb/private.pb.go | 370 ++-- pb/private.proto | 3 + pb/public.pb.go | 2 + proto/pilosa.pb.go | 2461 +++++++++++++++---------- proto/pilosa.proto | 7 +- server.go | 1 + server/handler_test.go | 90 +- sql3/planner/executionplanner_test.go | 110 +- sql3/planner/opcreatetable.go | 1 + test/holder.go | 16 +- test/index.go | 10 +- 35 files changed, 2307 insertions(+), 1357 deletions(-) diff --git a/Makefile b/Makefile index 41806144d..ca08e4646 100644 --- a/Makefile +++ b/Makefile @@ -206,12 +206,8 @@ generate-pql: require-peg generate-proto-grpc: require-protoc require-protoc-gen-go protoc -I proto proto/pilosa.proto --go_out=plugins=grpc:proto - protoc -I proto proto/vdsm/vdsm.proto --go_out=plugins=grpc:proto - # TODO: Modify above commands and remove the below mv if possible. - # See https://go-review.googlesource.com/c/protobuf/+/219298/ for info on --go-opt - # I couldn't get it to work during development - Cody - cp -r proto/github.com/molecula/featurebase/v3/proto/ proto/ - rm -rf proto/github.com +# address re-generation here only if we need to +# protoc -I proto proto/vdsm.proto --go_out=plugins=grpc:proto # `go generate` all needed packages generate: generate-protoc generate-statik generate-stringer generate-pql diff --git a/api.go b/api.go index d6b073216..cecc11d3e 100644 --- a/api.go +++ b/api.go @@ -223,14 +223,23 @@ func (api *API) CreateIndex(ctx context.Context, indexName string, options Index span, _ := tracing.StartSpanFromContext(ctx, "API.CreateIndex") defer span.Finish() + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, ok := ctx.Value(ContextRequestUserIdKey).(string) + if !ok { + requestUserID = "" + } + if err := api.validate(apiCreateIndex); err != nil { return nil, errors.Wrap(err, "validating api method") } // Populate the create index message. + ts := timestamp() cim := &CreateIndexMessage{ Index: indexName, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: options, } @@ -306,6 +315,13 @@ func (api *API) CreateField(ctx context.Context, indexName string, fieldName str return nil, errors.Wrap(err, "validating api method") } + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, ok := ctx.Value(ContextRequestUserIdKey).(string) + if !ok { + requestUserID = "" + } + // Apply and validate functional options. fo, err := newFieldOptions(opts...) if err != nil { @@ -323,11 +339,12 @@ func (api *API) CreateField(ctx context.Context, indexName string, fieldName str Index: indexName, Field: fieldName, CreatedAt: timestamp(), + Owner: requestUserID, Meta: fo, } // Create field. - field, err := index.CreateField(fieldName, opts...) + field, err := index.CreateField(fieldName, requestUserID, opts...) if err != nil { return nil, errors.Wrap(err, "creating field") } @@ -357,7 +374,11 @@ func (api *API) UpdateField(ctx context.Context, indexName, fieldName string, up return newNotFoundError(ErrIndexNotFound, indexName) } - cfm, err := index.UpdateField(ctx, fieldName, update) + // get the requestUserID from the context -- assumes the http handler has populated this from + // authN/Z info + requestUserID, _ := ctx.Value(ContextRequestUserIdKey).(string) + + cfm, err := index.UpdateField(ctx, fieldName, requestUserID, update) if err != nil { return errors.Wrap(err, "updating field") } diff --git a/api_test.go b/api_test.go index 25b885957..42e9b171a 100644 --- a/api_test.go +++ b/api_test.go @@ -1387,11 +1387,11 @@ func TestVariousApiTranslateCalls(t *testing.T) { // this should never actually get used because we're testing for errors here r := strings.NewReader("") // test index - idx, err := api.Holder().CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := api.Holder().CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatalf("%v: could not create test index", err) } - if _, err = idx.CreateFieldIfNotExistsWithOptions("field", &pilosa.FieldOptions{Keys: false}); err != nil { + if _, err = idx.CreateFieldIfNotExistsWithOptions("field", "", &pilosa.FieldOptions{Keys: false}); err != nil { t.Fatalf("creating field: %v", err) } t.Run("translateIndexDbOnNilIndex", diff --git a/cluster.go b/cluster.go index 1671b4323..549cb9b03 100644 --- a/cluster.go +++ b/cluster.go @@ -878,7 +878,9 @@ type CreateShardMessage struct { type CreateIndexMessage struct { Index string CreatedAt int64 - Meta IndexOptions + Owner string + + Meta IndexOptions } // DeleteIndexMessage is an internal message indicating index deletion. @@ -891,6 +893,7 @@ type CreateFieldMessage struct { Index string Field string CreatedAt int64 + Owner string Meta *FieldOptions } diff --git a/dbshard_internal_test.go b/dbshard_internal_test.go index 0b34e5af4..bf2dae261 100644 --- a/dbshard_internal_test.go +++ b/dbshard_internal_test.go @@ -187,7 +187,7 @@ func makeSampleRoaringDir(t *testing.T, root, index, backend string, minBytes in } func helperCreateDBShard(h *Holder, index string, shard uint64) *Index { - idx, err := h.CreateIndexIfNotExists(index, IndexOptions{}) + idx, err := h.CreateIndexIfNotExists(index, "", IndexOptions{}) PanicOn(err) // TODO: It's not clear that this is actually doing anything. dbs, err := h.txf.dbPerShard.GetDBShard(index, shard, idx) @@ -252,7 +252,7 @@ func Test_DBPerShard_GetFieldView2Shards_map_from_RBF(t *testing.T) { index := "rick" field := "f" - idx, err := holder.CreateIndex(index, IndexOptions{}) + idx, err := holder.CreateIndex(index, "", IndexOptions{}) if err != nil { t.Fatalf("creating index: %v", err) } diff --git a/disco/disco.go b/disco/disco.go index e653c8f02..66daba6aa 100644 --- a/disco/disco.go +++ b/disco/disco.go @@ -100,8 +100,8 @@ type Schemator interface { CreateIndex(ctx context.Context, name string, val []byte) error DeleteIndex(ctx context.Context, name string) error Field(ctx context.Context, index, field string) ([]byte, error) - CreateField(ctx context.Context, index, field string, val []byte) error - UpdateField(ctx context.Context, index, field string, val []byte) error + CreateField(ctx context.Context, index, field string, fieldVal []byte) error + UpdateField(ctx context.Context, index, field string, fieldVal []byte) error DeleteField(ctx context.Context, index, field string) error View(ctx context.Context, index, field, view string) (bool, error) CreateView(ctx context.Context, index, field, view string) error @@ -185,23 +185,27 @@ func (*nopSchemator) Index(ctx context.Context, name string) ([]byte, error) { r func (*nopSchemator) CreateIndex(ctx context.Context, name string, val []byte) error { return nil } // DeleteIndex is a no-op implementation of the Schemator DeleteIndex method. -func (*nopSchemator) DeleteIndex(ctx context.Context, name string) error { return nil } +func (*nopSchemator) DeleteIndex(ctx context.Context, name string) error { + return nil +} // Field is a no-op implementation of the Schemator Field method. func (*nopSchemator) Field(ctx context.Context, index, field string) ([]byte, error) { return nil, nil } // CreateField is a no-op implementation of the Schemator CreateField method. -func (*nopSchemator) CreateField(ctx context.Context, index, field string, val []byte) error { +func (*nopSchemator) CreateField(ctx context.Context, index, field string, fieldVal []byte) error { return nil } // UpdateField is a no-op implementation of the Schemator UpdateField method. -func (*nopSchemator) UpdateField(ctx context.Context, index, field string, val []byte) error { +func (*nopSchemator) UpdateField(ctx context.Context, index, field string, fieldVal []byte) error { return nil } // DeleteField is a no-op implementation of the Schemator DeleteField method. -func (*nopSchemator) DeleteField(ctx context.Context, index, field string) error { return nil } +func (*nopSchemator) DeleteField(ctx context.Context, index, field string) error { + return nil +} // View is a no-op implementation of the Schemator View method. func (*nopSchemator) View(ctx context.Context, index, field, view string) (bool, error) { @@ -295,7 +299,7 @@ func (s *inMemSchemator) Field(ctx context.Context, index, field string) ([]byte } // CreateField is an in-memory implementation of the Schemator CreateField method. -func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, val []byte) error { +func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, fieldVal []byte) error { s.mu.Lock() defer s.mu.Unlock() idx, ok := s.schema[index] @@ -306,17 +310,17 @@ func (s *inMemSchemator) CreateField(ctx context.Context, index, field string, v // The current logic in pilosa doesn't allow us to return ErrFieldExists // here, so for now we just update the Data value if the field already // exists. - fld.Data = val + fld.Data = fieldVal return nil } idx.Fields[field] = &Field{ - Data: val, + Data: fieldVal, Views: make(map[string]struct{}), } return nil } -func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, val []byte) error { +func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, fieldVal []byte) error { s.mu.Lock() defer s.mu.Unlock() idx, ok := s.schema[index] @@ -327,7 +331,7 @@ func (s *inMemSchemator) UpdateField(ctx context.Context, index, field string, v // The current logic in pilosa doesn't allow us to return ErrFieldExists // here, so for now we just update the Data value if the field already // exists. - fld.Data = val + fld.Data = fieldVal return nil } else { return ErrFieldDoesNotExist diff --git a/encoding/proto/proto.go b/encoding/proto/proto.go index 0f96c0457..da5d64570 100644 --- a/encoding/proto/proto.go +++ b/encoding/proto/proto.go @@ -680,12 +680,14 @@ func (s Serializer) encodeCreateIndexMessage(m *pilosa.CreateIndexMessage) *pb.C return &pb.CreateIndexMessage{ Index: m.Index, CreatedAt: m.CreatedAt, + Owner: m.Owner, Meta: s.encodeIndexMeta(&m.Meta), } } func (s Serializer) encodeIndexMeta(m *pilosa.IndexOptions) *pb.IndexMeta { return &pb.IndexMeta{ + Description: m.Description, Keys: m.Keys, TrackExistence: m.TrackExistence, } @@ -702,6 +704,7 @@ func (s Serializer) encodeCreateFieldMessage(m *pilosa.CreateFieldMessage) *pb.C Index: m.Index, Field: m.Field, CreatedAt: m.CreatedAt, + Owner: m.Owner, Meta: s.encodeFieldOptions(m.Meta), } } @@ -1056,12 +1059,14 @@ func (s Serializer) decodeCreateShardMessage(pb *pb.CreateShardMessage, m *pilos func (s Serializer) decodeCreateIndexMessage(pb *pb.CreateIndexMessage, m *pilosa.CreateIndexMessage) { m.Index = pb.Index m.CreatedAt = pb.CreatedAt + m.Owner = pb.Owner m.Meta = pilosa.IndexOptions{} s.decodeIndexMeta(pb.Meta, &m.Meta) } func (s Serializer) decodeIndexMeta(pb *pb.IndexMeta, m *pilosa.IndexOptions) { if pb != nil { + m.Description = pb.Description m.Keys = pb.Keys m.TrackExistence = pb.TrackExistence } @@ -1075,6 +1080,7 @@ func (s Serializer) decodeCreateFieldMessage(pb *pb.CreateFieldMessage, m *pilos m.Index = pb.Index m.Field = pb.Field m.CreatedAt = pb.CreatedAt + m.Owner = pb.Owner m.Meta = &pilosa.FieldOptions{} s.decodeFieldOptions(pb.Meta, m.Meta) } diff --git a/etcd/embed.go b/etcd/embed.go index 00da78bfa..1ec887bcd 100644 --- a/etcd/embed.go +++ b/etcd/embed.go @@ -868,19 +868,20 @@ func (e *Etcd) Field(ctx context.Context, indexName string, name string) ([]byte return e.getKeyBytes(ctx, key) } -func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, val []byte) error { +func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, fieldVal []byte) error { key := schemaPrefix + indexName + "/" + name // Set up Op to write field value as bytes. op := clientv3.OpPut(key, "") - op.WithValueBytes(val) + op.WithValueBytes(fieldVal) // Check for key existence, and execute Op within a transaction. var resp *clientv3.TxnResponse err := e.retryClient(func(cli *clientv3.Client) (err error) { resp, err = cli.Txn(ctx). - If(clientv3util.KeyMissing(key)). + If( + clientv3util.KeyMissing(key)). Then(op). Commit() return err @@ -896,19 +897,20 @@ func (e *Etcd) CreateField(ctx context.Context, indexName string, name string, v return nil } -func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, val []byte) error { +func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, fieldVal []byte) error { key := schemaPrefix + indexName + "/" + name // Set up Op to write field value as bytes. op := clientv3.OpPut(key, "") - op.WithValueBytes(val) + op.WithValueBytes(fieldVal) // Check for key existence, and execute Op within a transaction. var resp *clientv3.TxnResponse err := e.retryClient(func(cli *clientv3.Client) (err error) { resp, err = cli.Txn(ctx). - If(clientv3util.KeyExists(key)). + If( + clientv3util.KeyExists(key)). Then(op). Commit() return err @@ -923,20 +925,31 @@ func (e *Etcd) UpdateField(ctx context.Context, indexName string, name string, v return nil } -func (e *Etcd) DeleteField(ctx context.Context, indexname string, name string) (err error) { - key := schemaPrefix + indexname + "/" + name +func (e *Etcd) DeleteField(ctx context.Context, indexName string, name string) (err error) { + key := schemaPrefix + indexName + "/" + name + + var resp *clientv3.TxnResponse + // Deleting field and views in one transaction. err = e.retryClient(func(cli *clientv3.Client) (err error) { - _, err = cli.Txn(ctx). - If(clientv3.Compare(clientv3.Version(key), ">", -1)). + resp, err = cli.Txn(ctx). + If( + clientv3.Compare(clientv3.Version(key), ">", -1)). Then( clientv3.OpDelete(key+"/", clientv3.WithPrefix()), // deleting field views clientv3.OpDelete(key), // deleting field ).Commit() return err }) + if err != nil { + return errors.Wrap(err, "executing transaction") + } - return errors.Wrap(err, "DeleteField") + if !resp.Succeeded { + return errors.New("deleting field from etcd failed") + } + + return nil } func (e *Etcd) View(ctx context.Context, indexName, fieldName, name string) (bool, error) { diff --git a/executor.go b/executor.go index f5797be99..76afb0160 100644 --- a/executor.go +++ b/executor.go @@ -6546,7 +6546,7 @@ func (e *executor) collectCallKeys(dst *keyCollector, c *pql.Call, index string) if keyed { opts = append(opts, OptFieldKeys()) } - if _, err := idx.CreateField(field, opts...); err != nil { + if _, err := idx.CreateField(field, "", opts...); err != nil { // We wrap these because we want to indicate that it wasn't found, // but also the problem we encountered trying to create it. return newNotFoundError(errors.Wrap(err, "creating field"), field) diff --git a/executor_internal_test.go b/executor_internal_test.go index 33e560716..56e4c5fff 100644 --- a/executor_internal_test.go +++ b/executor_internal_test.go @@ -46,7 +46,7 @@ func TestExecutor_TranslateRowsOnBool(t *testing.T) { Cluster: NewTestCluster(t, 1), } - idx, err := e.Holder.CreateIndex("i", IndexOptions{}) + idx, err := e.Holder.CreateIndex("i", "", IndexOptions{}) if err != nil { t.Fatalf("creating index: %v", err) } @@ -54,8 +54,8 @@ func TestExecutor_TranslateRowsOnBool(t *testing.T) { qcx := holder.Txf().NewWritableQcx() defer qcx.Abort() - fb, errb := idx.CreateField("b", OptFieldTypeBool()) - _, errbk := idx.CreateField("bk", OptFieldTypeBool(), OptFieldKeys()) + fb, errb := idx.CreateField("b", "", OptFieldTypeBool()) + _, errbk := idx.CreateField("bk", "", OptFieldTypeBool(), OptFieldKeys()) if errb != nil || errbk != nil { t.Fatalf("creating fields %v, %v", errb, errbk) } @@ -562,12 +562,12 @@ func TestDistinctTimestampUnion(t *testing.T) { func TestExecutor_DeleteRows(t *testing.T) { holder := newTestHolder(t) - idx, err := holder.CreateIndex("i", IndexOptions{TrackExistence: true}) + idx, err := holder.CreateIndex("i", "", IndexOptions{TrackExistence: true}) if err != nil { t.Fatalf("creating index: %v", err) } - f, err := idx.CreateField("f") + f, err := idx.CreateField("f", "") if err != nil { t.Fatalf("creating field: %v", err) } diff --git a/executor_test.go b/executor_test.go index d6060c178..573405774 100644 --- a/executor_test.go +++ b/executor_test.go @@ -1154,11 +1154,11 @@ func runCallTest(c *test.Cluster, t *testing.T, writeQuery string, readQueries [ } hldr := c.GetHolder(0) - index, err := hldr.CreateIndex(indexName, *indexOptions) + index, err := hldr.CreateIndex(indexName, "", *indexOptions) if err != nil { t.Fatal(err) } - _, err = index.CreateField("f", fieldOption...) + _, err = index.CreateField("f", "", fieldOption...) if err != nil { t.Fatal(err) } @@ -1444,7 +1444,7 @@ func TestExecutor_Execute_Set(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } @@ -1461,7 +1461,7 @@ func TestExecutor_Execute_Set(t *testing.T) { t.Run("ErrInvalidRowValueType", func(t *testing.T) { idx := hldr.MustCreateIndexIfNotExists(c.Idx("inokey"), pilosa.IndexOptions{}) - if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } if _, err := cmd.API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx("inokey"), Query: `Set(2, f=1.2)`}); err == nil || !strings.Contains(err.Error(), "invalid value") { @@ -1487,7 +1487,7 @@ func TestExecutor_Execute_SetBool(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeBool()); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } @@ -1533,7 +1533,7 @@ func TestExecutor_Execute_SetBool(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeBool()); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } @@ -1559,7 +1559,7 @@ func TestExecutor_Execute_SetDecimal(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeDecimal(2)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) } @@ -1596,7 +1596,7 @@ func TestExecutor_Execute_SetDecimal(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeDecimal(2)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) } @@ -1630,9 +1630,9 @@ func TestExecutor_Execute_SetValue(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) - } else if _, err := index.CreateFieldIfNotExists("xxx"); err != nil { + } else if _, err := index.CreateFieldIfNotExists("xxx", ""); err != nil { t.Fatal(err) } @@ -1671,7 +1671,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) { hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -1701,9 +1701,9 @@ func TestExecutor_Execute_SetValue(t *testing.T) { // Create fields. index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{}) - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) - } else if _, err := index.CreateFieldIfNotExists("xxx"); err != nil { + } else if _, err := index.CreateFieldIfNotExists("xxx", ""); err != nil { t.Fatal(err) } @@ -1840,11 +1840,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other"); err != nil { + } else if _, err := idx.CreateField("other", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -1884,11 +1884,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other"); err != nil { + } else if _, err := idx.CreateField("other", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("zero", f=0) @@ -1928,11 +1928,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("other", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("zero", f="zero") @@ -1974,11 +1974,11 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set columns for rows 0, 10, & 20 across two shards. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("other", pilosa.OptFieldKeys()); err != nil { + } else if _, err := idx.CreateField("other", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set("a", f="foo") @@ -2020,9 +2020,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Set data on the "f" field. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f"); err != nil { + } else if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -2045,9 +2045,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { hldr := c.GetHolder(0) // Create BSI "f" field. - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(0, 100)); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(0, 100)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: `TopN(f, n=2)`}); err == nil || !strings.Contains(err.Error(), `finding top results: mapping on primary node: cannot compute TopN() on integer, decimal, or timestamp field: "f"`) { t.Fatalf("unexpected error: %v", err) @@ -2059,9 +2059,9 @@ func TestExecutor_Execute_TopN(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - if idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}); err != nil { + if idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("f", pilosa.OptFieldTypeSet(pilosa.CacheTypeNone, 0)); err != nil { + } else if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeSet(pilosa.CacheTypeNone, 0)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: ` Set(0, f=0) @@ -2186,7 +2186,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2204,7 +2204,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeInt(test.min, test.max)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeInt(test.min, test.max)); err != nil { t.Fatal(err) } @@ -2278,7 +2278,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2322,7 +2322,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { // This extra field exists to make there be shards which are present, // but have no decimal values set, to make sure they don't break // the results. - if _, err := idx.CreateFieldIfNotExists("z"); err != nil { + if _, err := idx.CreateFieldIfNotExists("z", ""); err != nil { t.Fatal(err) } if res, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: `Set(1, z=0)`}); err != nil { @@ -2354,7 +2354,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeDecimal(test.scale, test.min, test.max)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeDecimal(test.scale, test.min, test.max)); err != nil { t.Fatal(err) } @@ -2410,7 +2410,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2427,7 +2427,7 @@ func TestExecutor_Execute_MinMax(t *testing.T) { for i, test := range tests { fld := fmt.Sprintf("f%d", i) t.Run("MinMaxField_"+fld, func(t *testing.T) { - if _, err := idx.CreateField(fld, pilosa.OptFieldTypeTimestamp(test.epoch, pilosa.TimeUnitSeconds)); err != nil { + if _, err := idx.CreateField(fld, "", pilosa.OptFieldTypeTimestamp(test.epoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) } else if _, err := c.GetNode(0).API.Query(context.Background(), &pilosa.QueryRequest{Index: c.Idx(), Query: fmt.Sprintf(`Set(10, %s="%s")`, fld, test.set.Format(time.RFC3339))}); err != nil { t.Fatal(err) @@ -2498,16 +2498,16 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -2562,16 +2562,16 @@ func TestExecutor_Execute_MinMax(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1110, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1110, 1000)); err != nil { t.Fatal(err) } @@ -2655,12 +2655,12 @@ func TestExecutor_Execute_MinMaxRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } @@ -2719,12 +2719,12 @@ func TestExecutor_Execute_MinMaxRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -2775,28 +2775,28 @@ func TestExecutor_Execute_Sum(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("dec", pilosa.OptFieldTypeDecimal(3)); err != nil { + if _, err := idx.CreateField("dec", "", pilosa.OptFieldTypeDecimal(3)); err != nil { t.Fatal(err) } @@ -2909,24 +2909,24 @@ func TestExecutor_Execute_Sum(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{Keys: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{Keys: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } @@ -2969,7 +2969,7 @@ func TestExecutor_DecimalArgs(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -2983,7 +2983,7 @@ func TestExecutor_DecimalArgs(t *testing.T) { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeDecimal(2, min, max)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeDecimal(2, min, max)); err != nil { t.Fatal(err) } @@ -3000,28 +3000,28 @@ func TestExecutor_Execute_Row_BSIGroup(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-900, 1000)); err != nil { + if _, err := idx.CreateField("edge", "", pilosa.OptFieldTypeInt(-900, 1000)); err != nil { t.Fatal(err) } @@ -3213,13 +3213,13 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } t.Run("LT", func(t *testing.T) { - if _, err := idx.CreateField("f1", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f1", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3240,7 +3240,7 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { }) t.Run("GT", func(t *testing.T) { - if _, err := idx.CreateField("f2", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f2", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3261,7 +3261,7 @@ func TestExecutor_Execute_Row_BSIGroupEdge(t *testing.T) { }) t.Run("BTWN_LT_LT", func(t *testing.T) { - if _, err := idx.CreateField("f3", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { + if _, err := idx.CreateField("f3", "", pilosa.OptFieldTypeInt(-2000, 2000)); err != nil { t.Fatal(err) } @@ -3300,28 +3300,28 @@ func TestExecutor_Execute_Range_BSIGroup_Deprecated(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f"); err != nil { + if _, err := idx.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("foo", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if _, err := idx.CreateField("foo", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("other", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { + if _, err := idx.CreateField("other", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("edge", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("edge", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } @@ -3848,7 +3848,7 @@ func TestExecutor_Time_Clear_Quantums(t *testing.T) { indexName := c.Idx(strings.ToLower(string(tt.quantum))) index := hldr.MustCreateIndexIfNotExists(indexName, pilosa.IndexOptions{}) // Create field. - if _, err := index.CreateFieldIfNotExists("f", pilosa.OptFieldTypeTime(tt.quantum, "0")); err != nil { + if _, err := index.CreateFieldIfNotExists("f", "", pilosa.OptFieldTypeTime(tt.quantum, "0")); err != nil { t.Fatal(err) } // Populate @@ -3932,7 +3932,7 @@ func TestExecutor_Execute_Existence(t *testing.T) { hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4334,7 +4334,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - fld, err := index.CreateField("f") + fld, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4426,7 +4426,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true, Keys: true}) - fld, err := index.CreateField("f") + fld, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4491,7 +4491,7 @@ func TestExecutor_Execute_All(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4519,7 +4519,7 @@ func TestExecutor_Execute_ClearRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -4535,7 +4535,7 @@ func TestExecutor_Execute_ClearRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4615,10 +4615,10 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - if _, err := index.CreateField("f"); err != nil { + if _, err := index.CreateField("f", ""); err != nil { t.Fatal(err) } - if _, err := index.CreateField("tmp"); err != nil { + if _, err := index.CreateField("tmp", ""); err != nil { t.Fatal(err) } @@ -4670,7 +4670,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) idx := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := idx.CreateField("f") + _, err := idx.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4723,7 +4723,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -4764,7 +4764,7 @@ func TestExecutor_Execute_SetRow(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{TrackExistence: true}) - if _, err := index.CreateField("f", pilosa.OptFieldKeys()); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -4828,7 +4828,7 @@ func benchmarkExistence(nn bool, b *testing.B) { index := hldr.MustCreateIndexIfNotExists(indexName, pilosa.IndexOptions{TrackExistence: nn}) // Create field. - if _, err := index.CreateFieldIfNotExists(fieldName); err != nil { + if _, err := index.CreateFieldIfNotExists(fieldName, ""); err != nil { b.Fatal(err) } @@ -6629,7 +6629,7 @@ func TestExecutor_Execute_IncludesColumn(t *testing.T) { cmd := c.GetNode(0) hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), pilosa.IndexOptions{Keys: true}) - if _, err := index.CreateField("general", pilosa.OptFieldKeys()); err != nil { + if _, err := index.CreateField("general", "", pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -6695,20 +6695,20 @@ func TestExecutor_Execute_MinMaxCountEqual(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) - idx, err := hldr.CreateIndex(c.Idx(), pilosa.IndexOptions{}) + idx, err := hldr.CreateIndex(c.Idx(), "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err := idx.CreateField("x"); err != nil { + if _, err := idx.CreateField("x", ""); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("f", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { + if _, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(-1100, 1000)); err != nil { t.Fatal(err) } - if _, err := idx.CreateField("dec", pilosa.OptFieldTypeDecimal(3)); err != nil { + if _, err := idx.CreateField("dec", "", pilosa.OptFieldTypeDecimal(3)); err != nil { t.Fatal(err) } @@ -6868,7 +6868,7 @@ func TestExecutor_Execute_NoIndex(t *testing.T) { defer c.Close() hldr := c.GetHolder(0) index := hldr.MustCreateIndexIfNotExists(c.Idx(), *indexOptions) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal("should work") } @@ -9683,11 +9683,11 @@ func TestExecutorTimeRange(t *testing.T) { } indexName := c.Idx(t.Name()) hldr := c.GetHolder(0) - index, err := hldr.CreateIndex(indexName, pilosa.IndexOptions{}) + index, err := hldr.CreateIndex(indexName, "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - _, err = index.CreateField("f") + _, err = index.CreateField("f", "") if err != nil { t.Fatal(err) } diff --git a/field.go b/field.go index 0071f8ab7..0034c517f 100644 --- a/field.go +++ b/field.go @@ -72,6 +72,7 @@ var availableShardFileFlushDuration = &protected{ type Field struct { mu sync.RWMutex createdAt int64 + owner string path string index string name string @@ -1971,6 +1972,7 @@ func (p fieldSlice) Less(i, j int) bool { return p[i].Name() < p[j].Name() } type FieldInfo struct { Name string `json:"name"` CreatedAt int64 `json:"createdAt,omitempty"` + Owner string `json:"owner"` Options FieldOptions `json:"options"` Cardinality *uint64 `json:"cardinality,omitempty"` Views []*ViewInfo `json:"views,omitempty"` diff --git a/field_test.go b/field_test.go index f475bd303..8b4b5a049 100644 --- a/field_test.go +++ b/field_test.go @@ -21,7 +21,7 @@ func TestField_SetValue(t *testing.T) { t.Run("OK", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -62,7 +62,7 @@ func TestField_SetValue(t *testing.T) { t.Run("Overwrite", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -97,7 +97,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupNotFound", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f") + f, err := idx.CreateField("f", "") if err != nil { t.Fatal(err) } @@ -114,7 +114,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupValueTooLow", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(20, 30)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(20, 30)) if err != nil { t.Fatal(err) } @@ -129,7 +129,7 @@ func TestField_SetValue(t *testing.T) { t.Run("ErrBSIGroupValueTooHigh", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(20, 30)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(20, 30)) if err != nil { t.Fatal(err) } @@ -169,13 +169,13 @@ func TestField_NameValidation(t *testing.T) { _, idx := test.MustOpenIndex(t) for _, name := range validFieldNames { - _, err := idx.CreateField(name) + _, err := idx.CreateField(name, "") if err != nil { t.Fatalf("unexpected field name: %s %s", name, err) } } for _, name := range invalidFieldNames { - _, err := idx.CreateField(name) + _, err := idx.CreateField(name, "") if err == nil { t.Fatalf("expected error on field name: %s", name) } @@ -188,7 +188,7 @@ const includeRemote = false // for calls to Index.AvailableShards(localOnly bool func TestField_AvailableShards(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("fld-shards") + f, err := idx.CreateField("fld-shards", "") if err != nil { t.Fatal(err) } @@ -229,7 +229,7 @@ func TestField_ClearValue(t *testing.T) { t.Run("OK", func(t *testing.T) { h, idx := test.MustOpenIndex(t) - f, err := idx.CreateField("f", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateField("f", "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { t.Fatal(err) } @@ -290,7 +290,7 @@ func TestFieldInfoMarshal(t *testing.T) { if err != nil { t.Fatalf("unexpected error marshalling index info, %v", err) } - expected := []byte(`{"name":"timestamp","createdAt":1649270079233541000,"options":{"type":"timestamp","epoch":"1970-01-01T00:00:00Z","bitDepth":0,"min":-4294967296,"max":4294967296,"timeUnit":"s"}}`) + expected := []byte(`{"name":"timestamp","createdAt":1649270079233541000,"owner":"","options":{"type":"timestamp","epoch":"1970-01-01T00:00:00Z","bitDepth":0,"min":-4294967296,"max":4294967296,"timeUnit":"s"}}`) if !bytes.Equal(a, expected) { t.Fatalf("expected %s, got %s", expected, a) } diff --git a/fragment_internal_test.go b/fragment_internal_test.go index 28b6cf12e..b6d507b4b 100644 --- a/fragment_internal_test.go +++ b/fragment_internal_test.go @@ -1330,7 +1330,7 @@ func TestFragment_TopN_CacheSize(t *testing.T) { index := mustOpenIndex(t, IndexOptions{}) // Create field. - field, err := index.CreateFieldIfNotExists("f", OptFieldTypeSet(CacheTypeRanked, cacheSize)) + field, err := index.CreateFieldIfNotExists("f", "", OptFieldTypeSet(CacheTypeRanked, cacheSize)) if err != nil { t.Fatal(err) } @@ -3086,11 +3086,11 @@ func newTestField(tb testing.TB, fieldOpts ...FieldOption) (*Holder, *Index, *Fi fieldOpts = []FieldOption{OptFieldTypeDefault()} } h := newTestHolder(tb) - idx, err := h.CreateIndex("i", IndexOptions{}) + idx, err := h.CreateIndex("i", "", IndexOptions{}) if err != nil { tb.Fatalf("creating test index: %v", err) } - fld, err := idx.CreateField("f", fieldOpts...) + fld, err := idx.CreateField("f", "", fieldOpts...) if err != nil { tb.Fatalf("creating test field: %v", err) } diff --git a/go.mod b/go.mod index 91ff1cd69..0202952cd 100644 --- a/go.mod +++ b/go.mod @@ -82,6 +82,7 @@ require ( github.com/jaffee/commandeer v0.5.0 github.com/linkedin/goavro/v2 v2.11.1 google.golang.org/grpc v1.46.0 + google.golang.org/protobuf v1.28.0 ) require ( @@ -166,7 +167,6 @@ require ( golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220503193339-ba3ae3f07e29 // indirect - google.golang.org/protobuf v1.28.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/holder.go b/holder.go index 74ccd9a8a..d140fad12 100644 --- a/holder.go +++ b/holder.go @@ -435,14 +435,17 @@ func (h *Holder) Open() error { return errors.Wrap(err, "opening index") } - // Since we don't have createdAt stored on disk within the data + // Since we don't have createdAt and the other metadata stored on disk within the data // directory, we need to populate it from the etcd schema data. + // TODO: we may no longer need the createdAt value stored in memory on // the index struct; it may only be needed in the schema return value // from the API, which already comes from etcd. In that case, this logic // could be removed, and the createdAt on the index struct could be // removed. index.createdAt = cim.CreatedAt + index.owner = cim.Owner + index.description = cim.Meta.Description err = index.OpenWithSchema(idx) if err != nil { @@ -677,10 +680,13 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e di := &IndexInfo{ Name: cim.Index, CreatedAt: cim.CreatedAt, + Owner: cim.Owner, Options: cim.Meta, ShardWidth: ShardWidth, Fields: make([]*FieldInfo, 0, len(index.Fields)), } + updatedAt := cim.CreatedAt + lastUpdateUser := cim.Owner for fieldName, field := range index.Fields { if fieldName == existenceFieldName { continue @@ -689,9 +695,14 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e if err != nil { return nil, errors.Wrap(err, "decoding CreateFieldMessage") } + if cfm.CreatedAt > updatedAt { + updatedAt = cfm.CreatedAt + lastUpdateUser = cfm.Owner + } fi := &FieldInfo{ Name: cfm.Field, CreatedAt: cfm.CreatedAt, + Owner: cfm.Owner, Options: *cfm.Meta, } if includeViews { @@ -702,6 +713,8 @@ func (h *Holder) schema(ctx context.Context, includeViews bool) ([]*IndexInfo, e } di.Fields = append(di.Fields, fi) } + di.UpdatedAt = updatedAt + di.LastUpdateUser = lastUpdateUser sort.Sort(fieldInfoSlice(di.Fields)) a = append(a, di) } @@ -715,14 +728,14 @@ func (h *Holder) applySchema(schema *Schema) error { // We use h.CreateIndex() instead of h.CreateIndexIfNotExists() because we // want to limit the use of this method for now to only new indexes. for _, i := range schema.Indexes { - idx, err := h.CreateIndex(i.Name, i.Options) + idx, err := h.CreateIndex(i.Name, i.Owner, i.Options) if err != nil { return errors.Wrap(err, "creating index") } // Create fields that don't exist. for _, f := range i.Fields { - fld, err := idx.CreateFieldIfNotExistsWithOptions(f.Name, &f.Options) + fld, err := idx.CreateFieldIfNotExistsWithOptions(f.Name, "", &f.Options) if err != nil { return errors.Wrap(err, "creating field") } @@ -774,7 +787,7 @@ func (h *Holder) Indexes() []*Index { // CreateIndex creates an index. // An error is returned if the index already exists. -func (h *Holder) CreateIndex(name string, opt IndexOptions) (*Index, error) { +func (h *Holder) CreateIndex(name string, requestUserID string, opt IndexOptions) (*Index, error) { h.mu.Lock() defer h.mu.Unlock() @@ -783,9 +796,11 @@ func (h *Holder) CreateIndex(name string, opt IndexOptions) (*Index, error) { return nil, newConflictError(ErrIndexExists) } + ts := timestamp() cim := &CreateIndexMessage{ Index: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -873,13 +888,15 @@ func (h *Holder) CreateIndexAndBroadcast(ctx context.Context, cim *CreateIndexMe // CreateIndexIfNotExists returns an index by name. // The index is created if it does not already exist. -func (h *Holder) CreateIndexIfNotExists(name string, opt IndexOptions) (*Index, error) { +func (h *Holder) CreateIndexIfNotExists(name string, requestUserID string, opt IndexOptions) (*Index, error) { h.mu.Lock() defer h.mu.Unlock() + ts := timestamp() cim := &CreateIndexMessage{ Index: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -930,6 +947,8 @@ func (h *Holder) createIndex(cim *CreateIndexMessage, broadcast bool) (*Index, e index.keys = cim.Meta.Keys index.trackExistence = cim.Meta.TrackExistence index.createdAt = cim.CreatedAt + index.owner = cim.Owner + index.description = cim.Meta.Description if err = index.Open(); err != nil { return nil, errors.Wrap(err, "opening") diff --git a/holder_internal_test.go b/holder_internal_test.go index fdbe8c310..d22ae820b 100644 --- a/holder_internal_test.go +++ b/holder_internal_test.go @@ -6,11 +6,11 @@ import ( ) func setupTest(t *testing.T, h *Holder, rowCol []rowCols, indexName string) (*Index, *Field) { - idx, err := h.CreateIndexIfNotExists(indexName, IndexOptions{TrackExistence: true}) + idx, err := h.CreateIndexIfNotExists(indexName, "", IndexOptions{TrackExistence: true}) if err != nil { t.Fatalf("failed to create index %v: %v", indexName, err) } - f, err := idx.CreateFieldIfNotExists("f") + f, err := idx.CreateFieldIfNotExists("f", "") if err != nil { t.Fatalf("failed to create field in index %v: %v", indexName, err) } diff --git a/holder_test.go b/holder_test.go index 4dae67907..e3137094d 100644 --- a/holder_test.go +++ b/holder_test.go @@ -31,7 +31,7 @@ func TestHolder_Open(t *testing.T) { // no automatic close here, because we manually close this, and then // *fail* to reopen it. - if _, err := h.CreateIndex("test", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("test", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } else if err := h.Close(); err != nil { t.Fatal(err) @@ -50,10 +50,10 @@ func TestHolder_Open(t *testing.T) { t.Run("ErrForeignIndexNotFound", func(t *testing.T) { h := test.MustOpenHolder(t) - if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } else { - _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("nonexistent")) + _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("nonexistent")) if err == nil { t.Fatalf("expected error: %s", pilosa.ErrForeignIndexNotFound) } else if errors.Cause(err) != pilosa.ErrForeignIndexNotFound { @@ -66,11 +66,11 @@ func TestHolder_Open(t *testing.T) { t.Run("ForeignIndexNotOpenYet", func(t *testing.T) { h := test.MustOpenHolder(t) - if _, err := h.CreateIndex("zzz", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("zzz", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + } else if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("zzz")); err != nil { + } else if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("zzz")); err != nil { t.Fatal(err) } else if err := h.Holder.Close(); err != nil { t.Fatal(err) @@ -85,11 +85,11 @@ func TestHolder_Open(t *testing.T) { t.Run("ForeignIndexIsOpen", func(t *testing.T) { h := test.MustOpenHolder(t) - if _, err := h.CreateIndex("aaa", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("aaa", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if idx, err := h.CreateIndex("foo", pilosa.IndexOptions{}); err != nil { + } else if idx, err := h.CreateIndex("foo", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) - } else if _, err := idx.CreateField("bar", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("aaa")); err != nil { + } else if _, err := idx.CreateField("bar", "", pilosa.OptFieldTypeInt(0, 100), pilosa.OptFieldForeignIndex("aaa")); err != nil { t.Fatal(err) } else if err := h.Holder.Close(); err != nil { t.Fatal(err) @@ -104,18 +104,18 @@ func TestHolder_Open(t *testing.T) { t.Run("CreateIndexIfNotExists", func(t *testing.T) { h := test.MustOpenHolder(t) - idx1, err := h.CreateIndexIfNotExists("aaa", pilosa.IndexOptions{}) + idx1, err := h.CreateIndexIfNotExists("aaa", "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } - if _, err = h.CreateIndex("aaa", pilosa.IndexOptions{}); err == nil { + if _, err = h.CreateIndex("aaa", "", pilosa.IndexOptions{}); err == nil { t.Fatalf("expected: ConflictError, got: nil") } else if _, ok := err.(pilosa.ConflictError); !ok { t.Fatalf("expected: ConflictError, got: %s", err) } - idx2, err := h.CreateIndexIfNotExists("aaa", pilosa.IndexOptions{}) + idx2, err := h.CreateIndexIfNotExists("aaa", "", pilosa.IndexOptions{}) if err != nil { t.Fatal(err) } @@ -135,7 +135,7 @@ func TestHolder_HasData(t *testing.T) { t.Fatal("expected HasData to return false, no err, but", ok, err) } - if _, err := h.CreateIndex("test", pilosa.IndexOptions{}); err != nil { + if _, err := h.CreateIndex("test", "", pilosa.IndexOptions{}); err != nil { t.Fatal(err) } diff --git a/http_handler.go b/http_handler.go index dc2890782..f26a3074b 100644 --- a/http_handler.go +++ b/http_handler.go @@ -48,6 +48,18 @@ import ( "github.com/zeebo/blake3" ) +type ContextRequestUserIdKeyType string + +const ( + // ContextRequestUserIdKey is request userid key for a request ctx + ContextRequestUserIdKey = ContextRequestUserIdKeyType("request-user-id") +) + +const ( + // HeaderRequestUserID is request userid header + HeaderRequestUserID = "X-Request-Userid" +) + // Handler represents an HTTP handler. type Handler struct { Handler http.Handler @@ -691,34 +703,52 @@ func (h *Handler) chkAllowedNetworks(r *http.Request) (bool, context.Context) { func (h *Handler) chkAuthN(handler http.HandlerFunc) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { ctx := r.Context() - if h.auth != nil { - // if IP is in allowed networks, then serve the request - allowedNetwork, ctx := h.chkAllowedNetworks(r) - if allowedNetwork { - handler.ServeHTTP(w, r.WithContext(ctx)) - return - } - access, refresh := getTokens(r) - uinfo, err := h.auth.Authenticate(access, refresh) - if err != nil { - http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusUnauthorized) - return - } - // just in case it got refreshed - ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) - ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) - h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) + //if the request is unauthenticated and we have the appropriate header get the userid from the header + requestUserID := r.Header.Get(HeaderRequestUserID) + ctx = context.WithValue(ctx, ContextRequestUserIdKey, requestUserID) + + if h.auth == nil { + handler.ServeHTTP(w, r.WithContext(ctx)) + return } + + // if IP is in allowed networks, then serve the request + allowedNetwork, ctx := h.chkAllowedNetworks(r) + if allowedNetwork { + handler.ServeHTTP(w, r.WithContext(ctx)) + return + } + + access, refresh := getTokens(r) + uinfo, err := h.auth.Authenticate(access, refresh) + if err != nil { + http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusUnauthorized) + return + } + // prefer the user id from an authenticated request over one in a header + ctx = context.WithValue(ctx, ContextRequestUserIdKey, uinfo.UserID) + + // just in case it got refreshed + ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) + ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) + h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) + handler.ServeHTTP(w, r.WithContext(ctx)) } } func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - // if auth isn't turned on, just serve the request + ctx := r.Context() + + //if the request is unauthenticated and we have the appropriate header get the userid from the header + requestUserID := r.Header.Get(HeaderRequestUserID) + ctx = context.WithValue(ctx, ContextRequestUserIdKey, requestUserID) + + // handle the case when auth is not turned on if h.auth == nil { - handler.ServeHTTP(w, r) + handler.ServeHTTP(w, r.WithContext(ctx)) return } @@ -737,19 +767,22 @@ func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http access, refresh := getTokens(r) uinfo, err := h.auth.Authenticate(access, refresh) - - ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) - ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) - if err != nil { http.Error(w, errors.Wrap(err, "authenticating").Error(), http.StatusForbidden) return } + + // prefer the user id from an authenticated request over one in a header + ctx = context.WithValue(ctx, ContextRequestUserIdKey, uinfo.UserID) + + ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+access) + ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, refresh) + // just in case it got refreshed h.auth.SetCookie(w, uinfo.Token, uinfo.RefreshToken, uinfo.Expiry) // put the user's authN/Z info in the context - ctx = context.WithValue(r.Context(), contextKeyGroupMembership, uinfo.Groups) + ctx = context.WithValue(ctx, contextKeyGroupMembership, uinfo.Groups) ctx = context.WithValue(ctx, authn.ContextValueAccessToken, "Bearer "+uinfo.Token) ctx = context.WithValue(ctx, authn.ContextValueRefreshToken, uinfo.RefreshToken) // unlikely h.permissions will be nil, but we'll check to be safe @@ -827,7 +860,6 @@ func (h *Handler) chkAuthZ(handler http.HandlerFunc, perm authz.Permission) http } } handler.ServeHTTP(w, r.WithContext(ctx)) - } } @@ -879,7 +911,7 @@ func newStatikHandler(h *Handler) statikHandler { func (s statikHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if strings.HasPrefix(r.UserAgent(), "curl") { - msg := "Welcome. FeatureBase v" + s.handler.api.Version() + " is running. Visit https://docs.molecula.cloud for more information." + msg := "Welcome. FeatureBase v" + s.handler.api.Version() + " is running. Visit https://docs.featurebase.com for more information." if s.statikFS != nil { msg += " Try the Web UI by visiting this URL in your browser." } @@ -1702,6 +1734,7 @@ func (p *postIndexRequest) UnmarshalJSON(b []byte) error { // Unmarshal expected values. _p := _postIndexRequest{ Options: IndexOptions{ + Description: "", Keys: false, TrackExistence: true, }, @@ -1787,6 +1820,7 @@ func (h *Handler) handlePostIndex(w http.ResponseWriter, r *http.Request) { // Decode request. req := postIndexRequest{ Options: IndexOptions{ + Description: "", Keys: false, TrackExistence: true, }, diff --git a/http_translator_test.go b/http_translator_test.go index 7ea7cbb23..e6a0b832d 100644 --- a/http_translator_test.go +++ b/http_translator_test.go @@ -25,7 +25,7 @@ func TestTranslateStore_EntryReader(t *testing.T) { hldr := test.Holder{Holder: primary.Server.Holder()} index := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{Keys: true}) - _, err := index.CreateField("f") + _, err := index.CreateField("f", "") if err != nil { t.Fatal(err) } diff --git a/index.go b/index.go index 0aa5d6dc1..744c5d526 100644 --- a/index.go +++ b/index.go @@ -23,8 +23,11 @@ import ( // Index represents a container for fields. type Index struct { - mu sync.RWMutex - createdAt int64 + mu sync.RWMutex + createdAt int64 + owner string + description string + path string name string qualifiedName string @@ -147,6 +150,7 @@ func (i *Index) Options() IndexOptions { func (i *Index) options() IndexOptions { return IndexOptions{ + Description: i.description, Keys: i.keys, TrackExistence: i.trackExistence, } @@ -347,6 +351,7 @@ func (i *Index) openExistenceField() error { cfm := &CreateFieldMessage{ Index: i.name, Field: existenceFieldName, + Owner: "", CreatedAt: 0, Meta: &FieldOptions{Type: FieldTypeSet, CacheType: CacheTypeNone, CacheSize: 0}, } @@ -523,7 +528,7 @@ func (i *Index) recalculateCaches() { } // CreateField creates a field. -func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { +func (i *Index) CreateField(name string, requestUserID string, opts ...FieldOption) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -552,10 +557,12 @@ func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { return nil, errors.Wrap(err, "applying option") } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: fo, } @@ -584,7 +591,7 @@ func (i *Index) CreateField(name string, opts ...FieldOption) (*Field, error) { } // CreateFieldIfNotExists creates a field with the given options if it doesn't exist. -func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field, error) { +func (i *Index) CreateFieldIfNotExists(name string, requestUserID string, opts ...FieldOption) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -604,10 +611,12 @@ func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field return nil, errors.Wrap(err, "applying option") } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: fo, } @@ -628,7 +637,7 @@ func (i *Index) CreateFieldIfNotExists(name string, opts ...FieldOption) (*Field // function options, taking a *FieldOptions struct. TODO: This should // definintely be refactored so we don't have these virtually equivalent // methods, but I'm puttin this here for now just to see if it works. -func (i *Index) CreateFieldIfNotExistsWithOptions(name string, opt *FieldOptions) (*Field, error) { +func (i *Index) CreateFieldIfNotExistsWithOptions(name string, requestUserID string, opt *FieldOptions) (*Field, error) { err := ValidateName(name) if err != nil { return nil, errors.Wrap(err, "validating name") @@ -679,10 +688,12 @@ func (i *Index) CreateFieldIfNotExistsWithOptions(name string, opt *FieldOptions } } + ts := timestamp() cfm := &CreateFieldMessage{ Index: i.name, Field: name, - CreatedAt: timestamp(), + CreatedAt: ts, + Owner: requestUserID, Meta: opt, } @@ -711,7 +722,7 @@ func (i *Index) persistField(ctx context.Context, cfm *CreateFieldMessage) error } if b, err := i.serializer.Marshal(cfm); err != nil { - return errors.Wrap(err, "marshaling") + return errors.Wrap(err, "marshaling field") } else if err := i.holder.Schemator.CreateField(ctx, cfm.Index, cfm.Field, b); errors.Cause(err) == disco.ErrFieldExists { return ErrFieldExists } else if err != nil { @@ -728,7 +739,7 @@ func (i *Index) persistUpdateField(ctx context.Context, cfm *CreateFieldMessage) } if b, err := i.serializer.Marshal(cfm); err != nil { - return errors.Wrap(err, "marshaling") + return errors.Wrap(err, "marshaling field") } else if err := i.holder.Schemator.UpdateField(ctx, cfm.Index, cfm.Field, b); errors.Cause(err) == disco.ErrFieldDoesNotExist { return ErrFieldNotFound } else if err != nil { @@ -737,7 +748,7 @@ func (i *Index) persistUpdateField(ctx context.Context, cfm *CreateFieldMessage) return nil } -func (i *Index) UpdateField(ctx context.Context, name string, update FieldUpdate) (*CreateFieldMessage, error) { +func (i *Index) UpdateField(ctx context.Context, name string, requestUserID string, update FieldUpdate) (*CreateFieldMessage, error) { // Get field from etcd buf, err := i.holder.Schemator.Field(ctx, i.name, name) if err != nil { @@ -782,6 +793,9 @@ func (i *Index) UpdateField(ctx context.Context, name string, update FieldUpdate return nil, errors.Wrap(err, "persisting updated field") } + i.mu.Lock() + defer i.mu.Unlock() + return cfm, nil } @@ -842,6 +856,7 @@ func (i *Index) createField(cfm *CreateFieldMessage) (*Field, error) { return nil, errors.Wrap(err, "initializing") } f.createdAt = cfm.CreatedAt + f.owner = cfm.Owner // Pass holder through to the field for use in looking // up a foreign index. @@ -927,11 +942,14 @@ func (p indexSlice) Less(i, j int) bool { return p[i].Name() < p[j].Name() } // IndexInfo represents schema information for an index. type IndexInfo struct { - Name string `json:"name"` - CreatedAt int64 `json:"createdAt,omitempty"` - Options IndexOptions `json:"options"` - Fields []*FieldInfo `json:"fields"` - ShardWidth uint64 `json:"shardWidth"` + Name string `json:"name"` + CreatedAt int64 `json:"createdAt,omitempty"` + UpdatedAt int64 `json:"updatedAt"` + Owner string `json:"owner"` + LastUpdateUser string `json:"lastUpdatedUser"` + Options IndexOptions `json:"options"` + Fields []*FieldInfo `json:"fields"` + ShardWidth uint64 `json:"shardWidth"` } // Field returns the FieldInfo the provided field name. If the field does not @@ -953,9 +971,10 @@ func (p indexInfoSlice) Less(i, j int) bool { return p[i].Name < p[j].Name } // IndexOptions represents options to set when initializing an index. type IndexOptions struct { - Keys bool `json:"keys"` - TrackExistence bool `json:"trackExistence"` - PartitionN int `json:"partitionN"` + Keys bool `json:"keys"` + TrackExistence bool `json:"trackExistence"` + PartitionN int `json:"partitionN"` + Description string `json:"description"` } type importData struct { diff --git a/index_internal_test.go b/index_internal_test.go index 6b6afb776..6915bb385 100644 --- a/index_internal_test.go +++ b/index_internal_test.go @@ -8,7 +8,7 @@ import ( // mustOpenIndex returns a new, opened index at a temporary path. Panic on error. func mustOpenIndex(tb testing.TB, opt IndexOptions) *Index { h := newTestHolder(tb) - index, err := h.CreateIndex("i", opt) + index, err := h.CreateIndex("i", "", opt) if err != nil { panic(err) diff --git a/index_test.go b/index_test.go index 01aecfa81..529633880 100644 --- a/index_test.go +++ b/index_test.go @@ -25,7 +25,7 @@ func TestIndex_CreateFieldIfNotExists(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field. - f, err := index.CreateFieldIfNotExists("f") + f, err := index.CreateFieldIfNotExists("f", "") if err != nil { t.Fatal(err) } else if f == nil { @@ -33,7 +33,7 @@ func TestIndex_CreateFieldIfNotExists(t *testing.T) { } // Retrieve existing field. - other, err := index.CreateFieldIfNotExists("f") + other, err := index.CreateFieldIfNotExists("f", "") if err != nil { t.Fatal(err) } else if f.Field != other.Field { @@ -52,7 +52,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with explicit quantum. - f, err := index.CreateField("f", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")) + f, err := index.CreateField("f", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")) if err != nil { t.Fatal(err) } else if q := f.TimeQuantum(); q != pilosa.TimeQuantum("YMDH") { @@ -67,7 +67,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with explicit quantum with no standard view - f, err := index.CreateField("f", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0", true)) + f, err := index.CreateField("f", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0", true)) if err != nil { t.Fatal(err) } else if q := f.TimeQuantum(); q != pilosa.TimeQuantum("YMDH") { @@ -82,7 +82,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with schema and verify it exists. - if f, err := index.CreateField("f", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { + if f, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(-990, 1000)); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(f.Type(), pilosa.FieldTypeInt) { t.Fatalf("unexpected type: %#v", f.Type()) @@ -100,7 +100,7 @@ func TestIndex_CreateField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field with schema and verify it exists. - if f, err := index.CreateField("f", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { + if f, err := index.CreateField("f", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, pilosa.TimeUnitSeconds)); err != nil { t.Fatal(err) } else if !reflect.DeepEqual(f.Type(), pilosa.FieldTypeTimestamp) { t.Fatalf("unexpected type: %#v", f.Type()) @@ -192,7 +192,7 @@ func TestIndex_CreateField(t *testing.T) { t.Run("IntField", func(t *testing.T) { _, index := test.MustOpenIndex(t) - _, err := index.CreateField("f", pilosa.OptFieldTypeInt(-1, 1), pilosa.OptFieldKeys()) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(-1, 1), pilosa.OptFieldKeys()) if errors.Cause(err) != pilosa.ErrIntFieldWithKeys { t.Fatal("int field cannot be created with keys=true") } @@ -202,7 +202,7 @@ func TestIndex_CreateField(t *testing.T) { t.Run("DecimalField", func(t *testing.T) { _, index := test.MustOpenIndex(t) - _, err := index.CreateField("f", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-1, 0), pql.NewDecimal(1, 0)), pilosa.OptFieldKeys()) + _, err := index.CreateField("f", "", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-1, 0), pql.NewDecimal(1, 0)), pilosa.OptFieldKeys()) if errors.Cause(err) != pilosa.ErrDecimalFieldWithKeys { t.Fatal("decimal field cannot be created with keys=true") } @@ -215,7 +215,7 @@ func TestIndex_DeleteField(t *testing.T) { _, index := test.MustOpenIndex(t) // Create field. - if _, err := index.CreateFieldIfNotExists("f"); err != nil { + if _, err := index.CreateFieldIfNotExists("f", ""); err != nil { t.Fatal(err) } @@ -262,7 +262,7 @@ func TestIndex_RecreateFieldOnRestart(t *testing.T) { // create index indexName := fmt.Sprintf("idx_%d", rand.Uint64()) holder := c.GetHolder(0) - _, err := holder.CreateIndex(indexName, pilosa.IndexOptions{ + _, err := holder.CreateIndex(indexName, "", pilosa.IndexOptions{ Keys: false, }) if err != nil { diff --git a/internal_client_test.go b/internal_client_test.go index 2bd248e75..048e278a7 100644 --- a/internal_client_test.go +++ b/internal_client_test.go @@ -853,7 +853,7 @@ func TestClient_ImportKeys(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(cluster.Idx(), pilosa.IndexOptions{Keys: true}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -932,7 +932,7 @@ func TestClient_ImportIDs(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{Keys: false}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-10000, 10000)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-10000, 10000)) if err != nil { t.Fatal(err) } @@ -1000,7 +1000,7 @@ func TestClient_ImportValue(t *testing.T) { // Load bitmap into cache to ensure cache gets updated. index := hldr.MustCreateIndexIfNotExists(cluster.Idx(), pilosa.IndexOptions{}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -1111,7 +1111,7 @@ func TestClient_ImportExistence(t *testing.T) { fldName := "fset" index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateFieldIfNotExists(fldName) + _, err := index.CreateFieldIfNotExists(fldName, "") if err != nil { t.Fatal(err) } @@ -1147,7 +1147,7 @@ func TestClient_ImportExistence(t *testing.T) { fldName := "fint" index := hldr.MustCreateIndexIfNotExists(idxName, pilosa.IndexOptions{TrackExistence: true}) - _, err := index.CreateFieldIfNotExists(fldName, pilosa.OptFieldTypeInt(-100, 100)) + _, err := index.CreateFieldIfNotExists(fldName, "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } diff --git a/pb/private.pb.go b/pb/private.pb.go index 1a19dab20..79f87afae 100644 --- a/pb/private.pb.go +++ b/pb/private.pb.go @@ -25,6 +25,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type IndexMeta struct { Keys bool `protobuf:"varint,3,opt,name=Keys,proto3" json:"Keys,omitempty"` TrackExistence bool `protobuf:"varint,4,opt,name=TrackExistence,proto3" json:"TrackExistence,omitempty"` + Description string `protobuf:"bytes,5,opt,name=Description,proto3" json:"Description,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -77,6 +78,13 @@ func (m *IndexMeta) GetTrackExistence() bool { return false } +func (m *IndexMeta) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + type FieldOptions struct { Type string `protobuf:"bytes,8,opt,name=Type,proto3" json:"Type,omitempty"` CacheType string `protobuf:"bytes,3,opt,name=CacheType,proto3" json:"CacheType,omitempty"` @@ -633,6 +641,7 @@ type CreateIndexMessage struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Meta *IndexMeta `protobuf:"bytes,2,opt,name=Meta,proto3" json:"Meta,omitempty"` CreatedAt int64 `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=Owner,proto3" json:"Owner,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -692,11 +701,19 @@ func (m *CreateIndexMessage) GetCreatedAt() int64 { return 0 } +func (m *CreateIndexMessage) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + type CreateFieldMessage struct { Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"` Field string `protobuf:"bytes,2,opt,name=Field,proto3" json:"Field,omitempty"` Meta *FieldOptions `protobuf:"bytes,3,opt,name=Meta,proto3" json:"Meta,omitempty"` CreatedAt int64 `protobuf:"varint,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` + Owner string `protobuf:"bytes,5,opt,name=Owner,proto3" json:"Owner,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -763,6 +780,13 @@ func (m *CreateFieldMessage) GetCreatedAt() int64 { return 0 } +func (m *CreateFieldMessage) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + type UpdateFieldMessage struct { CreateFieldMessage *CreateFieldMessage `protobuf:"bytes,1,opt,name=CreateFieldMessage,proto3" json:"CreateFieldMessage,omitempty"` Update *FieldUpdate `protobuf:"bytes,2,opt,name=Update,proto3" json:"Update,omitempty"` @@ -2879,114 +2903,115 @@ func init() { func init() { proto.RegisterFile("private.proto", fileDescriptor_d2a91b51c7bdc125) } var fileDescriptor_d2a91b51c7bdc125 = []byte{ - // 1701 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4b, 0x6f, 0x23, 0x4b, - 0x15, 0xa6, 0x1f, 0xf1, 0xe3, 0x38, 0xce, 0x38, 0x75, 0xc3, 0xd0, 0x93, 0x3b, 0x44, 0x9e, 0x02, - 0xcd, 0x98, 0x91, 0x08, 0x22, 0x77, 0x71, 0x11, 0x77, 0x73, 0x27, 0x76, 0x66, 0x30, 0xf7, 0xce, - 0xe3, 0x56, 0x1e, 0x4b, 0x50, 0xa5, 0x5d, 0x4a, 0x5a, 0x69, 0x77, 0x9b, 0xee, 0x76, 0xc6, 0x9e, - 0x05, 0x12, 0x08, 0x04, 0x1b, 0xf6, 0xac, 0xf8, 0x17, 0xfc, 0x01, 0x56, 0x6c, 0x90, 0xf8, 0x09, - 0x68, 0xf8, 0x23, 0xa8, 0x4e, 0x55, 0x75, 0x97, 0x1d, 0x27, 0x86, 0x88, 0x5d, 0x9f, 0xef, 0x9c, - 0x3a, 0xef, 0x3a, 0x75, 0x6c, 0x68, 0x4f, 0xb2, 0xe8, 0x9a, 0x17, 0x62, 0x7f, 0x92, 0xa5, 0x45, - 0x4a, 0xdc, 0xc9, 0xf9, 0xee, 0xe6, 0x64, 0x7a, 0x1e, 0x47, 0xa1, 0x42, 0xe8, 0x2b, 0x68, 0x0e, - 0x93, 0x91, 0x98, 0xbd, 0x16, 0x05, 0x27, 0x04, 0xfc, 0xaf, 0xc4, 0x3c, 0x0f, 0xbc, 0xae, 0xd3, - 0x6b, 0x30, 0xfc, 0x26, 0x4f, 0x61, 0xeb, 0x24, 0xe3, 0xe1, 0xd5, 0xd1, 0x2c, 0xca, 0x0b, 0x91, - 0x84, 0x22, 0xf0, 0x91, 0xbb, 0x84, 0xd2, 0xbf, 0x79, 0xb0, 0xf9, 0x32, 0x12, 0xf1, 0xe8, 0xed, - 0xa4, 0x88, 0xd2, 0x24, 0x97, 0xca, 0x4e, 0xe6, 0x13, 0x11, 0x34, 0xba, 0x4e, 0xaf, 0xc9, 0xf0, - 0x9b, 0x3c, 0x86, 0x66, 0x9f, 0x87, 0x97, 0x02, 0x19, 0x1e, 0x32, 0x2a, 0xa0, 0xe4, 0x1e, 0x47, - 0x1f, 0x94, 0x95, 0x36, 0xab, 0x00, 0xd2, 0x85, 0xd6, 0x49, 0x34, 0x16, 0xdf, 0x4c, 0x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0xfc, 0xf9, 0xdf, 0x7b, - 0xdf, 0x3a, 0xaf, 0xe1, 0xff, 0x5e, 0x9f, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x76, 0x11, 0x06, - 0x2f, 0x1a, 0x13, 0x00, 0x00, + // 1728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0xa7, 0xff, 0xc4, 0x7f, 0x9e, 0xe3, 0x8c, 0x53, 0x1b, 0x86, 0x9e, 0xec, 0x10, 0x79, 0x0a, + 0x34, 0x63, 0x46, 0x22, 0x88, 0xec, 0x61, 0x11, 0x7b, 0xd9, 0x89, 0x9d, 0x59, 0xcc, 0xee, 0xcc, + 0x64, 0x2b, 0x7f, 0x8e, 0xa0, 0x4a, 0xbb, 0x94, 0xb4, 0xd2, 0xee, 0x36, 0xdd, 0xed, 0xc4, 0xde, + 0x03, 0x12, 0x48, 0x08, 0x2e, 0xdc, 0x11, 0x07, 0xbe, 0x05, 0x5f, 0x80, 0x13, 0x17, 0x24, 0x3e, + 0x02, 0x1a, 0xbe, 0x08, 0xaa, 0x57, 0x55, 0xdd, 0x65, 0xc7, 0x49, 0x86, 0x68, 0x6f, 0xfd, 0x7e, + 0xaf, 0xfa, 0xd5, 0xef, 0xfd, 0xa9, 0x57, 0xaf, 0x1b, 0xda, 0x93, 0x2c, 0xba, 0xe2, 0x85, 0xd8, + 0x9d, 0x64, 0x69, 0x91, 0x12, 0x77, 0x72, 0xb6, 0xbd, 0x3e, 0x99, 0x9e, 0xc5, 0x51, 0xa8, 0x10, + 0x1a, 0x41, 0x73, 0x98, 0x8c, 0xc4, 0xec, 0x8d, 0x28, 0x38, 0x21, 0xe0, 0x7f, 0x29, 0xe6, 0x79, + 0xe0, 0x75, 0x9d, 0x5e, 0x83, 0xe1, 0x33, 0x79, 0x0e, 0x1b, 0xc7, 0x19, 0x0f, 0x2f, 0x0f, 0x66, + 0x51, 0x5e, 0x88, 0x24, 0x14, 0x81, 0x8f, 0xda, 0x25, 0x94, 0x74, 0xa1, 0x35, 0x10, 0x79, 0x98, + 0x45, 0x93, 0x22, 0x4a, 0x93, 0x60, 0xad, 0xeb, 0xf4, 0x9a, 0xcc, 0x86, 0xe8, 0x3f, 0x3c, 0x58, + 0x7f, 0x1d, 0x89, 0x78, 0xf4, 0x0e, 0xe5, 0x5c, 0x6e, 0x77, 0x3c, 0x9f, 0x88, 0xa0, 0x81, 0x6b, + 0xf1, 0x99, 0x3c, 0x85, 0x66, 0x9f, 0x87, 0x17, 0x02, 0x15, 0x1e, 0x2a, 0x2a, 0xa0, 0xd4, 0x1e, + 0x45, 0xdf, 0x28, 0x1e, 0x6d, 0x56, 0x01, 0x92, 0xc2, 0x71, 0x34, 0x16, 0x5f, 0x4f, 0x79, 0x52, + 0x4c, 0xc7, 0x86, 0x82, 0x05, 0x91, 0xc7, 0x50, 0x7b, 0x17, 0x8f, 0xde, 0x44, 0x49, 0xd0, 0xec, + 0x3a, 0x3d, 0x8f, 0x69, 0xc9, 0xe0, 0x7c, 0x16, 0x40, 0x85, 0xf3, 0x59, 0x19, 0x90, 0xd6, 0x62, + 0x40, 0xde, 0xa6, 0x47, 0x05, 0x4f, 0x46, 0x3c, 0x1b, 0x9d, 0x46, 0xe2, 0x3a, 0x58, 0x57, 0x01, + 0x59, 0x44, 0xe5, 0xbb, 0xfb, 0x3c, 0x17, 0x41, 0x1b, 0x2d, 0xe2, 0x33, 0xd9, 0x86, 0xc6, 0x7e, + 0x54, 0x0c, 0xc4, 0xa4, 0xb8, 0x08, 0x36, 0xba, 0x4e, 0xcf, 0x67, 0xa5, 0x4c, 0xb6, 0x60, 0xed, + 0x28, 0xe4, 0xb1, 0x08, 0x1e, 0xe1, 0x0b, 0x4a, 0x20, 0x14, 0xd6, 0x5f, 0xa7, 0x99, 0x88, 0xce, + 0x13, 0x4c, 0x53, 0xd0,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2d, 0x1e, 0x78, 0x73, + 0xcb, 0x2e, 0xc3, 0xf7, 0x6c, 0xf5, 0x47, 0x07, 0xda, 0xfd, 0x78, 0x9a, 0x17, 0x22, 0x2b, 0x63, + 0xda, 0xd4, 0x40, 0x99, 0xda, 0x0a, 0x58, 0x9d, 0x5d, 0xb2, 0x03, 0x6b, 0x32, 0xe2, 0xea, 0x70, + 0xdb, 0x89, 0x50, 0xb0, 0x95, 0x09, 0xff, 0xb6, 0x4c, 0xd0, 0x53, 0x68, 0xec, 0x1f, 0x0d, 0xbf, + 0xc8, 0xd2, 0xe9, 0x64, 0xa5, 0xc7, 0x66, 0xac, 0x75, 0xad, 0xb1, 0xb6, 0xa3, 0x46, 0x34, 0xe5, + 0x15, 0x4e, 0x65, 0x1d, 0x35, 0x95, 0xf9, 0x1a, 0xe1, 0x33, 0x7a, 0x04, 0x9b, 0xca, 0x5d, 0xd9, + 0x71, 0x1e, 0xd2, 0x16, 0xcd, 0xdc, 0xe4, 0x55, 0x73, 0x93, 0x34, 0xaa, 0xba, 0xee, 0xb7, 0x69, + 0xf4, 0x5f, 0x2e, 0x6c, 0x32, 0x91, 0x47, 0xdf, 0x88, 0x61, 0x92, 0x17, 0xd9, 0x34, 0x34, 0x17, + 0xc7, 0x2f, 0xd3, 0x33, 0x9d, 0x0b, 0x8f, 0x29, 0xe1, 0xee, 0x53, 0x42, 0x28, 0xd4, 0xed, 0x26, + 0x60, 0x2f, 0x30, 0x0a, 0xf2, 0x12, 0xea, 0x47, 0xe9, 0x34, 0x0b, 0xcb, 0xca, 0xc7, 0xce, 0xad, + 0xf6, 0x57, 0x0a, 0x66, 0x16, 0x90, 0x2f, 0x81, 0x1c, 0x67, 0x3c, 0xc9, 0x63, 0x2e, 0x29, 0x99, + 0xd7, 0x1a, 0xd5, 0x40, 0x66, 0x69, 0x17, 0x2c, 0xac, 0x78, 0x8d, 0xec, 0xda, 0x47, 0x38, 0xa8, + 0x23, 0xbf, 0x0d, 0xc3, 0x4f, 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, 0x5f, 0x9d, 0xad, 0x3d, 0x62, 0x8d, 0xcb, 0xda, 0xba, 0xfd, 0x25, 0xda, 0x87, 0xef, 0xae, + 0x22, 0x90, 0x93, 0x97, 0xe0, 0x49, 0xa2, 0x6a, 0x18, 0x0e, 0x6e, 0x23, 0xca, 0xe4, 0x22, 0xfa, + 0x37, 0x47, 0x07, 0x55, 0x68, 0xbd, 0xf9, 0x7b, 0xf0, 0x89, 0x6d, 0xe4, 0x59, 0x69, 0x64, 0x69, + 0xd9, 0x6e, 0xe9, 0xa8, 0x5c, 0xbd, 0xfd, 0x35, 0x34, 0x56, 0xb9, 0xe7, 0x2b, 0xf7, 0x7e, 0xb2, + 0xe8, 0xde, 0x93, 0xdb, 0x98, 0xe5, 0x96, 0x97, 0xfb, 0x9d, 0x7f, 0xbe, 0xdf, 0x71, 0xfe, 0xfd, + 0x7e, 0xc7, 0xf9, 0xcf, 0xfb, 0x1d, 0xe7, 0x2f, 0xff, 0xdd, 0xf9, 0xce, 0x59, 0x0d, 0x7f, 0xa3, + 0x7d, 0xf2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0xcf, 0xef, 0xf0, 0x69, 0x13, 0x00, 0x00, } func (m *IndexMeta) Marshal() (dAtA []byte, err error) { @@ -3013,6 +3038,13 @@ func (m *IndexMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } if m.TrackExistence { i-- if m.TrackExistence { @@ -3537,6 +3569,13 @@ func (m *CreateIndexMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x2a + } if m.CreatedAt != 0 { i = encodeVarintPrivate(dAtA, i, uint64(m.CreatedAt)) i-- @@ -3588,6 +3627,13 @@ func (m *CreateFieldMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintPrivate(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x2a + } if m.CreatedAt != 0 { i = encodeVarintPrivate(dAtA, i, uint64(m.CreatedAt)) i-- @@ -5435,6 +5481,10 @@ func (m *IndexMeta) Size() (n int) { if m.TrackExistence { n += 2 } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5676,6 +5726,10 @@ func (m *CreateIndexMessage) Size() (n int) { if m.CreatedAt != 0 { n += 1 + sovPrivate(uint64(m.CreatedAt)) } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5703,6 +5757,10 @@ func (m *CreateFieldMessage) Size() (n int) { if m.CreatedAt != 0 { n += 1 + sovPrivate(uint64(m.CreatedAt)) } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovPrivate(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -6597,6 +6655,38 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error { } } m.TrackExistence = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -8183,6 +8273,38 @@ func (m *CreateIndexMessage) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) @@ -8353,6 +8475,38 @@ func (m *CreateFieldMessage) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPrivate + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPrivate + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPrivate + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPrivate(dAtA[iNdEx:]) diff --git a/pb/private.proto b/pb/private.proto index e830956ab..b278464b9 100644 --- a/pb/private.proto +++ b/pb/private.proto @@ -7,6 +7,7 @@ import "public.proto"; message IndexMeta { bool Keys = 3; bool TrackExistence = 4; + string Description = 5; } message FieldOptions { @@ -67,6 +68,7 @@ message CreateIndexMessage { string Index = 1; IndexMeta Meta = 2; int64 CreatedAt = 3; + string Owner = 5; } message CreateFieldMessage { @@ -74,6 +76,7 @@ message CreateFieldMessage { string Field = 2; FieldOptions Meta = 3; int64 CreatedAt = 4; + string Owner = 5; } message UpdateFieldMessage { diff --git a/pb/public.pb.go b/pb/public.pb.go index 835a68c83..6cf86878a 100644 --- a/pb/public.pb.go +++ b/pb/public.pb.go @@ -465,6 +465,7 @@ func (m *KeyList) GetKeys() []string { type ExtractedTableValue struct { // Types that are valid to be assigned to Value: + // // *ExtractedTableValue_IDs // *ExtractedTableValue_Keys // *ExtractedTableValue_BSIValue @@ -605,6 +606,7 @@ func (*ExtractedTableValue) XXX_OneofWrappers() []interface{} { type ExtractedTableColumn struct { // Types that are valid to be assigned to KeyOrID: + // // *ExtractedTableColumn_Key // *ExtractedTableColumn_ID KeyOrID isExtractedTableColumn_KeyOrID `protobuf_oneof:"KeyOrID"` diff --git a/proto/pilosa.pb.go b/proto/pilosa.pb.go index e28570b7d..290ed8cc2 100644 --- a/proto/pilosa.pb.go +++ b/proto/pilosa.pb.go @@ -1,376 +1,437 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1-devel +// protoc v3.21.8 // source: pilosa.proto package proto import ( context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +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 QueryPQLRequest struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - Pql string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + Pql string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"` } -func (m *QueryPQLRequest) Reset() { *m = QueryPQLRequest{} } -func (m *QueryPQLRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPQLRequest) ProtoMessage() {} +func (x *QueryPQLRequest) Reset() { + *x = QueryPQLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPQLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPQLRequest) ProtoMessage() {} + +func (x *QueryPQLRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_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 QueryPQLRequest.ProtoReflect.Descriptor instead. func (*QueryPQLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{0} + return file_pilosa_proto_rawDescGZIP(), []int{0} } -func (m *QueryPQLRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QueryPQLRequest.Unmarshal(m, b) -} -func (m *QueryPQLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QueryPQLRequest.Marshal(b, m, deterministic) -} -func (m *QueryPQLRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPQLRequest.Merge(m, src) -} -func (m *QueryPQLRequest) XXX_Size() int { - return xxx_messageInfo_QueryPQLRequest.Size(m) -} -func (m *QueryPQLRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPQLRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryPQLRequest proto.InternalMessageInfo - -func (m *QueryPQLRequest) GetIndex() string { - if m != nil { - return m.Index +func (x *QueryPQLRequest) GetIndex() string { + if x != nil { + return x.Index } return "" } -func (m *QueryPQLRequest) GetPql() string { - if m != nil { - return m.Pql +func (x *QueryPQLRequest) GetPql() string { + if x != nil { + return x.Pql } return "" } type QuerySQLRequest struct { - Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"` } -func (m *QuerySQLRequest) Reset() { *m = QuerySQLRequest{} } -func (m *QuerySQLRequest) String() string { return proto.CompactTextString(m) } -func (*QuerySQLRequest) ProtoMessage() {} +func (x *QuerySQLRequest) Reset() { + *x = QuerySQLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySQLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySQLRequest) ProtoMessage() {} + +func (x *QuerySQLRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_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 QuerySQLRequest.ProtoReflect.Descriptor instead. func (*QuerySQLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{1} + return file_pilosa_proto_rawDescGZIP(), []int{1} } -func (m *QuerySQLRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuerySQLRequest.Unmarshal(m, b) -} -func (m *QuerySQLRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuerySQLRequest.Marshal(b, m, deterministic) -} -func (m *QuerySQLRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuerySQLRequest.Merge(m, src) -} -func (m *QuerySQLRequest) XXX_Size() int { - return xxx_messageInfo_QuerySQLRequest.Size(m) -} -func (m *QuerySQLRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QuerySQLRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QuerySQLRequest proto.InternalMessageInfo - -func (m *QuerySQLRequest) GetSql() string { - if m != nil { - return m.Sql +func (x *QuerySQLRequest) GetSql() string { + if x != nil { + return x.Sql } return "" } type StatusError struct { - Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` } -func (m *StatusError) Reset() { *m = StatusError{} } -func (m *StatusError) String() string { return proto.CompactTextString(m) } -func (*StatusError) ProtoMessage() {} +func (x *StatusError) Reset() { + *x = StatusError{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatusError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusError) ProtoMessage() {} + +func (x *StatusError) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_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 StatusError.ProtoReflect.Descriptor instead. func (*StatusError) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{2} + return file_pilosa_proto_rawDescGZIP(), []int{2} } -func (m *StatusError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StatusError.Unmarshal(m, b) -} -func (m *StatusError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StatusError.Marshal(b, m, deterministic) -} -func (m *StatusError) XXX_Merge(src proto.Message) { - xxx_messageInfo_StatusError.Merge(m, src) -} -func (m *StatusError) XXX_Size() int { - return xxx_messageInfo_StatusError.Size(m) -} -func (m *StatusError) XXX_DiscardUnknown() { - xxx_messageInfo_StatusError.DiscardUnknown(m) -} - -var xxx_messageInfo_StatusError proto.InternalMessageInfo - -func (m *StatusError) GetCode() uint32 { - if m != nil { - return m.Code +func (x *StatusError) GetCode() uint32 { + if x != nil { + return x.Code } return 0 } -func (m *StatusError) GetMessage() string { - if m != nil { - return m.Message +func (x *StatusError) GetMessage() string { + if x != nil { + return x.Message } return "" } type RowResponse struct { - Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - Columns []*ColumnResponse `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` - StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` - Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Columns []*ColumnResponse `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"` + StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` + Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` } -func (m *RowResponse) Reset() { *m = RowResponse{} } -func (m *RowResponse) String() string { return proto.CompactTextString(m) } -func (*RowResponse) ProtoMessage() {} +func (x *RowResponse) Reset() { + *x = RowResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RowResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RowResponse) ProtoMessage() {} + +func (x *RowResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[3] + 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 RowResponse.ProtoReflect.Descriptor instead. func (*RowResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{3} + return file_pilosa_proto_rawDescGZIP(), []int{3} } -func (m *RowResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RowResponse.Unmarshal(m, b) -} -func (m *RowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RowResponse.Marshal(b, m, deterministic) -} -func (m *RowResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RowResponse.Merge(m, src) -} -func (m *RowResponse) XXX_Size() int { - return xxx_messageInfo_RowResponse.Size(m) -} -func (m *RowResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RowResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RowResponse proto.InternalMessageInfo - -func (m *RowResponse) GetHeaders() []*ColumnInfo { - if m != nil { - return m.Headers +func (x *RowResponse) GetHeaders() []*ColumnInfo { + if x != nil { + return x.Headers } return nil } -func (m *RowResponse) GetColumns() []*ColumnResponse { - if m != nil { - return m.Columns +func (x *RowResponse) GetColumns() []*ColumnResponse { + if x != nil { + return x.Columns } return nil } -func (m *RowResponse) GetStatusError() *StatusError { - if m != nil { - return m.StatusError +func (x *RowResponse) GetStatusError() *StatusError { + if x != nil { + return x.StatusError } return nil } -func (m *RowResponse) GetDuration() int64 { - if m != nil { - return m.Duration +func (x *RowResponse) GetDuration() int64 { + if x != nil { + return x.Duration } return 0 } type Row struct { - Columns []*ColumnResponse `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Columns []*ColumnResponse `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` } -func (m *Row) Reset() { *m = Row{} } -func (m *Row) String() string { return proto.CompactTextString(m) } -func (*Row) ProtoMessage() {} +func (x *Row) Reset() { + *x = Row{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Row) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Row) ProtoMessage() {} + +func (x *Row) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[4] + 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 Row.ProtoReflect.Descriptor instead. func (*Row) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{4} + return file_pilosa_proto_rawDescGZIP(), []int{4} } -func (m *Row) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Row.Unmarshal(m, b) -} -func (m *Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Row.Marshal(b, m, deterministic) -} -func (m *Row) XXX_Merge(src proto.Message) { - xxx_messageInfo_Row.Merge(m, src) -} -func (m *Row) XXX_Size() int { - return xxx_messageInfo_Row.Size(m) -} -func (m *Row) XXX_DiscardUnknown() { - xxx_messageInfo_Row.DiscardUnknown(m) -} - -var xxx_messageInfo_Row proto.InternalMessageInfo - -func (m *Row) GetColumns() []*ColumnResponse { - if m != nil { - return m.Columns +func (x *Row) GetColumns() []*ColumnResponse { + if x != nil { + return x.Columns } return nil } type TableResponse struct { - Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` - Rows []*Row `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"` - StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` - Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Headers []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + Rows []*Row `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"` + StatusError *StatusError `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"` + Duration int64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` } -func (m *TableResponse) Reset() { *m = TableResponse{} } -func (m *TableResponse) String() string { return proto.CompactTextString(m) } -func (*TableResponse) ProtoMessage() {} +func (x *TableResponse) Reset() { + *x = TableResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableResponse) ProtoMessage() {} + +func (x *TableResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[5] + 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 TableResponse.ProtoReflect.Descriptor instead. func (*TableResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{5} + return file_pilosa_proto_rawDescGZIP(), []int{5} } -func (m *TableResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TableResponse.Unmarshal(m, b) -} -func (m *TableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TableResponse.Marshal(b, m, deterministic) -} -func (m *TableResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TableResponse.Merge(m, src) -} -func (m *TableResponse) XXX_Size() int { - return xxx_messageInfo_TableResponse.Size(m) -} -func (m *TableResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TableResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TableResponse proto.InternalMessageInfo - -func (m *TableResponse) GetHeaders() []*ColumnInfo { - if m != nil { - return m.Headers +func (x *TableResponse) GetHeaders() []*ColumnInfo { + if x != nil { + return x.Headers } return nil } -func (m *TableResponse) GetRows() []*Row { - if m != nil { - return m.Rows +func (x *TableResponse) GetRows() []*Row { + if x != nil { + return x.Rows } return nil } -func (m *TableResponse) GetStatusError() *StatusError { - if m != nil { - return m.StatusError +func (x *TableResponse) GetStatusError() *StatusError { + if x != nil { + return x.StatusError } return nil } -func (m *TableResponse) GetDuration() int64 { - if m != nil { - return m.Duration +func (x *TableResponse) GetDuration() int64 { + if x != nil { + return x.Duration } return 0 } type ColumnInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"` } -func (m *ColumnInfo) Reset() { *m = ColumnInfo{} } -func (m *ColumnInfo) String() string { return proto.CompactTextString(m) } -func (*ColumnInfo) ProtoMessage() {} +func (x *ColumnInfo) Reset() { + *x = ColumnInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnInfo) ProtoMessage() {} + +func (x *ColumnInfo) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[6] + 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 ColumnInfo.ProtoReflect.Descriptor instead. func (*ColumnInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{6} + return file_pilosa_proto_rawDescGZIP(), []int{6} } -func (m *ColumnInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ColumnInfo.Unmarshal(m, b) -} -func (m *ColumnInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ColumnInfo.Marshal(b, m, deterministic) -} -func (m *ColumnInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnInfo.Merge(m, src) -} -func (m *ColumnInfo) XXX_Size() int { - return xxx_messageInfo_ColumnInfo.Size(m) -} -func (m *ColumnInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ColumnInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ColumnInfo proto.InternalMessageInfo - -func (m *ColumnInfo) GetName() string { - if m != nil { - return m.Name +func (x *ColumnInfo) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *ColumnInfo) GetDatatype() string { - if m != nil { - return m.Datatype +func (x *ColumnInfo) GetDatatype() string { + if x != nil { + return x.Datatype } return "" } type ColumnResponse struct { - // Types that are valid to be assigned to ColumnVal: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ColumnVal: + // // *ColumnResponse_StringVal // *ColumnResponse_Uint64Val // *ColumnResponse_Int64Val @@ -381,36 +442,117 @@ type ColumnResponse struct { // *ColumnResponse_Float64Val // *ColumnResponse_DecimalVal // *ColumnResponse_TimestampVal - ColumnVal isColumnResponse_ColumnVal `protobuf_oneof:"columnVal"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ColumnVal isColumnResponse_ColumnVal `protobuf_oneof:"columnVal"` } -func (m *ColumnResponse) Reset() { *m = ColumnResponse{} } -func (m *ColumnResponse) String() string { return proto.CompactTextString(m) } -func (*ColumnResponse) ProtoMessage() {} +func (x *ColumnResponse) Reset() { + *x = ColumnResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnResponse) ProtoMessage() {} + +func (x *ColumnResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[7] + 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 ColumnResponse.ProtoReflect.Descriptor instead. func (*ColumnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{7} + return file_pilosa_proto_rawDescGZIP(), []int{7} } -func (m *ColumnResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ColumnResponse.Unmarshal(m, b) -} -func (m *ColumnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ColumnResponse.Marshal(b, m, deterministic) -} -func (m *ColumnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ColumnResponse.Merge(m, src) -} -func (m *ColumnResponse) XXX_Size() int { - return xxx_messageInfo_ColumnResponse.Size(m) -} -func (m *ColumnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ColumnResponse.DiscardUnknown(m) +func (m *ColumnResponse) GetColumnVal() isColumnResponse_ColumnVal { + if m != nil { + return m.ColumnVal + } + return nil } -var xxx_messageInfo_ColumnResponse proto.InternalMessageInfo +func (x *ColumnResponse) GetStringVal() string { + if x, ok := x.GetColumnVal().(*ColumnResponse_StringVal); ok { + return x.StringVal + } + return "" +} + +func (x *ColumnResponse) GetUint64Val() uint64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Uint64Val); ok { + return x.Uint64Val + } + return 0 +} + +func (x *ColumnResponse) GetInt64Val() int64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Int64Val); ok { + return x.Int64Val + } + return 0 +} + +func (x *ColumnResponse) GetBoolVal() bool { + if x, ok := x.GetColumnVal().(*ColumnResponse_BoolVal); ok { + return x.BoolVal + } + return false +} + +func (x *ColumnResponse) GetBlobVal() []byte { + if x, ok := x.GetColumnVal().(*ColumnResponse_BlobVal); ok { + return x.BlobVal + } + return nil +} + +func (x *ColumnResponse) GetUint64ArrayVal() *Uint64Array { + if x, ok := x.GetColumnVal().(*ColumnResponse_Uint64ArrayVal); ok { + return x.Uint64ArrayVal + } + return nil +} + +func (x *ColumnResponse) GetStringArrayVal() *StringArray { + if x, ok := x.GetColumnVal().(*ColumnResponse_StringArrayVal); ok { + return x.StringArrayVal + } + return nil +} + +func (x *ColumnResponse) GetFloat64Val() float64 { + if x, ok := x.GetColumnVal().(*ColumnResponse_Float64Val); ok { + return x.Float64Val + } + return 0 +} + +func (x *ColumnResponse) GetDecimalVal() *Decimal { + if x, ok := x.GetColumnVal().(*ColumnResponse_DecimalVal); ok { + return x.DecimalVal + } + return nil +} + +func (x *ColumnResponse) GetTimestampVal() string { + if x, ok := x.GetColumnVal().(*ColumnResponse_TimestampVal); ok { + return x.TimestampVal + } + return "" +} type isColumnResponse_ColumnVal interface { isColumnResponse_ColumnVal() @@ -476,337 +618,306 @@ func (*ColumnResponse_DecimalVal) isColumnResponse_ColumnVal() {} func (*ColumnResponse_TimestampVal) isColumnResponse_ColumnVal() {} -func (m *ColumnResponse) GetColumnVal() isColumnResponse_ColumnVal { - if m != nil { - return m.ColumnVal - } - return nil -} - -func (m *ColumnResponse) GetStringVal() string { - if x, ok := m.GetColumnVal().(*ColumnResponse_StringVal); ok { - return x.StringVal - } - return "" -} - -func (m *ColumnResponse) GetUint64Val() uint64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Uint64Val); ok { - return x.Uint64Val - } - return 0 -} - -func (m *ColumnResponse) GetInt64Val() int64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Int64Val); ok { - return x.Int64Val - } - return 0 -} - -func (m *ColumnResponse) GetBoolVal() bool { - if x, ok := m.GetColumnVal().(*ColumnResponse_BoolVal); ok { - return x.BoolVal - } - return false -} - -func (m *ColumnResponse) GetBlobVal() []byte { - if x, ok := m.GetColumnVal().(*ColumnResponse_BlobVal); ok { - return x.BlobVal - } - return nil -} - -func (m *ColumnResponse) GetUint64ArrayVal() *Uint64Array { - if x, ok := m.GetColumnVal().(*ColumnResponse_Uint64ArrayVal); ok { - return x.Uint64ArrayVal - } - return nil -} - -func (m *ColumnResponse) GetStringArrayVal() *StringArray { - if x, ok := m.GetColumnVal().(*ColumnResponse_StringArrayVal); ok { - return x.StringArrayVal - } - return nil -} - -func (m *ColumnResponse) GetFloat64Val() float64 { - if x, ok := m.GetColumnVal().(*ColumnResponse_Float64Val); ok { - return x.Float64Val - } - return 0 -} - -func (m *ColumnResponse) GetDecimalVal() *Decimal { - if x, ok := m.GetColumnVal().(*ColumnResponse_DecimalVal); ok { - return x.DecimalVal - } - return nil -} - -func (m *ColumnResponse) GetTimestampVal() string { - if x, ok := m.GetColumnVal().(*ColumnResponse_TimestampVal); ok { - return x.TimestampVal - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ColumnResponse) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ColumnResponse_StringVal)(nil), - (*ColumnResponse_Uint64Val)(nil), - (*ColumnResponse_Int64Val)(nil), - (*ColumnResponse_BoolVal)(nil), - (*ColumnResponse_BlobVal)(nil), - (*ColumnResponse_Uint64ArrayVal)(nil), - (*ColumnResponse_StringArrayVal)(nil), - (*ColumnResponse_Float64Val)(nil), - (*ColumnResponse_DecimalVal)(nil), - (*ColumnResponse_TimestampVal)(nil), - } -} - type Decimal struct { - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` - Scale int64 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Scale int64 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"` } -func (m *Decimal) Reset() { *m = Decimal{} } -func (m *Decimal) String() string { return proto.CompactTextString(m) } -func (*Decimal) ProtoMessage() {} +func (x *Decimal) Reset() { + *x = Decimal{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decimal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decimal) ProtoMessage() {} + +func (x *Decimal) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[8] + 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 Decimal.ProtoReflect.Descriptor instead. func (*Decimal) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{8} + return file_pilosa_proto_rawDescGZIP(), []int{8} } -func (m *Decimal) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Decimal.Unmarshal(m, b) -} -func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Decimal.Marshal(b, m, deterministic) -} -func (m *Decimal) XXX_Merge(src proto.Message) { - xxx_messageInfo_Decimal.Merge(m, src) -} -func (m *Decimal) XXX_Size() int { - return xxx_messageInfo_Decimal.Size(m) -} -func (m *Decimal) XXX_DiscardUnknown() { - xxx_messageInfo_Decimal.DiscardUnknown(m) -} - -var xxx_messageInfo_Decimal proto.InternalMessageInfo - -func (m *Decimal) GetValue() int64 { - if m != nil { - return m.Value +func (x *Decimal) GetValue() int64 { + if x != nil { + return x.Value } return 0 } -func (m *Decimal) GetScale() int64 { - if m != nil { - return m.Scale +func (x *Decimal) GetScale() int64 { + if x != nil { + return x.Scale } return 0 } type InspectRequest struct { - Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - Columns *IdsOrKeys `protobuf:"bytes,2,opt,name=columns,proto3" json:"columns,omitempty"` - FilterFields []string `protobuf:"bytes,3,rep,name=filterFields,proto3" json:"filterFields,omitempty"` - Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Offset uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` + Columns *IdsOrKeys `protobuf:"bytes,2,opt,name=columns,proto3" json:"columns,omitempty"` + FilterFields []string `protobuf:"bytes,3,rep,name=filterFields,proto3" json:"filterFields,omitempty"` + Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Offset uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Query string `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"` } -func (m *InspectRequest) Reset() { *m = InspectRequest{} } -func (m *InspectRequest) String() string { return proto.CompactTextString(m) } -func (*InspectRequest) ProtoMessage() {} +func (x *InspectRequest) Reset() { + *x = InspectRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InspectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InspectRequest) ProtoMessage() {} + +func (x *InspectRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[9] + 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 InspectRequest.ProtoReflect.Descriptor instead. func (*InspectRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{9} + return file_pilosa_proto_rawDescGZIP(), []int{9} } -func (m *InspectRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InspectRequest.Unmarshal(m, b) -} -func (m *InspectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InspectRequest.Marshal(b, m, deterministic) -} -func (m *InspectRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InspectRequest.Merge(m, src) -} -func (m *InspectRequest) XXX_Size() int { - return xxx_messageInfo_InspectRequest.Size(m) -} -func (m *InspectRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InspectRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_InspectRequest proto.InternalMessageInfo - -func (m *InspectRequest) GetIndex() string { - if m != nil { - return m.Index +func (x *InspectRequest) GetIndex() string { + if x != nil { + return x.Index } return "" } -func (m *InspectRequest) GetColumns() *IdsOrKeys { - if m != nil { - return m.Columns +func (x *InspectRequest) GetColumns() *IdsOrKeys { + if x != nil { + return x.Columns } return nil } -func (m *InspectRequest) GetFilterFields() []string { - if m != nil { - return m.FilterFields +func (x *InspectRequest) GetFilterFields() []string { + if x != nil { + return x.FilterFields } return nil } -func (m *InspectRequest) GetLimit() uint64 { - if m != nil { - return m.Limit +func (x *InspectRequest) GetLimit() uint64 { + if x != nil { + return x.Limit } return 0 } -func (m *InspectRequest) GetOffset() uint64 { - if m != nil { - return m.Offset +func (x *InspectRequest) GetOffset() uint64 { + if x != nil { + return x.Offset } return 0 } -func (m *InspectRequest) GetQuery() string { - if m != nil { - return m.Query +func (x *InspectRequest) GetQuery() string { + if x != nil { + return x.Query } return "" } type Uint64Array struct { - Vals []uint64 `protobuf:"varint,1,rep,packed,name=vals,proto3" json:"vals,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vals []uint64 `protobuf:"varint,1,rep,packed,name=vals,proto3" json:"vals,omitempty"` } -func (m *Uint64Array) Reset() { *m = Uint64Array{} } -func (m *Uint64Array) String() string { return proto.CompactTextString(m) } -func (*Uint64Array) ProtoMessage() {} +func (x *Uint64Array) Reset() { + *x = Uint64Array{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Uint64Array) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Uint64Array) ProtoMessage() {} + +func (x *Uint64Array) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[10] + 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 Uint64Array.ProtoReflect.Descriptor instead. func (*Uint64Array) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{10} + return file_pilosa_proto_rawDescGZIP(), []int{10} } -func (m *Uint64Array) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Uint64Array.Unmarshal(m, b) -} -func (m *Uint64Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Uint64Array.Marshal(b, m, deterministic) -} -func (m *Uint64Array) XXX_Merge(src proto.Message) { - xxx_messageInfo_Uint64Array.Merge(m, src) -} -func (m *Uint64Array) XXX_Size() int { - return xxx_messageInfo_Uint64Array.Size(m) -} -func (m *Uint64Array) XXX_DiscardUnknown() { - xxx_messageInfo_Uint64Array.DiscardUnknown(m) -} - -var xxx_messageInfo_Uint64Array proto.InternalMessageInfo - -func (m *Uint64Array) GetVals() []uint64 { - if m != nil { - return m.Vals +func (x *Uint64Array) GetVals() []uint64 { + if x != nil { + return x.Vals } return nil } type StringArray struct { - Vals []string `protobuf:"bytes,1,rep,name=vals,proto3" json:"vals,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Vals []string `protobuf:"bytes,1,rep,name=vals,proto3" json:"vals,omitempty"` } -func (m *StringArray) Reset() { *m = StringArray{} } -func (m *StringArray) String() string { return proto.CompactTextString(m) } -func (*StringArray) ProtoMessage() {} +func (x *StringArray) Reset() { + *x = StringArray{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringArray) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringArray) ProtoMessage() {} + +func (x *StringArray) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[11] + 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 StringArray.ProtoReflect.Descriptor instead. func (*StringArray) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{11} + return file_pilosa_proto_rawDescGZIP(), []int{11} } -func (m *StringArray) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringArray.Unmarshal(m, b) -} -func (m *StringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringArray.Marshal(b, m, deterministic) -} -func (m *StringArray) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringArray.Merge(m, src) -} -func (m *StringArray) XXX_Size() int { - return xxx_messageInfo_StringArray.Size(m) -} -func (m *StringArray) XXX_DiscardUnknown() { - xxx_messageInfo_StringArray.DiscardUnknown(m) -} - -var xxx_messageInfo_StringArray proto.InternalMessageInfo - -func (m *StringArray) GetVals() []string { - if m != nil { - return m.Vals +func (x *StringArray) GetVals() []string { + if x != nil { + return x.Vals } return nil } type IdsOrKeys struct { - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // // *IdsOrKeys_Ids // *IdsOrKeys_Keys - Type isIdsOrKeys_Type `protobuf_oneof:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type isIdsOrKeys_Type `protobuf_oneof:"type"` } -func (m *IdsOrKeys) Reset() { *m = IdsOrKeys{} } -func (m *IdsOrKeys) String() string { return proto.CompactTextString(m) } -func (*IdsOrKeys) ProtoMessage() {} +func (x *IdsOrKeys) Reset() { + *x = IdsOrKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdsOrKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdsOrKeys) ProtoMessage() {} + +func (x *IdsOrKeys) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[12] + 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 IdsOrKeys.ProtoReflect.Descriptor instead. func (*IdsOrKeys) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{12} + return file_pilosa_proto_rawDescGZIP(), []int{12} } -func (m *IdsOrKeys) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IdsOrKeys.Unmarshal(m, b) -} -func (m *IdsOrKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IdsOrKeys.Marshal(b, m, deterministic) -} -func (m *IdsOrKeys) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdsOrKeys.Merge(m, src) -} -func (m *IdsOrKeys) XXX_Size() int { - return xxx_messageInfo_IdsOrKeys.Size(m) -} -func (m *IdsOrKeys) XXX_DiscardUnknown() { - xxx_messageInfo_IdsOrKeys.DiscardUnknown(m) +func (m *IdsOrKeys) GetType() isIdsOrKeys_Type { + if m != nil { + return m.Type + } + return nil } -var xxx_messageInfo_IdsOrKeys proto.InternalMessageInfo +func (x *IdsOrKeys) GetIds() *Uint64Array { + if x, ok := x.GetType().(*IdsOrKeys_Ids); ok { + return x.Ids + } + return nil +} + +func (x *IdsOrKeys) GetKeys() *StringArray { + if x, ok := x.GetType().(*IdsOrKeys_Keys); ok { + return x.Keys + } + return nil +} type isIdsOrKeys_Type interface { isIdsOrKeys_Type() @@ -824,460 +935,964 @@ func (*IdsOrKeys_Ids) isIdsOrKeys_Type() {} func (*IdsOrKeys_Keys) isIdsOrKeys_Type() {} -func (m *IdsOrKeys) GetType() isIdsOrKeys_Type { - if m != nil { - return m.Type - } - return nil -} - -func (m *IdsOrKeys) GetIds() *Uint64Array { - if x, ok := m.GetType().(*IdsOrKeys_Ids); ok { - return x.Ids - } - return nil -} - -func (m *IdsOrKeys) GetKeys() *StringArray { - if x, ok := m.GetType().(*IdsOrKeys_Keys); ok { - return x.Keys - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*IdsOrKeys) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*IdsOrKeys_Ids)(nil), - (*IdsOrKeys_Keys)(nil), - } -} - type Index struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *Index) Reset() { *m = Index{} } -func (m *Index) String() string { return proto.CompactTextString(m) } -func (*Index) ProtoMessage() {} +func (x *Index) Reset() { + *x = Index{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index) ProtoMessage() {} + +func (x *Index) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[13] + 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 Index.ProtoReflect.Descriptor instead. func (*Index) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{13} + return file_pilosa_proto_rawDescGZIP(), []int{13} } -func (m *Index) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Index.Unmarshal(m, b) -} -func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Index.Marshal(b, m, deterministic) -} -func (m *Index) XXX_Merge(src proto.Message) { - xxx_messageInfo_Index.Merge(m, src) -} -func (m *Index) XXX_Size() int { - return xxx_messageInfo_Index.Size(m) -} -func (m *Index) XXX_DiscardUnknown() { - xxx_messageInfo_Index.DiscardUnknown(m) -} - -var xxx_messageInfo_Index proto.InternalMessageInfo - -func (m *Index) GetName() string { - if m != nil { - return m.Name +func (x *Index) GetName() string { + if x != nil { + return x.Name } return "" } type CreateIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Keys bool `protobuf:"varint,2,opt,name=keys,proto3" json:"keys,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` } -func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} } -func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) } -func (*CreateIndexRequest) ProtoMessage() {} +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[14] + 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 CreateIndexRequest.ProtoReflect.Descriptor instead. func (*CreateIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{14} + return file_pilosa_proto_rawDescGZIP(), []int{14} } -func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateIndexRequest.Unmarshal(m, b) -} -func (m *CreateIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateIndexRequest.Marshal(b, m, deterministic) -} -func (m *CreateIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexRequest.Merge(m, src) -} -func (m *CreateIndexRequest) XXX_Size() int { - return xxx_messageInfo_CreateIndexRequest.Size(m) -} -func (m *CreateIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateIndexRequest proto.InternalMessageInfo - -func (m *CreateIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *CreateIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *CreateIndexRequest) GetKeys() bool { - if m != nil { - return m.Keys +func (x *CreateIndexRequest) GetKeys() bool { + if x != nil { + return x.Keys } return false } +func (x *CreateIndexRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + type CreateIndexResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *CreateIndexResponse) Reset() { *m = CreateIndexResponse{} } -func (m *CreateIndexResponse) String() string { return proto.CompactTextString(m) } -func (*CreateIndexResponse) ProtoMessage() {} +func (x *CreateIndexResponse) Reset() { + *x = CreateIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexResponse) ProtoMessage() {} + +func (x *CreateIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[15] + 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 CreateIndexResponse.ProtoReflect.Descriptor instead. func (*CreateIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{15} + return file_pilosa_proto_rawDescGZIP(), []int{15} } -func (m *CreateIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateIndexResponse.Unmarshal(m, b) -} -func (m *CreateIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateIndexResponse.Marshal(b, m, deterministic) -} -func (m *CreateIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateIndexResponse.Merge(m, src) -} -func (m *CreateIndexResponse) XXX_Size() int { - return xxx_messageInfo_CreateIndexResponse.Size(m) -} -func (m *CreateIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateIndexResponse proto.InternalMessageInfo - type GetIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *GetIndexRequest) Reset() { *m = GetIndexRequest{} } -func (m *GetIndexRequest) String() string { return proto.CompactTextString(m) } -func (*GetIndexRequest) ProtoMessage() {} +func (x *GetIndexRequest) Reset() { + *x = GetIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexRequest) ProtoMessage() {} + +func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[16] + 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 GetIndexRequest.ProtoReflect.Descriptor instead. func (*GetIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{16} + return file_pilosa_proto_rawDescGZIP(), []int{16} } -func (m *GetIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexRequest.Unmarshal(m, b) -} -func (m *GetIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexRequest.Marshal(b, m, deterministic) -} -func (m *GetIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexRequest.Merge(m, src) -} -func (m *GetIndexRequest) XXX_Size() int { - return xxx_messageInfo_GetIndexRequest.Size(m) -} -func (m *GetIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetIndexRequest proto.InternalMessageInfo - -func (m *GetIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *GetIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } type GetIndexResponse struct { - Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Index *Index `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` } -func (m *GetIndexResponse) Reset() { *m = GetIndexResponse{} } -func (m *GetIndexResponse) String() string { return proto.CompactTextString(m) } -func (*GetIndexResponse) ProtoMessage() {} +func (x *GetIndexResponse) Reset() { + *x = GetIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexResponse) ProtoMessage() {} + +func (x *GetIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[17] + 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 GetIndexResponse.ProtoReflect.Descriptor instead. func (*GetIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{17} + return file_pilosa_proto_rawDescGZIP(), []int{17} } -func (m *GetIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexResponse.Unmarshal(m, b) -} -func (m *GetIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexResponse.Marshal(b, m, deterministic) -} -func (m *GetIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexResponse.Merge(m, src) -} -func (m *GetIndexResponse) XXX_Size() int { - return xxx_messageInfo_GetIndexResponse.Size(m) -} -func (m *GetIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetIndexResponse proto.InternalMessageInfo - -func (m *GetIndexResponse) GetIndex() *Index { - if m != nil { - return m.Index +func (x *GetIndexResponse) GetIndex() *Index { + if x != nil { + return x.Index } return nil } type GetIndexesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *GetIndexesRequest) Reset() { *m = GetIndexesRequest{} } -func (m *GetIndexesRequest) String() string { return proto.CompactTextString(m) } -func (*GetIndexesRequest) ProtoMessage() {} +func (x *GetIndexesRequest) Reset() { + *x = GetIndexesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIndexesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexesRequest) ProtoMessage() {} + +func (x *GetIndexesRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[18] + 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 GetIndexesRequest.ProtoReflect.Descriptor instead. func (*GetIndexesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{18} + return file_pilosa_proto_rawDescGZIP(), []int{18} } -func (m *GetIndexesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexesRequest.Unmarshal(m, b) -} -func (m *GetIndexesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexesRequest.Marshal(b, m, deterministic) -} -func (m *GetIndexesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexesRequest.Merge(m, src) -} -func (m *GetIndexesRequest) XXX_Size() int { - return xxx_messageInfo_GetIndexesRequest.Size(m) -} -func (m *GetIndexesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetIndexesRequest proto.InternalMessageInfo - type GetIndexesResponse struct { - Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` } -func (m *GetIndexesResponse) Reset() { *m = GetIndexesResponse{} } -func (m *GetIndexesResponse) String() string { return proto.CompactTextString(m) } -func (*GetIndexesResponse) ProtoMessage() {} +func (x *GetIndexesResponse) Reset() { + *x = GetIndexesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIndexesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexesResponse) ProtoMessage() {} + +func (x *GetIndexesResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[19] + 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 GetIndexesResponse.ProtoReflect.Descriptor instead. func (*GetIndexesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{19} + return file_pilosa_proto_rawDescGZIP(), []int{19} } -func (m *GetIndexesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetIndexesResponse.Unmarshal(m, b) -} -func (m *GetIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetIndexesResponse.Marshal(b, m, deterministic) -} -func (m *GetIndexesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetIndexesResponse.Merge(m, src) -} -func (m *GetIndexesResponse) XXX_Size() int { - return xxx_messageInfo_GetIndexesResponse.Size(m) -} -func (m *GetIndexesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetIndexesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetIndexesResponse proto.InternalMessageInfo - -func (m *GetIndexesResponse) GetIndexes() []*Index { - if m != nil { - return m.Indexes +func (x *GetIndexesResponse) GetIndexes() []*Index { + if x != nil { + return x.Indexes } return nil } type DeleteIndexRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *DeleteIndexRequest) Reset() { *m = DeleteIndexRequest{} } -func (m *DeleteIndexRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteIndexRequest) ProtoMessage() {} +func (x *DeleteIndexRequest) Reset() { + *x = DeleteIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIndexRequest) ProtoMessage() {} + +func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[20] + 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 DeleteIndexRequest.ProtoReflect.Descriptor instead. func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{20} + return file_pilosa_proto_rawDescGZIP(), []int{20} } -func (m *DeleteIndexRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteIndexRequest.Unmarshal(m, b) -} -func (m *DeleteIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteIndexRequest.Marshal(b, m, deterministic) -} -func (m *DeleteIndexRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexRequest.Merge(m, src) -} -func (m *DeleteIndexRequest) XXX_Size() int { - return xxx_messageInfo_DeleteIndexRequest.Size(m) -} -func (m *DeleteIndexRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteIndexRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteIndexRequest proto.InternalMessageInfo - -func (m *DeleteIndexRequest) GetName() string { - if m != nil { - return m.Name +func (x *DeleteIndexRequest) GetName() string { + if x != nil { + return x.Name } return "" } type DeleteIndexResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *DeleteIndexResponse) Reset() { *m = DeleteIndexResponse{} } -func (m *DeleteIndexResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteIndexResponse) ProtoMessage() {} +func (x *DeleteIndexResponse) Reset() { + *x = DeleteIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_pilosa_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIndexResponse) ProtoMessage() {} + +func (x *DeleteIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_pilosa_proto_msgTypes[21] + 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 DeleteIndexResponse.ProtoReflect.Descriptor instead. func (*DeleteIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ef0691a44d1e275c, []int{21} + return file_pilosa_proto_rawDescGZIP(), []int{21} } -func (m *DeleteIndexResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteIndexResponse.Unmarshal(m, b) -} -func (m *DeleteIndexResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteIndexResponse.Marshal(b, m, deterministic) -} -func (m *DeleteIndexResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteIndexResponse.Merge(m, src) -} -func (m *DeleteIndexResponse) XXX_Size() int { - return xxx_messageInfo_DeleteIndexResponse.Size(m) -} -func (m *DeleteIndexResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteIndexResponse.DiscardUnknown(m) +var File_pilosa_proto protoreflect.FileDescriptor + +var file_pilosa_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x70, 0x69, 0x6c, 0x6f, 0x73, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, + 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x71, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x71, 0x6c, + 0x22, 0x23, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x73, 0x71, 0x6c, 0x22, 0x3b, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x0d, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x72, 0x6f, 0x77, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x0a, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa9, 0x03, 0x0a, 0x0e, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x09, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x09, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, + 0x00, 0x52, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x56, 0x61, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x56, + 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, + 0x79, 0x56, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, + 0x52, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, + 0x12, 0x3c, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, + 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x0e, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x12, 0x20, + 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, + 0x12, 0x30, 0x0a, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x63, + 0x69, 0x6d, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, + 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, 0x61, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x56, 0x61, 0x6c, 0x22, 0x35, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0xba, 0x01, 0x0a, + 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, + 0x64, 0x73, 0x4f, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x21, 0x0a, 0x0b, 0x55, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x22, 0x21, 0x0a, 0x0b, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x76, + 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x22, + 0x65, 0x0a, 0x09, 0x49, 0x64, 0x73, 0x4f, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x26, 0x0a, 0x03, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x42, 0x06, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1b, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 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, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x36, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22, 0x28, 0x0a, 0x12, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x04, + 0x0a, 0x06, 0x50, 0x69, 0x6c, 0x6f, 0x73, 0x61, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x18, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x51, 0x4c, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x51, 0x4c, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, + 0x4c, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x07, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } -var xxx_messageInfo_DeleteIndexResponse proto.InternalMessageInfo +var ( + file_pilosa_proto_rawDescOnce sync.Once + file_pilosa_proto_rawDescData = file_pilosa_proto_rawDesc +) -func init() { - proto.RegisterType((*QueryPQLRequest)(nil), "pilosa.QueryPQLRequest") - proto.RegisterType((*QuerySQLRequest)(nil), "pilosa.QuerySQLRequest") - proto.RegisterType((*StatusError)(nil), "pilosa.StatusError") - proto.RegisterType((*RowResponse)(nil), "pilosa.RowResponse") - proto.RegisterType((*Row)(nil), "pilosa.Row") - proto.RegisterType((*TableResponse)(nil), "pilosa.TableResponse") - proto.RegisterType((*ColumnInfo)(nil), "pilosa.ColumnInfo") - proto.RegisterType((*ColumnResponse)(nil), "pilosa.ColumnResponse") - proto.RegisterType((*Decimal)(nil), "pilosa.Decimal") - proto.RegisterType((*InspectRequest)(nil), "pilosa.InspectRequest") - proto.RegisterType((*Uint64Array)(nil), "pilosa.Uint64Array") - proto.RegisterType((*StringArray)(nil), "pilosa.StringArray") - proto.RegisterType((*IdsOrKeys)(nil), "pilosa.IdsOrKeys") - proto.RegisterType((*Index)(nil), "pilosa.Index") - proto.RegisterType((*CreateIndexRequest)(nil), "pilosa.CreateIndexRequest") - proto.RegisterType((*CreateIndexResponse)(nil), "pilosa.CreateIndexResponse") - proto.RegisterType((*GetIndexRequest)(nil), "pilosa.GetIndexRequest") - proto.RegisterType((*GetIndexResponse)(nil), "pilosa.GetIndexResponse") - proto.RegisterType((*GetIndexesRequest)(nil), "pilosa.GetIndexesRequest") - proto.RegisterType((*GetIndexesResponse)(nil), "pilosa.GetIndexesResponse") - proto.RegisterType((*DeleteIndexRequest)(nil), "pilosa.DeleteIndexRequest") - proto.RegisterType((*DeleteIndexResponse)(nil), "pilosa.DeleteIndexResponse") +func file_pilosa_proto_rawDescGZIP() []byte { + file_pilosa_proto_rawDescOnce.Do(func() { + file_pilosa_proto_rawDescData = protoimpl.X.CompressGZIP(file_pilosa_proto_rawDescData) + }) + return file_pilosa_proto_rawDescData } -func init() { - proto.RegisterFile("pilosa.proto", fileDescriptor_ef0691a44d1e275c) +var file_pilosa_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_pilosa_proto_goTypes = []interface{}{ + (*QueryPQLRequest)(nil), // 0: proto.QueryPQLRequest + (*QuerySQLRequest)(nil), // 1: proto.QuerySQLRequest + (*StatusError)(nil), // 2: proto.StatusError + (*RowResponse)(nil), // 3: proto.RowResponse + (*Row)(nil), // 4: proto.Row + (*TableResponse)(nil), // 5: proto.TableResponse + (*ColumnInfo)(nil), // 6: proto.ColumnInfo + (*ColumnResponse)(nil), // 7: proto.ColumnResponse + (*Decimal)(nil), // 8: proto.Decimal + (*InspectRequest)(nil), // 9: proto.InspectRequest + (*Uint64Array)(nil), // 10: proto.Uint64Array + (*StringArray)(nil), // 11: proto.StringArray + (*IdsOrKeys)(nil), // 12: proto.IdsOrKeys + (*Index)(nil), // 13: proto.Index + (*CreateIndexRequest)(nil), // 14: proto.CreateIndexRequest + (*CreateIndexResponse)(nil), // 15: proto.CreateIndexResponse + (*GetIndexRequest)(nil), // 16: proto.GetIndexRequest + (*GetIndexResponse)(nil), // 17: proto.GetIndexResponse + (*GetIndexesRequest)(nil), // 18: proto.GetIndexesRequest + (*GetIndexesResponse)(nil), // 19: proto.GetIndexesResponse + (*DeleteIndexRequest)(nil), // 20: proto.DeleteIndexRequest + (*DeleteIndexResponse)(nil), // 21: proto.DeleteIndexResponse +} +var file_pilosa_proto_depIdxs = []int32{ + 6, // 0: proto.RowResponse.headers:type_name -> proto.ColumnInfo + 7, // 1: proto.RowResponse.columns:type_name -> proto.ColumnResponse + 2, // 2: proto.RowResponse.StatusError:type_name -> proto.StatusError + 7, // 3: proto.Row.columns:type_name -> proto.ColumnResponse + 6, // 4: proto.TableResponse.headers:type_name -> proto.ColumnInfo + 4, // 5: proto.TableResponse.rows:type_name -> proto.Row + 2, // 6: proto.TableResponse.StatusError:type_name -> proto.StatusError + 10, // 7: proto.ColumnResponse.uint64ArrayVal:type_name -> proto.Uint64Array + 11, // 8: proto.ColumnResponse.stringArrayVal:type_name -> proto.StringArray + 8, // 9: proto.ColumnResponse.decimalVal:type_name -> proto.Decimal + 12, // 10: proto.InspectRequest.columns:type_name -> proto.IdsOrKeys + 10, // 11: proto.IdsOrKeys.ids:type_name -> proto.Uint64Array + 11, // 12: proto.IdsOrKeys.keys:type_name -> proto.StringArray + 13, // 13: proto.GetIndexResponse.index:type_name -> proto.Index + 13, // 14: proto.GetIndexesResponse.indexes:type_name -> proto.Index + 14, // 15: proto.Pilosa.CreateIndex:input_type -> proto.CreateIndexRequest + 18, // 16: proto.Pilosa.GetIndexes:input_type -> proto.GetIndexesRequest + 16, // 17: proto.Pilosa.GetIndex:input_type -> proto.GetIndexRequest + 20, // 18: proto.Pilosa.DeleteIndex:input_type -> proto.DeleteIndexRequest + 1, // 19: proto.Pilosa.QuerySQL:input_type -> proto.QuerySQLRequest + 1, // 20: proto.Pilosa.QuerySQLUnary:input_type -> proto.QuerySQLRequest + 0, // 21: proto.Pilosa.QueryPQL:input_type -> proto.QueryPQLRequest + 0, // 22: proto.Pilosa.QueryPQLUnary:input_type -> proto.QueryPQLRequest + 9, // 23: proto.Pilosa.Inspect:input_type -> proto.InspectRequest + 15, // 24: proto.Pilosa.CreateIndex:output_type -> proto.CreateIndexResponse + 19, // 25: proto.Pilosa.GetIndexes:output_type -> proto.GetIndexesResponse + 17, // 26: proto.Pilosa.GetIndex:output_type -> proto.GetIndexResponse + 21, // 27: proto.Pilosa.DeleteIndex:output_type -> proto.DeleteIndexResponse + 3, // 28: proto.Pilosa.QuerySQL:output_type -> proto.RowResponse + 5, // 29: proto.Pilosa.QuerySQLUnary:output_type -> proto.TableResponse + 3, // 30: proto.Pilosa.QueryPQL:output_type -> proto.RowResponse + 5, // 31: proto.Pilosa.QueryPQLUnary:output_type -> proto.TableResponse + 3, // 32: proto.Pilosa.Inspect:output_type -> proto.RowResponse + 24, // [24:33] is the sub-list for method output_type + 15, // [15:24] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } -var fileDescriptor_ef0691a44d1e275c = []byte{ - // 939 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00,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xa2, 0x77, 0x4f, 0x7f, 0xd6, 0x0d, 0xeb, 0xfa, 0xe7, 0xb3, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x74, 0xe6, 0x59, 0x2d, 0xed, 0x09, 0x00, 0x00, +func init() { file_pilosa_proto_init() } +func file_pilosa_proto_init() { + if File_pilosa_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pilosa_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPQLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuerySQLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatusError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RowResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decimal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InspectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Uint64Array); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdsOrKeys); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pilosa_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_pilosa_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*ColumnResponse_StringVal)(nil), + (*ColumnResponse_Uint64Val)(nil), + (*ColumnResponse_Int64Val)(nil), + (*ColumnResponse_BoolVal)(nil), + (*ColumnResponse_BlobVal)(nil), + (*ColumnResponse_Uint64ArrayVal)(nil), + (*ColumnResponse_StringArrayVal)(nil), + (*ColumnResponse_Float64Val)(nil), + (*ColumnResponse_DecimalVal)(nil), + (*ColumnResponse_TimestampVal)(nil), + } + file_pilosa_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*IdsOrKeys_Ids)(nil), + (*IdsOrKeys_Keys)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pilosa_proto_rawDesc, + NumEnums: 0, + NumMessages: 22, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_pilosa_proto_goTypes, + DependencyIndexes: file_pilosa_proto_depIdxs, + MessageInfos: file_pilosa_proto_msgTypes, + }.Build() + File_pilosa_proto = out.File + file_pilosa_proto_rawDesc = nil + file_pilosa_proto_goTypes = nil + file_pilosa_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -1313,7 +1928,7 @@ func NewPilosaClient(cc grpc.ClientConnInterface) PilosaClient { func (c *pilosaClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*CreateIndexResponse, error) { out := new(CreateIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/CreateIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/CreateIndex", in, out, opts...) if err != nil { return nil, err } @@ -1322,7 +1937,7 @@ func (c *pilosaClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, func (c *pilosaClient) GetIndexes(ctx context.Context, in *GetIndexesRequest, opts ...grpc.CallOption) (*GetIndexesResponse, error) { out := new(GetIndexesResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetIndexes", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/GetIndexes", in, out, opts...) if err != nil { return nil, err } @@ -1331,7 +1946,7 @@ func (c *pilosaClient) GetIndexes(ctx context.Context, in *GetIndexesRequest, op func (c *pilosaClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*GetIndexResponse, error) { out := new(GetIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/GetIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/GetIndex", in, out, opts...) if err != nil { return nil, err } @@ -1340,7 +1955,7 @@ func (c *pilosaClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts . func (c *pilosaClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*DeleteIndexResponse, error) { out := new(DeleteIndexResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/DeleteIndex", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/DeleteIndex", in, out, opts...) if err != nil { return nil, err } @@ -1348,7 +1963,7 @@ func (c *pilosaClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, } func (c *pilosaClient) QuerySQL(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (Pilosa_QuerySQLClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[0], "/pilosa.Pilosa/QuerySQL", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[0], "/proto.Pilosa/QuerySQL", opts...) if err != nil { return nil, err } @@ -1381,7 +1996,7 @@ func (x *pilosaQuerySQLClient) Recv() (*RowResponse, error) { func (c *pilosaClient) QuerySQLUnary(ctx context.Context, in *QuerySQLRequest, opts ...grpc.CallOption) (*TableResponse, error) { out := new(TableResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/QuerySQLUnary", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/QuerySQLUnary", in, out, opts...) if err != nil { return nil, err } @@ -1389,7 +2004,7 @@ func (c *pilosaClient) QuerySQLUnary(ctx context.Context, in *QuerySQLRequest, o } func (c *pilosaClient) QueryPQL(ctx context.Context, in *QueryPQLRequest, opts ...grpc.CallOption) (Pilosa_QueryPQLClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[1], "/pilosa.Pilosa/QueryPQL", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[1], "/proto.Pilosa/QueryPQL", opts...) if err != nil { return nil, err } @@ -1422,7 +2037,7 @@ func (x *pilosaQueryPQLClient) Recv() (*RowResponse, error) { func (c *pilosaClient) QueryPQLUnary(ctx context.Context, in *QueryPQLRequest, opts ...grpc.CallOption) (*TableResponse, error) { out := new(TableResponse) - err := c.cc.Invoke(ctx, "/pilosa.Pilosa/QueryPQLUnary", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.Pilosa/QueryPQLUnary", in, out, opts...) if err != nil { return nil, err } @@ -1430,7 +2045,7 @@ func (c *pilosaClient) QueryPQLUnary(ctx context.Context, in *QueryPQLRequest, o } func (c *pilosaClient) Inspect(ctx context.Context, in *InspectRequest, opts ...grpc.CallOption) (Pilosa_InspectClient, error) { - stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[2], "/pilosa.Pilosa/Inspect", opts...) + stream, err := c.cc.NewStream(ctx, &_Pilosa_serviceDesc.Streams[2], "/proto.Pilosa/Inspect", opts...) if err != nil { return nil, err } @@ -1478,31 +2093,31 @@ type PilosaServer interface { type UnimplementedPilosaServer struct { } -func (*UnimplementedPilosaServer) CreateIndex(ctx context.Context, req *CreateIndexRequest) (*CreateIndexResponse, error) { +func (*UnimplementedPilosaServer) CreateIndex(context.Context, *CreateIndexRequest) (*CreateIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") } -func (*UnimplementedPilosaServer) GetIndexes(ctx context.Context, req *GetIndexesRequest) (*GetIndexesResponse, error) { +func (*UnimplementedPilosaServer) GetIndexes(context.Context, *GetIndexesRequest) (*GetIndexesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIndexes not implemented") } -func (*UnimplementedPilosaServer) GetIndex(ctx context.Context, req *GetIndexRequest) (*GetIndexResponse, error) { +func (*UnimplementedPilosaServer) GetIndex(context.Context, *GetIndexRequest) (*GetIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetIndex not implemented") } -func (*UnimplementedPilosaServer) DeleteIndex(ctx context.Context, req *DeleteIndexRequest) (*DeleteIndexResponse, error) { +func (*UnimplementedPilosaServer) DeleteIndex(context.Context, *DeleteIndexRequest) (*DeleteIndexResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteIndex not implemented") } -func (*UnimplementedPilosaServer) QuerySQL(req *QuerySQLRequest, srv Pilosa_QuerySQLServer) error { +func (*UnimplementedPilosaServer) QuerySQL(*QuerySQLRequest, Pilosa_QuerySQLServer) error { return status.Errorf(codes.Unimplemented, "method QuerySQL not implemented") } -func (*UnimplementedPilosaServer) QuerySQLUnary(ctx context.Context, req *QuerySQLRequest) (*TableResponse, error) { +func (*UnimplementedPilosaServer) QuerySQLUnary(context.Context, *QuerySQLRequest) (*TableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QuerySQLUnary not implemented") } -func (*UnimplementedPilosaServer) QueryPQL(req *QueryPQLRequest, srv Pilosa_QueryPQLServer) error { +func (*UnimplementedPilosaServer) QueryPQL(*QueryPQLRequest, Pilosa_QueryPQLServer) error { return status.Errorf(codes.Unimplemented, "method QueryPQL not implemented") } -func (*UnimplementedPilosaServer) QueryPQLUnary(ctx context.Context, req *QueryPQLRequest) (*TableResponse, error) { +func (*UnimplementedPilosaServer) QueryPQLUnary(context.Context, *QueryPQLRequest) (*TableResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPQLUnary not implemented") } -func (*UnimplementedPilosaServer) Inspect(req *InspectRequest, srv Pilosa_InspectServer) error { +func (*UnimplementedPilosaServer) Inspect(*InspectRequest, Pilosa_InspectServer) error { return status.Errorf(codes.Unimplemented, "method Inspect not implemented") } @@ -1520,7 +2135,7 @@ func _Pilosa_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/CreateIndex", + FullMethod: "/proto.Pilosa/CreateIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).CreateIndex(ctx, req.(*CreateIndexRequest)) @@ -1538,7 +2153,7 @@ func _Pilosa_GetIndexes_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/GetIndexes", + FullMethod: "/proto.Pilosa/GetIndexes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).GetIndexes(ctx, req.(*GetIndexesRequest)) @@ -1556,7 +2171,7 @@ func _Pilosa_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/GetIndex", + FullMethod: "/proto.Pilosa/GetIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).GetIndex(ctx, req.(*GetIndexRequest)) @@ -1574,7 +2189,7 @@ func _Pilosa_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/DeleteIndex", + FullMethod: "/proto.Pilosa/DeleteIndex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).DeleteIndex(ctx, req.(*DeleteIndexRequest)) @@ -1613,7 +2228,7 @@ func _Pilosa_QuerySQLUnary_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/QuerySQLUnary", + FullMethod: "/proto.Pilosa/QuerySQLUnary", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).QuerySQLUnary(ctx, req.(*QuerySQLRequest)) @@ -1652,7 +2267,7 @@ func _Pilosa_QueryPQLUnary_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pilosa.Pilosa/QueryPQLUnary", + FullMethod: "/proto.Pilosa/QueryPQLUnary", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PilosaServer).QueryPQLUnary(ctx, req.(*QueryPQLRequest)) @@ -1682,7 +2297,7 @@ func (x *pilosaInspectServer) Send(m *RowResponse) error { } var _Pilosa_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pilosa.Pilosa", + ServiceName: "proto.Pilosa", HandlerType: (*PilosaServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/proto/pilosa.proto b/proto/pilosa.proto index 9443683e6..7c463779e 100644 --- a/proto/pilosa.proto +++ b/proto/pilosa.proto @@ -1,9 +1,7 @@ syntax = "proto3"; -package pilosa; +package proto; -//import "public.proto"; - -option go_package = "github.com/pilosa/pilosa/v2/proto"; +option go_package = "../proto"; message QueryPQLRequest { string index = 1; @@ -93,6 +91,7 @@ message Index { message CreateIndexRequest { string name = 1; bool keys = 2; + string description = 3; } message CreateIndexResponse { diff --git a/server.go b/server.go index b7487e28e..337b505b0 100644 --- a/server.go +++ b/server.go @@ -1015,6 +1015,7 @@ func (s *Server) receiveMessage(m Message) error { if err := idx.UpdateFieldLocal(&obj.CreateFieldMessage, obj.Update); err != nil { return err } + case *DeleteFieldMessage: idx := s.holder.Index(obj.Index) if err := idx.DeleteField(obj.Field); err != nil { diff --git a/server/handler_test.go b/server/handler_test.go index b5dd178ef..7039fae5b 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -179,12 +179,12 @@ func TestHandler_Endpoints(t *testing.T) { const shard = 0 tx0 := holder.Txf().NewWritableQcx() defer tx0.Abort() - if f, err := i0.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeDefault()); err != nil { + if f, err := i0.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx0, 0, 0, nil); err != nil { t.Fatal(err) } - if _, err := i0.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeDefault()); err != nil { + if _, err := i0.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } if err := tx0.Finish(); err != nil { @@ -194,7 +194,7 @@ func TestHandler_Endpoints(t *testing.T) { i1 := hldr.MustCreateIndexIfNotExists("i1", pilosa.IndexOptions{}) tx1 := holder.Txf().NewWritableQcx() defer tx1.Abort() - if f, err := i1.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeDefault()); err != nil { + if f, err := i1.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx1, 0, 0, nil); err != nil { t.Fatal(err) @@ -215,9 +215,10 @@ func TestHandler_Endpoints(t *testing.T) { &bodySchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } - // DO NOT COMPARE `CreatedAt` - reset to 0 + // DO NOT COMPARE `CreatedAt` & 'UpdatedAt' - reset to 0 for _, i := range bodySchema.Indexes { i.CreatedAt = 0 + i.UpdatedAt = 0 for _, f := range i.Fields { f.CreatedAt = 0 } @@ -225,8 +226,27 @@ func TestHandler_Endpoints(t *testing.T) { // var targetSchema pilosa.Schema - if err := json.Unmarshal([]byte(fmt.Sprintf(`{"indexes":[{"name":"i0","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}},{"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%d},{"name":"i1","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%[1]d}]}`, pilosa.ShardWidth)), - &targetSchema); err != nil { + if err := json.Unmarshal([]byte(fmt.Sprintf(`{"indexes":[ + { + "name":"i0", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}, + {"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}} + ], + "shardWidth":%d + }, + { + "name":"i1", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}],"shardWidth":%[1]d} + ] + }`, pilosa.ShardWidth)), &targetSchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } @@ -239,13 +259,13 @@ func TestHandler_Endpoints(t *testing.T) { i2 := hldr.MustCreateIndexIfNotExists("i2", pilosa.IndexOptions{}) tx2 := holder.Txf().NewWritableQcx() defer tx2.Abort() - if f, err := i2.CreateFieldIfNotExists("f0", pilosa.OptFieldTypeSet(pilosa.CacheTypeRanked, 1000)); err != nil { + if f, err := i2.CreateFieldIfNotExists("f0", "", pilosa.OptFieldTypeSet(pilosa.CacheTypeRanked, 1000)); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - f, err := i2.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeInt(-100, 100)) + f, err := i2.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeInt(-100, 100)) if err != nil { t.Fatal(err) } @@ -256,7 +276,7 @@ func TestHandler_Endpoints(t *testing.T) { } } - f, err = i2.CreateFieldIfNotExists("f2", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-10, 0), pql.NewDecimal(10, 0))) + f, err = i2.CreateFieldIfNotExists("f2", "", pilosa.OptFieldTypeDecimal(1, pql.NewDecimal(-10, 0), pql.NewDecimal(10, 0))) if err != nil { t.Fatal(err) } @@ -267,17 +287,17 @@ func TestHandler_Endpoints(t *testing.T) { } } - if f, err := i2.CreateFieldIfNotExists("f3", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")); err != nil { + if f, err := i2.CreateFieldIfNotExists("f3", "", pilosa.OptFieldTypeTime(pilosa.TimeQuantum("YMDH"), "0")); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - if f, err := i2.CreateFieldIfNotExists("f4", pilosa.OptFieldTypeMutex(pilosa.CacheTypeRanked, 5000)); err != nil { + if f, err := i2.CreateFieldIfNotExists("f4", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeRanked, 5000)); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) } - if f, err := i2.CreateFieldIfNotExists("f5", pilosa.OptFieldTypeBool()); err != nil { + if f, err := i2.CreateFieldIfNotExists("f5", "", pilosa.OptFieldTypeBool()); err != nil { t.Fatal(err) } else if _, err := f.SetBit(tx2, 0, 0, nil); err != nil { t.Fatal(err) @@ -298,9 +318,10 @@ func TestHandler_Endpoints(t *testing.T) { if err := json.Unmarshal(w.Body.Bytes(), &bodySchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } - // DO NOT COMPARE `CreatedAt` - reset to 0 + // DO NOT COMPARE `CreatedAt` & `UpdatedAt`` - reset to 0 for _, i := range bodySchema.Indexes { i.CreatedAt = 0 + i.UpdatedAt = 0 for _, f := range i.Fields { f.CreatedAt = 0 } @@ -308,7 +329,44 @@ func TestHandler_Endpoints(t *testing.T) { // var targetSchema pilosa.Schema - target := fmt.Sprintf(`{"indexes":[{"name":"i0","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}},{"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]}],"shardWidth":%[1]d},{"name":"i1","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]}],"shardWidth":%[1]d},{"name":"i2","options":{"keys":false,"trackExistence":false},"fields":[{"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":1000,"keys":false},"views":[{"name":"standard"}]},{"name":"f1","options":{"type":"int","base":0,"bitDepth":0,"min":-100,"max":100,"keys":false,"foreignIndex":""},"views":[{"name":"bsig_f1"}]},{"name":"f2","options":{"type":"decimal","base":0,"scale":1,"bitDepth":0,"min":-10,"max":10,"keys":false},"views":[{"name":"bsig_f2"}]},{"name":"f3","options":{"type":"time","timeQuantum":"YMDH","keys":false,"noStandardView":false},"views":[{"name":"standard"}]},{"name":"f4","options":{"type":"mutex","cacheType":"ranked","cacheSize":5000,"keys":false},"views":[{"name":"standard"}]},{"name":"f5","options":{"type":"bool"},"views":[{"name":"standard"}]}],"shardWidth":%[1]d}]}`, pilosa.ShardWidth) + target := fmt.Sprintf(`{"indexes":[ + { + "name":"i0", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false}}, + {"name":"f1","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d + }, + { + "name":"i1", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":50000,"keys":false},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d + }, + { + "name":"i2", + "options":{"keys":false,"trackExistence":false}, + "updatedAt": 0, + "description": "this is a description", + "fields":[ + {"name":"f0","options":{"type":"set","cacheType":"ranked","cacheSize":1000,"keys":false},"views":[{"name":"standard"}]}, + {"name":"f1","options":{"type":"int","base":0,"bitDepth":0,"min":-100,"max":100,"keys":false,"foreignIndex":""},"views":[{"name":"bsig_f1"}]}, + {"name":"f2","options":{"type":"decimal","base":0,"scale":1,"bitDepth":0,"min":-10,"max":10,"keys":false},"views":[{"name":"bsig_f2"}]}, + {"name":"f3","options":{"type":"time","timeQuantum":"YMDH","keys":false,"noStandardView":false},"views":[{"name":"standard"}]}, + {"name":"f4","options":{"type":"mutex","cacheType":"ranked","cacheSize":5000,"keys":false},"views":[{"name":"standard"}]}, + {"name":"f5","options":{"type":"bool"},"views":[{"name":"standard"}]} + ], + "shardWidth":%[1]d} + ] + }`, pilosa.ShardWidth) if err := json.Unmarshal([]byte(target), &targetSchema); err != nil { t.Fatalf("unexpected unmarshalling error: %v", err) } @@ -416,7 +474,7 @@ func TestHandler_Endpoints(t *testing.T) { }) t.Run("ImportRoaringOverwrite", func(t *testing.T) { - if _, err := i0.CreateFieldIfNotExists("int-field", pilosa.OptFieldTypeInt(0, 10)); err != nil { + if _, err := i0.CreateFieldIfNotExists("int-field", "", pilosa.OptFieldTypeInt(0, 10)); err != nil { t.Fatal(err) } w := httptest.NewRecorder() @@ -957,7 +1015,7 @@ func TestHandler_Endpoints(t *testing.T) { t.Run("Field delete", func(t *testing.T) { i := hldr.MustCreateIndexIfNotExists("i", pilosa.IndexOptions{}) - if _, err := i.CreateFieldIfNotExists("f1", pilosa.OptFieldTypeDefault()); err != nil { + if _, err := i.CreateFieldIfNotExists("f1", "", pilosa.OptFieldTypeDefault()); err != nil { t.Fatal(err) } w := httptest.NewRecorder() diff --git a/sql3/planner/executionplanner_test.go b/sql3/planner/executionplanner_test.go index 50b309449..7db2d34d9 100644 --- a/sql3/planner/executionplanner_test.go +++ b/sql3/planner/executionplanner_test.go @@ -22,25 +22,25 @@ func TestPlanner_Show(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - index2, err := c.GetHolder(0).CreateIndex(c.Idx("l"), pilosa.IndexOptions{TrackExistence: false}) + index2, err := c.GetHolder(0).CreateIndex(c.Idx("l"), "", pilosa.IndexOptions{TrackExistence: false}) if err != nil { t.Fatal(err) } - if _, err := index2.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index2.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index2.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index2.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -532,14 +532,14 @@ func TestPlanner_AlterTable(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -594,14 +594,14 @@ func TestPlanner_DropTable(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), pilosa.IndexOptions{TrackExistence: true}) + index, err := c.GetHolder(0).CreateIndex(c.Idx("i"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := index.CreateField("f", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := index.CreateField("f", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := index.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := index.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -617,25 +617,25 @@ func TestPlanner_ExpressionsInSelectListParen(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("y", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("y", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -698,20 +698,20 @@ func TestPlanner_ExpressionsInSelectListLiterals(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("d", pilosa.OptFieldTypeDecimal(2)); err != nil { + } else if _, err := i0.CreateField("d", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("ts", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { + } else if _, err := i0.CreateField("ts", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("str", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { + } else if _, err := i0.CreateField("str", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -840,20 +840,20 @@ func TestPlanner_ExpressionsInSelectListCase(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("d", pilosa.OptFieldTypeDecimal(2)); err != nil { + } else if _, err := i0.CreateField("d", "", pilosa.OptFieldTypeDecimal(2)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("ts", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { + } else if _, err := i0.CreateField("ts", "", pilosa.OptFieldTypeTimestamp(pilosa.DefaultEpoch, "s")); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("str", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { + } else if _, err := i0.CreateField("str", "", pilosa.OptFieldTypeMutex(pilosa.CacheTypeLRU, pilosa.DefaultCacheSize), pilosa.OptFieldKeys()); err != nil { t.Fatal(err) } @@ -921,25 +921,25 @@ func TestPlanner_Select(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("y", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("y", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1120,14 +1120,14 @@ func TestPlanner_SelectOrderBy(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1170,14 +1170,14 @@ func TestPlanner_SelectSelectSource(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1242,23 +1242,23 @@ func TestPlanner_In(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("parentid", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("parentid", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1373,23 +1373,23 @@ func TestPlanner_Distinct(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), pilosa.IndexOptions{TrackExistence: true}) + i1, err := c.GetHolder(0).CreateIndex(c.Idx("k"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i1.CreateField("parentid", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i1.CreateField("parentid", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) - } else if _, err := i1.CreateField("x", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + } else if _, err := i1.CreateField("x", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } @@ -1489,16 +1489,16 @@ func TestPlanner_SelectTop(t *testing.T) { c := test.MustRunCluster(t, 1) defer c.Close() - i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), pilosa.IndexOptions{TrackExistence: true}) + i0, err := c.GetHolder(0).CreateIndex(c.Idx("j"), "", pilosa.IndexOptions{TrackExistence: true}) if err != nil { t.Fatal(err) } - if _, err := i0.CreateField("a", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("a", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } - if _, err := i0.CreateField("b", pilosa.OptFieldTypeInt(0, 1000)); err != nil { + if _, err := i0.CreateField("b", "", pilosa.OptFieldTypeInt(0, 1000)); err != nil { t.Fatal(err) } diff --git a/sql3/planner/opcreatetable.go b/sql3/planner/opcreatetable.go index 582227aa8..f7ea4f64b 100644 --- a/sql3/planner/opcreatetable.go +++ b/sql3/planner/opcreatetable.go @@ -109,6 +109,7 @@ func (i *createTableRowIter) Next(ctx context.Context) (types.Row, error) { } } + // TODO (pok) add ability to add description here if err := i.planner.schemaAPI.CreateIndexAndFields(ctx, i.tableName, options, fields); err != nil { if _, ok := errors.Cause(err).(pilosa.ConflictError); ok { if i.failIfExists { diff --git a/test/holder.go b/test/holder.go index 4a7cdb73c..3f00d1840 100644 --- a/test/holder.go +++ b/test/holder.go @@ -64,7 +64,7 @@ func (h *Holder) Reopen() error { // MustCreateIndexIfNotExists returns a given index. Panic on error. func (h *Holder) MustCreateIndexIfNotExists(index string, opt pilosa.IndexOptions) *Index { - idx, err := h.Holder.CreateIndexIfNotExists(index, opt) + idx, err := h.Holder.CreateIndexIfNotExists(index, "", opt) if err != nil { h.tb.Fatalf("creating index: %v", err) } @@ -74,7 +74,7 @@ func (h *Holder) MustCreateIndexIfNotExists(index string, opt pilosa.IndexOption // Row returns a Row for a given field. func (h *Holder) Row(index, field string, rowID uint64) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -116,7 +116,7 @@ func (h *Holder) ReadRow(index, field string, rowID uint64) *pilosa.Row { func (h *Holder) RowTime(index, field string, rowID uint64, t time.Time, quantum string) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -141,7 +141,7 @@ func (h *Holder) SetBit(index, field string, rowID, columnID uint64) { // SetBitTime sets a bit with timestamp on the given field. func (h *Holder) SetBitTime(index, field string, rowID, columnID uint64, t *time.Time) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -162,7 +162,7 @@ func (h *Holder) SetBitTime(index, field string, rowID, columnID uint64, t *time // ClearBit clears a bit on the given field. func (h *Holder) ClearBit(index, field string, rowID, columnID uint64) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeDefault()) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeDefault()) if err != nil { panic(err) } @@ -191,7 +191,7 @@ func (h *Holder) MustSetBits(index, field string, rowID uint64, columnIDs ...uin // SetValue sets an integer value on the given field. func (h *Holder) SetValue(index, field string, columnID uint64, value int64) *Index { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } @@ -213,7 +213,7 @@ func (h *Holder) SetValue(index, field string, columnID uint64, value int64) *In // Value returns the integer value for a given column. func (h *Holder) Value(index, field string, columnID uint64) (int64, bool) { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } @@ -232,7 +232,7 @@ func (h *Holder) Value(index, field string, columnID uint64) (int64, bool) { // on the given range. func (h *Holder) Range(index, field string, op pql.Token, predicate int64) *pilosa.Row { idx := h.MustCreateIndexIfNotExists(index, pilosa.IndexOptions{}) - f, err := idx.CreateFieldIfNotExists(field, pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) + f, err := idx.CreateFieldIfNotExists(field, "", pilosa.OptFieldTypeInt(math.MinInt64, math.MaxInt64)) if err != nil { panic(err) } diff --git a/test/index.go b/test/index.go index 4c453e494..b05856aa5 100644 --- a/test/index.go +++ b/test/index.go @@ -20,7 +20,7 @@ func newIndex(tb testing.TB) (*Holder, *Index) { testhook.Cleanup(tb, func() { h.Close() }) - index, err := h.CreateIndex("i", pilosa.IndexOptions{}) + index, err := h.CreateIndex("i", "", pilosa.IndexOptions{}) if err != nil { panic(err) } @@ -51,8 +51,8 @@ func (i *Index) Reopen() error { } // CreateField creates a field with the given options. -func (i *Index) CreateField(name string, opts ...pilosa.FieldOption) (*Field, error) { - f, err := i.Index.CreateField(name, opts...) +func (i *Index) CreateField(name string, requestUserID string, opts ...pilosa.FieldOption) (*Field, error) { + f, err := i.Index.CreateField(name, requestUserID, opts...) if err != nil { return nil, err } @@ -60,8 +60,8 @@ func (i *Index) CreateField(name string, opts ...pilosa.FieldOption) (*Field, er } // CreateFieldIfNotExists creates a field with the given options if it doesn't exist. -func (i *Index) CreateFieldIfNotExists(name string, opts ...pilosa.FieldOption) (*Field, error) { - f, err := i.Index.CreateFieldIfNotExists(name, opts...) +func (i *Index) CreateFieldIfNotExists(name string, requestUserID string, opts ...pilosa.FieldOption) (*Field, error) { + f, err := i.Index.CreateFieldIfNotExists(name, requestUserID, opts...) if err != nil { return nil, err }