Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-proto
Commits
f4915552
Commit
f4915552
authored
5 months ago
by
ko_oler
Browse files
Options
Downloads
Patches
Plain Diff
Добавлены аннотации (google.api.http) в спецификацию сервиса "Items" для работы с Rest API
parent
0627c9f8
No related branches found
No related tags found
1 merge request
!91
Добавлены аннотации (google.api.http) в спецификацию сервиса "Items" для работы с Rest API
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/items/items.proto
+111
-20
111 additions, 20 deletions
proto/items/items.proto
with
111 additions
and
20 deletions
proto/items/items.proto
+
111
−
20
View file @
f4915552
...
...
@@ -13,6 +13,7 @@ import "common/common.proto";
import
"common/error.proto"
;
import
"google/protobuf/timestamp.proto"
;
import
"google/protobuf/struct.proto"
;
import
"google/api/annotations.proto"
;
option
go_package
=
"git.perx.ru/perxis/perxis-go/proto/items;items"
;
...
...
@@ -446,48 +447,138 @@ service Items {
/**
* Создать запись
*/
rpc
Create
(
CreateRequest
)
returns
(
CreateResponse
)
{}
rpc
Create
(
CreateRequest
)
returns
(
CreateResponse
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/create"
body
:
"item"
};
}
/**
* Валидация данных записи
*/
rpc
Introspect
(
IntrospectRequest
)
returns
(
IntrospectResponse
)
{}
rpc
Introspect
(
IntrospectRequest
)
returns
(
IntrospectResponse
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/introspect"
body
:
"item"
};
}
/**
* Получение записи по идентификатору
*/
rpc
Get
(
GetRequest
)
returns
(
GetResponse
)
{}
rpc
Get
(
GetRequest
)
returns
(
GetResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}"
};
}
/**
* Поиск по текущим записям
*/
rpc
Find
(
FindRequest
)
returns
(
FindResponse
)
{}
rpc
Update
(
UpdateRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
Delete
(
DeleteRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
Undelete
(
UndeleteRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
Publish
(
PublishRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
Unpublish
(
UnpublishRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
GetPublished
(
GetPublishedRequest
)
returns
(
GetPublishedResponse
)
{}
rpc
FindPublished
(
FindPublishedRequest
)
returns
(
FindPublishedResponse
)
{}
rpc
CheckoutRevision
(
CheckoutRevisionRequest
)
returns
(
CheckoutRevisionResponse
)
{}
rpc
Find
(
FindRequest
)
returns
(
FindResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/find"
};
}
rpc
Update
(
UpdateRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
put
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}"
body
:
"*"
};
}
rpc
Delete
(
DeleteRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
delete
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/{options.update_attrs}/{options.erase}"
};
}
rpc
Undelete
(
UndeleteRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/undelete"
body
:
"*"
};
}
rpc
Publish
(
PublishRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/publish"
body
:
"*"
};
}
rpc
Unpublish
(
UnpublishRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/unpublish"
body
:
"*"
};
}
rpc
GetPublished
(
GetPublishedRequest
)
returns
(
GetPublishedResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}/published"
};
}
rpc
FindPublished
(
FindPublishedRequest
)
returns
(
FindPublishedResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/find/published"
};
}
rpc
CheckoutRevision
(
CheckoutRevisionRequest
)
returns
(
CheckoutRevisionResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}/revision/{revision_id}/checkout-revision"
};
}
/**
* Расчет значений по существующим данным. Например, получение среднего значения поля
*/
rpc
Aggregate
(
AggregateRequest
)
returns
(
AggregateResponse
)
{}
rpc
Aggregate
(
AggregateRequest
)
returns
(
AggregateResponse
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/aggregate"
body
:
"*"
};
}
/**
* Расчет значений по существующим **опубликованным** данным.
*/
rpc
AggregatePublished
(
AggregatePublishedRequest
)
returns
(
AggregatePublishedResponse
)
{}
rpc
GetRevision
(
GetRevisionRequest
)
returns
(
GetRevisionResponse
)
{}
rpc
ListRevisions
(
ListRevisionsRequest
)
returns
(
ListRevisionsResponse
)
{}
rpc
Archive
(
ArchiveRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
FindArchived
(
FindArchivedRequest
)
returns
(
FindArchivedResponse
)
{}
rpc
Unarchive
(
UnarchiveRequest
)
returns
(
google.protobuf.Empty
)
{}
rpc
GetArchived
(
GetArchivedRequest
)
returns
(
GetArchivedResponse
)
{}
rpc
AggregatePublished
(
AggregatePublishedRequest
)
returns
(
AggregatePublishedResponse
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/aggregate/published"
body
:
"*"
};
}
rpc
GetRevision
(
GetRevisionRequest
)
returns
(
GetRevisionResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}/revision/{revision_id}"
};
}
rpc
ListRevisions
(
ListRevisionsRequest
)
returns
(
ListRevisionsResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}/revisions"
};
}
rpc
Archive
(
ArchiveRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/archive"
body
:
"item"
};
}
rpc
FindArchived
(
FindArchivedRequest
)
returns
(
FindArchivedResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/find/archived"
};
}
rpc
Unarchive
(
UnarchiveRequest
)
returns
(
google.protobuf.Empty
)
{
option
(
google.api.http
)
=
{
post
:
"/v1/content/spaces/{item.space_id}/environments/{item.env_id}/collections/{item.collection_id}/items/{item.id}/unarchive"
body
:
"item"
};
}
rpc
GetArchived
(
GetArchivedRequest
)
returns
(
GetArchivedResponse
)
{
option
(
google.api.http
)
=
{
get
:
"/v1/content/spaces/{space_id}/environments/{env_id}/collections/{collection_id}/items/{item_id}/archived"
};
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment