Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • perxis/perxis-proto
1 result
Show changes
Commits on Source (6)
Showing
with 162 additions and 25 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;
......@@ -24,7 +24,6 @@ message Collection {
optional bool system = 6;
optional bool no_data = 12;
string schema = 7;
// string feature = 8;
bool hidden = 13;
message View {
......@@ -49,6 +48,7 @@ message Collection {
}
StateInfo state_info = 10;
repeated string tags = 16;
Access access = 20;
}
......
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) {}
}
syntax = "proto3";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.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;
......@@ -10,6 +11,13 @@ message Environment {
string id = 1;
string space_id = 2;
string description = 3;
StateInfo state_info = 4;
repeated string aliases = 6;
Config config = 10;
}
message StateInfo {
enum State {
UNKNOWN = 0;
NEW = 1;
......@@ -17,14 +25,15 @@ message Environment {
READY = 3;
ERROR = 4;
}
State state = 4;
string state_info = 5;
repeated string aliases = 6;
Config config = 10;
State state = 1;
string info = 2;
google.protobuf.Timestamp started_at = 3;
}
message Config {
string source_id = 1;
// Deprecated
repeated string features = 2;
}
......@@ -74,6 +83,18 @@ message DeleteRequest {
string env_id = 2;
}
message MigrateRequest {
string space_id = 1;
string env_id = 2;
MigrateOptions options = 10;
}
message MigrateOptions {
// Ожидать завершения миграции в синхронном режиме. Если в запрос передан контекст с таймаутом,
// то после истечения таймаута миграция продолжится в асинхронном режиме
bool wait = 1;
}
service Environments {
rpc Create(CreateRequest) returns(CreateResponse) {}
rpc Get(GetRequest) returns(GetResponse) {}
......@@ -82,4 +103,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;
......@@ -70,6 +70,7 @@ message ExtensionRequestResult {
ERROR = 1; // Возникла ошибка
PENDING = 2; // Запрос ожидает выполнения
IN_PROGRESS = 3; // Запрос выполняется
PARAMETERS_REQUIRED= 4; // Требуются дополнительные данные для выполнения запроса
}
State state = 10000; // Состояние расширение
......@@ -146,6 +147,7 @@ message ActionResponse {
ERROR = 1; // Возникла ошибка
PENDING = 2; // Запрос ожидает выполнения
IN_PROGRESS = 3; // Запрос выполняется
PARAMETERS_REQUIRED = 4; // Требуются дополнительные данные для выполнения запроса
}
State state = 10000; // Состояние расширение
......
......@@ -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;
......@@ -77,6 +77,45 @@ message Item {
Permissions permissions = 22;
}
/**
* Объекты, описывающие произошедшие в сервисе события
*/
message EventCreate {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
string item_id = 4;
}
message EventUpdate {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
string item_id = 4;
}
message EventPublish {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
string item_id = 4;
}
message EventUnpublish {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
string item_id = 4;
}
message EventDelete {
string space_id = 1;
string env_id = 2;
string collection_id = 3;
string item_id = 4;
}
message Filter {
repeated string id = 1; // Список ID записей кото
repeated common.Filter data = 2; // Список фильтров
......@@ -127,6 +166,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 of 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 +276,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 +378,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;
......