Skip to content
Snippets Groups Projects
Commit 277439a9 authored by Anton Sattarov's avatar Anton Sattarov :cucumber:
Browse files

Исправлен параметр go_package

parent 83fd620e
No related branches found
No related tags found
1 merge request!2Исправлен параметр go_package и обновлены proto файлы из perxis
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
Showing
with 100 additions and 20 deletions
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/clients;clients";
option go_package = "git.perx.ru/perxis/perxis-go/clients;clients";
package content.clients;
......
......@@ -3,7 +3,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/collaborators;collaborators";
option go_package = "git.perx.ru/perxis/perxis-go/collaborators;collaborators";
package content.collaborators;
......
......@@ -4,7 +4,7 @@ import "google/protobuf/empty.proto";
import "common/common.proto";
import "google/protobuf/timestamp.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/collections;collections";
option go_package = "git.perx.ru/perxis/perxis-go/collections;collections";
package content.collections;
......
syntax = "proto3";
option go_package = "git.perx.ru/perxis/perxis-go/proto/common;common";
option go_package = "git.perx.ru/perxis/perxis-go/common;common";
package common;
......
......@@ -4,8 +4,9 @@ import "locales/locales.proto";
import "environments/environments.proto";
import "collections/collections.proto";
import "items/items.proto";
import "google/protobuf/struct.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/delivery;delivery";
option go_package = "git.perx.ru/perxis/perxis-go/delivery;delivery";
package delivery;
......@@ -74,6 +75,21 @@ message FindItemsResponse{
int32 total = 2;
}
message AggregateOptions {
map<string, string> fields = 1;
}
message AggregateRequest {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
content.items.Filter filter = 4;
AggregateOptions options = 10;
}
message AggregateResponse{
google.protobuf.Struct result = 1;
}
service Delivery {
rpc ListLocales(ListLocalesRequest) returns(ListLocalesResponse) {}
......@@ -85,4 +101,6 @@ service Delivery {
rpc GetItem(GetItemRequest) returns(GetItemResponse) {}
rpc FindItems(FindItemsRequest) returns(FindItemsResponse) {}
rpc Aggregate(AggregateRequest) returns(AggregateResponse) {}
}
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/environments;environments";
option go_package = "git.perx.ru/perxis/perxis-go/environments;environments";
package content.environments;
......@@ -74,6 +74,11 @@ message DeleteRequest {
string env_id = 2;
}
message MigrateRequest {
string space_id = 1;
string env_id = 2;
}
service Environments {
rpc Create(CreateRequest) returns(CreateResponse) {}
rpc Get(GetRequest) returns(GetResponse) {}
......@@ -82,4 +87,5 @@ service Environments {
rpc SetAlias(SetAliasRequest) returns(google.protobuf.Empty) {}
rpc RemoveAlias(RemoveAliasRequest) returns(google.protobuf.Empty) {}
rpc Delete(DeleteRequest) returns(google.protobuf.Empty) {}
rpc Migrate(MigrateRequest) returns(google.protobuf.Empty) {}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@
*/
syntax = "proto3";
option go_package = "git.perx.ru/perxis/perxis-go/proto/extensions;extensions";
option go_package = "git.perx.ru/perxis/perxis-go/extensions;extensions";
package extensions;
......
......@@ -27,7 +27,7 @@
*/
syntax = "proto3";
option go_package = "git.perx.ru/perxis/perxis-go/proto/extensions;extensions";
option go_package = "git.perx.ru/perxis/perxis-go/extensions;extensions";
package extensions;
......
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/files;files";
option go_package = "git.perx.ru/perxis/perxis-go/files;files";
package files;
......
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "files/files.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/images;images";
option go_package = "git.perx.ru/perxis/perxis-go/images;images";
package images;
......
......@@ -4,7 +4,7 @@ import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/invitations;invitations";
option go_package = "git.perx.ru/perxis/perxis-go/invitations;invitations";
package content.invitations;
......
......@@ -13,7 +13,7 @@ import "common/common.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/items;items";
option go_package = "git.perx.ru/perxis/perxis-go/items;items";
package content.items;
......@@ -127,6 +127,25 @@ message ListRevisionsOptions {
common.FindOptions options = 2;
}
// Fields - поля которые должны быть возвращены или вычислены в результате.
// Ключ (string) - имя поля под которым будет добавляться результат.
// Значение (string) - является выражением, вычисление которого сформирует результат
// Функции для выражений (для поля F, типа T):
// - distinct(F) - все значения поля, тип результат []T
// - min(F) - минимальное значение поля, тип результат T
// - max(F) - максимальное значение поля, тип результат T
// - avg(F) - среднее значения поля, тип результат T
// - sum(F) - сумма значений поля, тип результат T
// - count() - число записей, тип результат int
// Пример: {'average C': 'avg(a.b.c)'}
message AggregateOptions {
map<string, string> fields = 1;
}
message AggregatePublishedOptions {
map<string, string> fields = 1;
}
message CreateRequest {
Item item = 1;
CreateOptions options = 2;
......@@ -218,6 +237,31 @@ message FindPublishedResponse{
int32 total = 2;
}
message AggregateRequest {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
Filter filter = 4;
AggregateOptions options = 10;
}
/**
* Содержит в себе набор `название:значение`. Название соответствует переданному в AggregateOptions ключу.
*/
message AggregateResponse{
google.protobuf.Struct result = 1;
}
message AggregatePublishedRequest {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
Filter filter = 4;
AggregatePublishedOptions options = 10;
}
message AggregatePublishedResponse{
google.protobuf.Struct result = 1;
}
message GetRevisionRequest {
string space_id = 1;
string env_id = 2;
......@@ -295,6 +339,17 @@ service Items {
rpc GetPublished(GetPublishedRequest) returns(GetPublishedResponse) {}
rpc FindPublished(FindPublishedRequest) returns(FindPublishedResponse) {}
/**
* Расчет значений по существующим данным. Например, получение среднего значения поля
*/
rpc Aggregate(AggregateRequest) returns(AggregateResponse) {}
/**
* Расчет значений по существующим **опубликованным** данным.
*/
rpc AggregatePublished(AggregatePublishedRequest) returns(AggregatePublishedResponse) {}
rpc GetRevision(GetRevisionRequest) returns(GetRevisionResponse) {}
rpc ListRevisions(ListRevisionsRequest) returns(ListRevisionsResponse) {}
......
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/locales;locales";
option go_package = "git.perx.ru/perxis/perxis-go/locales;locales";
package content.locales;
......
......@@ -3,7 +3,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/members;members";
option go_package = "git.perx.ru/perxis/perxis-go/members;members";
package account.members;
......
......@@ -3,7 +3,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/organizations;organizations";
option go_package = "git.perx.ru/perxis/perxis-go/organizations;organizations";
package account.organizations;
......
......@@ -2,7 +2,7 @@ syntax = "proto3";
import "items/items.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/references;references";
option go_package = "git.perx.ru/perxis/perxis-go/references;references";
package content.references;
......@@ -10,6 +10,7 @@ package content.references;
message Reference {
string id = 1;
string collection_id = 2;
bool disabled = 3;
}
message GetRequest {
......
......@@ -3,7 +3,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/roles;roles";
option go_package = "git.perx.ru/perxis/perxis-go/roles;roles";
package content.roles;
......
syntax = "proto3";
option go_package = "git.perx.ru/perxis/perxis-go/proto/spaces;spaces";
option go_package = "git.perx.ru/perxis/perxis-go/spaces;spaces";
package content.spaces;
......
......@@ -4,7 +4,7 @@ import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/users;users";
option go_package = "git.perx.ru/perxis/perxis-go/users;users";
package account.users;
......
......@@ -3,7 +3,7 @@ syntax = "proto3";
import "google/protobuf/empty.proto";
import "common/common.proto";
option go_package = "git.perx.ru/perxis/perxis-go/proto/versions/account;account";
option go_package = "git.perx.ru/perxis/perxis-go/versions/account;account";
package account;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment