Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor 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-go
Commits
67e43929
Commit
67e43929
authored
5 months ago
by
Anton Sattarov
Browse files
Options
Downloads
Patches
Plain Diff
Добавлено передача коллекции во все методы интерфейса items storage
parent
2fcf77f2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
perxis-proto
+1
-1
1 addition, 1 deletion
perxis-proto
pkg/items/storage.go
+11
-11
11 additions, 11 deletions
pkg/items/storage.go
with
12 additions
and
12 deletions
perxis-proto
@
0aed1eec
Compare
95aca241
...
0aed1eec
Subproject commit
95aca241a0cb17f5e1e9f584b1993bf7b933588e
Subproject commit
0aed1eecb2c55f4b0ec70a01f3cb7e12e7dc0bcb
This diff is collapsed.
Click to expand it.
pkg/items/storage.go
+
11
−
11
View file @
67e43929
...
@@ -30,7 +30,7 @@ type Storage interface {
...
@@ -30,7 +30,7 @@ type Storage interface {
Create
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
item
*
Item
,
options
...*
CreateOptions
)
(
*
Item
,
error
)
Create
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
item
*
Item
,
options
...*
CreateOptions
)
(
*
Item
,
error
)
// CreateRevision - перенести ревизию в коллекцию Revisions
// CreateRevision - перенести ревизию в коллекцию Revisions
CreateRevision
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
string
)
error
CreateRevision
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
string
)
error
// Update - Обновление текущей ревизии
// Update - Обновление текущей ревизии
Update
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
item
*
Item
,
options
...*
UpdateOptions
)
error
Update
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
item
*
Item
,
options
...*
UpdateOptions
)
error
...
@@ -45,43 +45,43 @@ type Storage interface {
...
@@ -45,43 +45,43 @@ type Storage interface {
ListRevisions
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
itemId
string
,
options
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
ListRevisions
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
itemId
string
,
options
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
// ChangeRevisionsItemID - заменить ID элемента у его ревизий
// ChangeRevisionsItemID - заменить ID элемента у его ревизий
ChangeRevisionsItemID
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
,
newItemId
string
)
error
ChangeRevisionsItemID
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
,
newItemId
string
)
error
// Publish - опубликовать запись
// Publish - опубликовать запись
Publish
(
ctx
context
.
Context
,
published
*
Item
,
options
...*
PublishOptions
)
error
Publish
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
published
*
Item
,
options
...*
PublishOptions
)
error
// Unpublish - отменить публикацию записи
// Unpublish - отменить публикацию записи
Unpublish
(
ctx
context
.
Context
,
unpublished
*
Item
,
options
...*
UnpublishOptions
)
error
Unpublish
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
unpublished
*
Item
,
options
...*
UnpublishOptions
)
error
// FindPublished - поиск по опубликованным записям, коллекция 'items_published'
// FindPublished - поиск по опубликованным записям, коллекция 'items_published'
FindPublished
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
filter
*
Filter
,
opts
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
FindPublished
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
filter
*
Filter
,
opts
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
// Archive - архивация записи
// Archive - архивация записи
Archive
(
ctx
context
.
Context
,
archived
*
Item
,
options
...*
ArchiveOptions
)
error
Archive
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
archived
*
Item
,
options
...*
ArchiveOptions
)
error
// Unarchive - разархивация записи
// Unarchive - разархивация записи
Unarchive
(
ctx
context
.
Context
,
unarchived
*
Item
,
options
...*
UnarchiveOptions
)
error
Unarchive
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
unarchived
*
Item
,
options
...*
UnarchiveOptions
)
error
// FindArchived - поиск по архивированным записям, коллекция 'items_archived'
// FindArchived - поиск по архивированным записям, коллекция 'items_archived'
FindArchived
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
filter
*
Filter
,
opts
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
FindArchived
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
filter
*
Filter
,
opts
...*
StorageFindOptions
)
([]
*
Item
,
int
,
error
)
// RemoveItems - удаление записи из коллекций Items
// RemoveItems - удаление записи из коллекций Items
RemoveItems
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
string
,
options
...*
DeleteOptions
)
error
RemoveItems
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
string
,
options
...*
DeleteOptions
)
error
// RemovePublished - удаление записи из коллекций Published
// RemovePublished - удаление записи из коллекций Published
RemovePublished
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
string
,
options
...*
DeleteOptions
)
error
RemovePublished
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
string
,
options
...*
DeleteOptions
)
error
// CleanUpRevisions - очистка ревизий элемента, согласно настройкам лимитов для ревизий в коллекции
// CleanUpRevisions - очистка ревизий элемента, согласно настройкам лимитов для ревизий в коллекции
CleanUpRevisions
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
itemId
string
)
error
CleanUpRevisions
(
ctx
context
.
Context
,
coll
*
collections
.
Collection
,
itemId
string
)
error
// RemoveRevisions - удаление записи из всех ревизий элемента
// RemoveRevisions - удаление записи из всех ревизий элемента
RemoveRevisions
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
string
,
options
...*
DeleteOptions
)
error
RemoveRevisions
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
string
,
options
...*
DeleteOptions
)
error
// RemoveRevision - удаление конкретной ревизии из Revisions
// RemoveRevision - удаление конкретной ревизии из Revisions
RemoveRevision
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
revision
string
,
options
...*
DeleteOptions
)
error
RemoveRevision
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
revision
string
,
options
...*
DeleteOptions
)
error
// RemoveArchived - удаление записи из архива
// RemoveArchived - удаление записи из архива
RemoveArchived
(
ctx
context
.
Context
,
spaceId
,
envId
,
c
ollection
Id
,
itemId
string
,
options
...*
DeleteOptions
)
error
RemoveArchived
(
ctx
context
.
Context
,
coll
*
collections
.
C
ollection
,
itemId
string
,
options
...*
DeleteOptions
)
error
// Copy - копирование записей
// Copy - копирование записей
Copy
(
ctx
context
.
Context
,
src
,
dst
*
collections
.
Collection
,
itemSets
...
string
)
error
Copy
(
ctx
context
.
Context
,
src
,
dst
*
collections
.
Collection
,
itemSets
...
string
)
error
...
...
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