Compare commits

...

17 commits

Author SHA1 Message Date
ee64c0cd51 [#14] Add Issue Template
Add bug reposrt and feature request templates

Signed-off-by: Liza <e.chichindaeva@yadro.com>
2023-03-23 12:19:35 +03:00
9dc3753467 [#13] *: Rename __FROSTFS__ prefix to __SYSTEM__
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-15 12:52:36 +03:00
8009022a20 [#13] *: Regenerate api
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-15 12:52:28 +03:00
cd2e46a17c [#10] Add __FROSTFS__ system attributes
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-13 09:59:22 +03:00
c46cd37f71 [#10] Generate api
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-13 09:59:22 +03:00
ec0d0274fa [#3] signature: Add buffer pool
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
73fde0e37c [#3] signature: Verify parts in parallel
Verify request/response parts in parallel

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
611f73ad0f [#3] signature: Sign parts in parallel
Sign request/response parts in parallel

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
e073c996fc [#3] signature: Add benchmarks
Add benchmarks for sign and verify methods

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
d005bf0393 [#3] signature: Refactor sign and verify
Split methods to separate files, drop redundant intefaces

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
63eb4dc3ea [#3] api-go: Go version up
Update go version 1.17 -> 1.18

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
3f7cb1b5ef [#7] .github: Remove directory
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-03-09 19:47:04 +00:00
bd67469f43 [#7] pre-commit: Add gitlint hook
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-03-09 19:47:04 +00:00
3af7645abf [#7] pre-commit: Add golangci-lint hook
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-03-09 19:47:04 +00:00
5faee63f60 [#7] pre-commit: Add initial configuration
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-03-09 19:47:04 +00:00
f69d2ad83c Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 13:42:36 +03:00
196241c4e7 [TrueCloudLab#5] .github: Fix CODEOWNERS
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-28 16:43:43 +03:00
175 changed files with 990 additions and 893 deletions

1
.github/CODEOWNERS vendored Normal file
View file

@ -0,0 +1 @@
* @TrueCloudLab/storage-core @TrueCloudLab/storage-services @TrueCloudLab/committers

45
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,45 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: community, triage, bug
assignees: ''
---
<!--- Provide a general summary of the issue in the Title above -->
## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
## Possible Solution
<!--- Not obligatory -->
<!--- If no reason/fix/additions for the bug can be suggested, -->
<!--- uncomment the following phrase: -->
<!--- No fix can be suggested by a QA engineer. Further solutions shall be up to developers. -->
## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. -->
1.
## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
## Regression
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include version or commit id or PR# that caused this regression, if you have these details. -->
## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used:
* Server setup and configuration:
* Operating System and version (`uname -a`):

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1 @@
blank_issues_enabled: false

View file

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: community, triage
assignees: ''
---
## Is your feature request related to a problem? Please describe.
<!--- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
## Describe the solution you'd like
<!--- A clear and concise description of what you want to happen. -->
## Describe alternatives you've considered
<!--- A clear and concise description of any alternative solutions or features you've considered. -->
## Additional context
<!--- Add any other context or screenshots about the feature request here. -->

70
.github/logo.svg vendored
View file

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 184.2 51.8" style="enable-background:new 0 0 184.2 51.8;" xml:space="preserve">
<style type="text/css">
.st0{display:none;}
.st1{display:inline;}
.st2{fill:#01E397;}
.st3{display:inline;fill:#010032;}
.st4{display:inline;fill:#00E599;}
.st5{display:inline;fill:#00AF92;}
.st6{fill:#00C3E5;}
</style>
<g id="Layer_2">
<g id="Layer_1-2" class="st0">
<g class="st1">
<path class="st2" d="M146.6,18.3v7.2h10.9V29h-10.9v10.7h-4V14.8h18v3.5H146.6z"/>
<path class="st2" d="M180,15.7c1.7,0.9,3,2.2,4,3.8l-3,2.7c-0.6-1.3-1.5-2.4-2.6-3.3c-1.3-0.7-2.8-1-4.3-1
c-1.4-0.1-2.8,0.3-4,1.1c-0.9,0.5-1.5,1.5-1.4,2.6c0,1,0.5,1.9,1.4,2.4c1.5,0.8,3.2,1.3,4.9,1.5c1.9,0.3,3.7,0.8,5.4,1.6
c1.2,0.5,2.2,1.3,2.9,2.3c0.6,1,1,2.2,0.9,3.4c0,1.4-0.5,2.7-1.3,3.8c-0.9,1.2-2.1,2.1-3.5,2.6c-1.7,0.6-3.4,0.9-5.2,0.8
c-5,0-8.6-1.6-10.7-5l2.9-2.8c0.7,1.4,1.8,2.5,3.1,3.3c1.5,0.7,3.1,1.1,4.7,1c1.5,0.1,2.9-0.2,4.2-0.9c0.9-0.5,1.5-1.5,1.5-2.6
c0-0.9-0.5-1.8-1.3-2.2c-1.5-0.7-3.1-1.2-4.8-1.5c-1.9-0.3-3.7-0.8-5.5-1.5c-1.2-0.5-2.2-1.4-3-2.4c-0.6-1-1-2.2-0.9-3.4
c0-1.4,0.4-2.7,1.2-3.8c0.8-1.2,2-2.2,3.3-2.8c1.6-0.7,3.4-1.1,5.2-1C176.1,14.3,178.2,14.8,180,15.7z"/>
</g>
<path class="st3" d="M73.3,16.3c1.9,1.9,2.9,4.5,2.7,7.1v15.9h-4V24.8c0-2.6-0.5-4.5-1.6-5.7c-1.2-1.2-2.8-1.8-4.5-1.7
c-1.3,0-2.5,0.3-3.7,0.8c-1.2,0.7-2.2,1.7-2.9,2.9c-0.8,1.5-1.1,3.2-1.1,4.9v13.3h-4V15.1l3.6,1.5v1.7c0.8-1.5,2.1-2.6,3.6-3.3
c1.5-0.8,3.2-1.2,4.9-1.1C68.9,13.8,71.3,14.7,73.3,16.3z"/>
<path class="st3" d="M104.4,28.3H85.6c0.1,2.2,1,4.3,2.5,5.9c1.5,1.4,3.5,2.2,5.6,2.1c1.6,0.1,3.2-0.2,4.6-0.9
c1.1-0.6,2-1.6,2.5-2.8l3.3,1.8c-0.9,1.7-2.3,3.1-4,4c-2,1-4.2,1.5-6.4,1.4c-3.7,0-6.7-1.1-8.8-3.4s-3.2-5.5-3.2-9.6s1-7.2,3-9.5
s5-3.4,8.7-3.4c2.1-0.1,4.2,0.5,6.1,1.5c1.6,1,3,2.5,3.8,4.2c0.9,1.8,1.3,3.9,1.3,5.9C104.6,26.4,104.6,27.4,104.4,28.3z
M88.1,19.3c-1.4,1.5-2.2,3.4-2.4,5.5h15.1c-0.2-2-1-3.9-2.3-5.5c-1.4-1.3-3.2-2-5.1-1.9C91.5,17.3,89.6,18,88.1,19.3z"/>
<path class="st3" d="M131,17.3c2.2,2.3,3.2,5.5,3.2,9.5s-1,7.3-3.2,9.6s-5.1,3.4-8.8,3.4s-6.7-1.1-8.9-3.4s-3.2-5.5-3.2-9.6
s1.1-7.2,3.2-9.5s5.1-3.4,8.9-3.4S128.9,15,131,17.3z M116.2,19.9c-1.5,2-2.2,4.4-2.1,6.9c-0.2,2.5,0.6,5,2.1,7
c1.5,1.7,3.7,2.7,6,2.6c2.3,0.1,4.4-0.9,5.9-2.6c1.5-2,2.3-4.5,2.1-7c0.1-2.5-0.6-4.9-2.1-6.9c-1.5-1.7-3.6-2.7-5.9-2.6
C119.9,17.2,117.7,18.2,116.2,19.9z"/>
<polygon class="st4" points="0,9.1 0,43.7 22.5,51.8 22.5,16.9 46.8,7.9 24.8,0 "/>
<polygon class="st5" points="24.3,17.9 24.3,36.8 46.8,44.9 46.8,9.6 "/>
</g>
<g>
<g>
<path class="st6" d="M41.6,17.5H28.2v6.9h10.4v3.3H28.2v10.2h-3.9V14.2h17.2V17.5z"/>
<path class="st6" d="M45.8,37.9v-18h3.3l0.4,3.2c0.5-1.2,1.2-2.1,2.1-2.7c0.9-0.6,2.1-0.9,3.5-0.9c0.4,0,0.7,0,1.1,0.1
c0.4,0.1,0.7,0.2,0.9,0.3l-0.5,3.4c-0.3-0.1-0.6-0.2-0.9-0.2C55.4,23,54.9,23,54.4,23c-0.7,0-1.5,0.2-2.2,0.6
c-0.7,0.4-1.3,1-1.8,1.8s-0.7,1.8-0.7,3v9.5H45.8z"/>
<path class="st6" d="M68.6,19.6c1.8,0,3.3,0.4,4.6,1.1c1.3,0.7,2.4,1.8,3.1,3.2s1.1,3.1,1.1,5c0,1.9-0.4,3.6-1.1,5
c-0.8,1.4-1.8,2.5-3.1,3.2c-1.3,0.7-2.9,1.1-4.6,1.1s-3.3-0.4-4.6-1.1c-1.3-0.7-2.4-1.8-3.2-3.2c-0.8-1.4-1.2-3.1-1.2-5
c0-1.9,0.4-3.6,1.2-5s1.8-2.5,3.2-3.2C65.3,19.9,66.8,19.6,68.6,19.6z M68.6,22.6c-1.1,0-2,0.2-2.8,0.7c-0.8,0.5-1.3,1.2-1.7,2.1
s-0.6,2.1-0.6,3.5c0,1.3,0.2,2.5,0.6,3.4s1,1.7,1.7,2.2s1.7,0.7,2.8,0.7c1.1,0,2-0.2,2.7-0.7c0.7-0.5,1.3-1.2,1.7-2.2
s0.6-2.1,0.6-3.4c0-1.4-0.2-2.5-0.6-3.5s-1-1.6-1.7-2.1C70.6,22.8,69.6,22.6,68.6,22.6z"/>
<path class="st6" d="M89.2,38.3c-1.8,0-3.4-0.3-4.9-1c-1.5-0.7-2.7-1.7-3.5-3l2.7-2.3c0.5,1,1.3,1.8,2.3,2.4
c1,0.6,2.2,0.9,3.6,0.9c1.1,0,2-0.2,2.6-0.6c0.6-0.4,1-0.9,1-1.6c0-0.5-0.2-0.9-0.5-1.2s-0.9-0.6-1.7-0.8l-3.8-0.8
c-1.9-0.4-3.3-1-4.1-1.9c-0.8-0.9-1.2-1.9-1.2-3.3c0-1,0.3-1.9,0.9-2.7c0.6-0.8,1.4-1.5,2.5-2s2.5-0.8,4-0.8c1.8,0,3.3,0.3,4.6,1
c1.3,0.6,2.2,1.5,2.9,2.7l-2.7,2.2c-0.5-1-1.1-1.7-2-2.1c-0.9-0.5-1.8-0.7-2.8-0.7c-0.8,0-1.4,0.1-2,0.3c-0.6,0.2-1,0.5-1.3,0.8
c-0.3,0.3-0.4,0.7-0.4,1.2c0,0.5,0.2,0.9,0.5,1.3s1,0.6,1.9,0.8l4.1,0.9c1.7,0.3,2.9,0.9,3.7,1.7c0.7,0.8,1.1,1.8,1.1,2.9
c0,1.2-0.3,2.2-0.9,3c-0.6,0.9-1.5,1.6-2.6,2C92.1,38.1,90.7,38.3,89.2,38.3z"/>
<path class="st6" d="M112.8,19.9v3H99.3v-3H112.8z M106.6,14.6v17.9c0,0.9,0.2,1.5,0.7,1.9c0.5,0.4,1.1,0.6,1.9,0.6
c0.6,0,1.2-0.1,1.7-0.3c0.5-0.2,0.9-0.5,1.3-0.8l0.9,2.8c-0.6,0.5-1.2,0.9-2,1.1c-0.8,0.3-1.7,0.4-2.7,0.4c-1,0-2-0.2-2.8-0.5
s-1.5-0.9-2-1.6c-0.5-0.8-0.7-1.7-0.8-3V15.7L106.6,14.6z"/>
<path d="M137.9,17.5h-13.3v6.9h10.4v3.3h-10.4v10.2h-3.9V14.2h17.2V17.5z"/>
<path d="M150.9,13.8c2.1,0,4,0.4,5.5,1.2c1.6,0.8,2.9,2,4,3.5l-2.6,2.5c-0.9-1.4-1.9-2.4-3.1-3c-1.1-0.6-2.5-0.9-4-0.9
c-1.2,0-2.1,0.2-2.8,0.5c-0.7,0.3-1.3,0.7-1.6,1.2c-0.3,0.5-0.5,1.1-0.5,1.7c0,0.7,0.3,1.4,0.8,1.9c0.5,0.6,1.5,1,2.9,1.3
l4.8,1.1c2.3,0.5,3.9,1.3,4.9,2.3c1,1,1.4,2.3,1.4,3.9c0,1.5-0.4,2.7-1.2,3.8c-0.8,1.1-1.9,1.9-3.3,2.5s-3.1,0.9-5,0.9
c-1.7,0-3.2-0.2-4.5-0.6c-1.3-0.4-2.5-1-3.5-1.8c-1-0.7-1.8-1.6-2.5-2.6l2.7-2.7c0.5,0.8,1.1,1.6,1.9,2.2
c0.8,0.7,1.7,1.2,2.7,1.5c1,0.4,2.2,0.5,3.4,0.5c1.1,0,2.1-0.1,2.9-0.4c0.8-0.3,1.4-0.7,1.8-1.2c0.4-0.5,0.6-1.1,0.6-1.9
c0-0.7-0.2-1.3-0.7-1.8c-0.5-0.5-1.3-0.9-2.6-1.2l-5.2-1.2c-1.4-0.3-2.6-0.8-3.6-1.3c-0.9-0.6-1.6-1.3-2.1-2.1s-0.7-1.8-0.7-2.8
c0-1.3,0.4-2.6,1.1-3.7c0.7-1.1,1.8-2,3.2-2.6C147.3,14.1,148.9,13.8,150.9,13.8z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

View file

@ -1,21 +0,0 @@
name: DCO check
on:
pull_request:
branches:
- master
jobs:
commits_check_job:
runs-on: ubuntu-latest
name: Commits Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

View file

@ -1,64 +0,0 @@
name: neofs-api-go tests
on:
push:
branches:
- master
paths-ignore:
- '*.md'
pull_request:
branches:
- master
paths-ignore:
- '*.md'
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.17.x', '1.18.x', '1.19.x' ]
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Check out code
uses: actions/checkout@v3
- name: Cache go mod
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go }}-
- name: Get dependencies
run: make dep
- name: Run go test
run: go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)
lint:
runs-on: ubuntu-20.04
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Check out code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.48.0
only-new-issues: true

10
.gitlint Normal file
View file

@ -0,0 +1,10 @@
[general]
fail-without-commits=true
contrib=CC1
[title-match-regex]
regex=^\[\#[0-9]+\]\s
[ignore-by-title]
regex=^Release(.*)
ignore=title-match-regex

View file

@ -11,7 +11,7 @@ run:
skip-files:
- (^|.*/)grpc/(.*)
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
@ -64,4 +64,4 @@ issues:
- linters: # ignore SA6002 since we use pool of []byte, however we can switch to *bytes.Buffer
- staticcheck
text: "SA6002:"
text: "SA6002:"

30
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,30 @@
ci:
autofix_prs: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
exclude: ".key$"
- repo: https://github.com/golangci/golangci-lint
rev: v1.51.2
hooks:
- id: golangci-lint
- repo: https://github.com/jorisroovers/gitlint
rev: v0.18.0
hooks:
- id: gitlint
stages: [commit-msg]

View file

@ -22,7 +22,7 @@
- Mark all expiration methods as deprecated (#417)
### Updated
- Minimal go version to 1.17 (#412)
- Minimal go version to 1.17 (#412)
- `neofs-crypto` to `v0.4.0` (#412)
- `google.golang.org/grpc` to `v1.48.0` (#415)
- `google.golang.org/protobuf` to `v1.28.0` (#415)
@ -60,7 +60,7 @@ NeoFS API v2.13 support
### Fixed
- Incompatible changes in signature scheme (#380)
### Added
- Public URI-parsing function `client.ParseURI()` (#383)
@ -92,9 +92,9 @@ NeoFS API v2.12 support
## [2.11.0] - 2021-12-02 - Sinjido (신지도, 薪智島)
NeoFS API v2.11 support. High level packages are moved to
[neofs-sdk-go](https://github.com/nspcc-dev/neofs-sdk-go) repository.
Repository restructured as Go module version 2 and synced with
NeoFS API v2.11 support. High level packages are moved to
[neofs-sdk-go](https://github.com/nspcc-dev/neofs-sdk-go) repository.
Repository restructured as Go module version 2 and synced with
[neofs-api](https://github.com/nspcc-dev/neofs-api) release version.
### Fixed
@ -109,7 +109,7 @@ Repository restructured as Go module version 2 and synced with
- neofs-api-go is now Go module version 2 (#201)
### Removed
- All packages from `pkg` moved to
- All packages from `pkg` moved to
[neofs-sdk-go](https://github.com/nspcc-dev/neofs-sdk-go) (#201)
## [1.30.0] - 2021-10-19 - Udo (우도, 牛島)
@ -126,7 +126,7 @@ NeoFS API v2.10 support.
- pkg/client callback to parse internal response information (#337)
- Service filter type in extended ACL from API v2.10 (#338)
- Enhanced network info structures from API v2.10 (#339)
- Well-known public-append basic ACL constant (#341)
- Well-known public-append basic ACL constant (#341)
- Native contract names support (#351)
### Changed
@ -258,7 +258,7 @@ Raw client and support of NeoFS API v2.5.0 "Jebudo" release.
### Added
- Raw client for peer to peer communication.
- `client.WithKey` option to sign messages with different keys within single
- `client.WithKey` option to sign messages with different keys within single
client.
- `Content-Type` well-known object attribute constant.
@ -271,7 +271,7 @@ Raw client and support of NeoFS API v2.5.0 "Jebudo" release.
Support changes from NeoFS API v2.4.0 "Ganghwado" release.
### Added
### Added
- `netmap.NetworkInfo` definitions in `v2` and `pkg/netmap`.
- `netmap.NetworkInfo` RPC support in `pkg/client`.
@ -322,7 +322,7 @@ Support changes from NeoFS API v2.2.1 release.
### Fixed
- Remarks of the updated linter.
- Remarks of the updated linter.
## [1.22.0] - 2020-12-30 - Yeouido (여의도, 汝矣島)
@ -335,7 +335,7 @@ Support changes from NeoFS API v2.2.0 "Yeouido" release.
- Support of `StorageGroup` message.
- Support of `DataAuditResult` message.
- Stringer and string parser for `Checksum` type of client library.
- Stringer and string parser for `Type` message.
- Stringer and string parser for `Type` message.
- Stringer and string parser for `Type` type of client library.
- `AddTypeFilter` method on `SearchFilters` type of client library
that adds filter by object type.
@ -350,7 +350,7 @@ Support changes from NeoFS API v2.2.0 "Yeouido" release.
- `Container.SetNonceUUID` setter of container nonce in UUID format.
- `NewVerifiedContainerFromV2` container constructor that preliminary
checks if container message argument meets NeoFS API V2 specification.
### Changed
- `Container.Nonce`/`Container.SetNonce` marked as deprecated.
@ -368,7 +368,7 @@ Support neofs-api v2.1.1.
### Added
- `client.GetVerifiedContainerStructure` function to check
- `client.GetVerifiedContainerStructure` function to check
that the container structure matches the requested identifier.
## [1.21.0] - 2020-12-11 - Modo (모도, 茅島)
@ -391,7 +391,7 @@ Support neofs-api v2.1.1.
### Renamed
- `AddLeafFilter` to `AddPhyFilter`
- `AddLeafFilter` to `AddPhyFilter`
### Fixed
@ -425,9 +425,9 @@ Support neofs-api v2.1.1.
## [1.20.0] - 2020-11-16 - Jindo (진도, 珍島)
Major API refactoring and simplification. From now on this library will have
backward compatibility and support of major versions of NeoFS-API by having
**version specific** files in `vN` dirs and **version independent** SDK
Major API refactoring and simplification. From now on this library will have
backward compatibility and support of major versions of NeoFS-API by having
**version specific** files in `vN` dirs and **version independent** SDK
structures and client in `pkg`. This version supports NeoFS-API v2.0.X

0
Makefile Normal file → Executable file
View file

View file

@ -1,8 +1,8 @@
package accounting
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
)
type BalanceRequestBody struct {

View file

@ -1,11 +1,11 @@
package accounting
import (
accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
accounting "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (b *BalanceRequestBody) ToGRPCMessage() grpc.Message {

View file

@ -1,8 +1,8 @@
package accounting
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetOwnerId sets identifier of the account owner.

Binary file not shown.

Binary file not shown.

View file

@ -1,8 +1,8 @@
package accounting
import (
accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
accounting "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (d *Decimal) MarshalJSON() ([]byte, error) {

View file

@ -1,9 +1,9 @@
package accounting
import (
accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
accounting "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package accounting_test
import (
"testing"
accountingtest "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
accountingtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessage(t *testing.T) {

View file

@ -1,9 +1,9 @@
package accountingtest
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
accountingtest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "github.com/TrueCloudLab/frostfs-api-go/v2/session/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting"
accountingtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/test"
)
func GenerateBalanceRequest(empty bool) *accounting.BalanceRequest {

View file

@ -3,9 +3,9 @@ package acl_test
import (
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
aclGrpc "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
acltest "github.com/TrueCloudLab/frostfs-api-go/v2/acl/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
aclGrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
acltest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/test"
)
func BenchmarkTable_ToGRPCMessage(b *testing.B) {

View file

@ -1,11 +1,11 @@
package acl
import (
acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
// RoleToGRPCField converts unified role enum into grpc enum.

View file

@ -1,7 +1,7 @@
package acl
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
)
// SetVersion sets version of EACL rules in table.

BIN
acl/grpc/types.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package acl
import (
acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (f *HeaderFilter) MarshalJSON() ([]byte, error) {

View file

@ -1,9 +1,9 @@
package acl
import (
acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package acl_test
import (
"testing"
acltest "github.com/TrueCloudLab/frostfs-api-go/v2/acl/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
acltest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,7 +1,7 @@
package acl
import (
acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
)
// String returns string representation of Action.

View file

@ -1,8 +1,8 @@
package acltest
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
accountingtest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
accountingtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
)
func GenerateBearerToken(empty bool) *acl.BearerToken {

View file

@ -1,6 +1,6 @@
package acl
import "github.com/TrueCloudLab/frostfs-api-go/v2/refs"
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
// HeaderFilter is a unified structure of FilterInfo
// message from proto definition.

View file

@ -1,11 +1,11 @@
package audit
import (
audit "github.com/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
audit "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (a *DataAuditResult) ToGRPCMessage() grpc.Message {

View file

@ -1,7 +1,7 @@
package audit
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
)
// SetVersion is a Version field setter.

BIN
audit/grpc/types.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package audit
import (
audit "github.com/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
audit "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (a *DataAuditResult) MarshalJSON() ([]byte, error) {

View file

@ -1,10 +1,10 @@
package audit
import (
audit "github.com/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
audit "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package audit_test
import (
"testing"
audittest "github.com/TrueCloudLab/frostfs-api-go/v2/audit/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
audittest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,8 +1,8 @@
package audittest
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/audit"
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/audit"
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
)
func GenerateDataAuditResult(empty bool) *audit.DataAuditResult {

View file

@ -1,7 +1,7 @@
package audit
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
)
// DataAuditResult is a unified structure of

View file

@ -1,7 +1,7 @@
package container
// SysAttributePrefix is a prefix of key to system attribute.
const SysAttributePrefix = "__NEOFS__"
const SysAttributePrefix = "__SYSTEM__"
const (
// SysAttributeSubnet is a string ID of container's storage subnet.
@ -17,6 +17,28 @@ const (
SysAttributeHomomorphicHashing = SysAttributePrefix + "DISABLE_HOMOMORPHIC_HASHING"
)
// SysAttributePrefixNeoFS is a prefix of key to system attribute.
// Deprecated: use SysAttributePrefix
const SysAttributePrefixNeoFS = "__NEOFS__"
const (
// SysAttributeSubnetNeoFS is a string ID of container's storage subnet.
// Deprecated: use SysAttributeSubnet
SysAttributeSubnetNeoFS = SysAttributePrefixNeoFS + "SUBNET"
// SysAttributeNameNeoFS is a string of human-friendly container name registered as the domain in NNS contract.
// Deprecated: use SysAttributeName
SysAttributeNameNeoFS = SysAttributePrefixNeoFS + "NAME"
// SysAttributeZoneNeoFS is a string of zone for container name.
// Deprecated: use SysAttributeZone
SysAttributeZoneNeoFS = SysAttributePrefixNeoFS + "ZONE"
// SysAttributeHomomorphicHashingNeoFS is a container's homomorphic hashing state.
// Deprecated: use SysAttributeHomomorphicHashing
SysAttributeHomomorphicHashingNeoFS = SysAttributePrefixNeoFS + "DISABLE_HOMOMORPHIC_HASHING"
)
// SysAttributeZoneDefault is a default value for SysAttributeZone attribute.
const SysAttributeZoneDefault = "container"
@ -33,7 +55,7 @@ const disabledHomomorphicHashingValue = "true"
// See also SetHomomorphicHashingState.
func (c Container) HomomorphicHashingState() bool {
for i := range c.attr {
if c.attr[i].GetKey() == SysAttributeHomomorphicHashing {
if c.attr[i].GetKey() == SysAttributeHomomorphicHashing || c.attr[i].GetKey() == SysAttributeHomomorphicHashingNeoFS {
return c.attr[i].GetValue() != disabledHomomorphicHashingValue
}
}
@ -50,7 +72,7 @@ func (c Container) HomomorphicHashingState() bool {
// See also HomomorphicHashingState.
func (c *Container) SetHomomorphicHashingState(enable bool) {
for i := range c.attr {
if c.attr[i].GetKey() == SysAttributeHomomorphicHashing {
if c.attr[i].GetKey() == SysAttributeHomomorphicHashing || c.attr[i].GetKey() == SysAttributeHomomorphicHashingNeoFS {
if enable {
// approach without allocation/waste
// coping works since the attributes

View file

@ -3,8 +3,8 @@ package container_test
import (
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
containertest "github.com/TrueCloudLab/frostfs-api-go/v2/container/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
containertest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/test"
"github.com/stretchr/testify/require"
)

View file

@ -1,17 +1,17 @@
package container
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
aclGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
container "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
netmapGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
sessionGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
aclGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
container "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
netmapGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
sessionGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
func (a *Attribute) ToGRPCMessage() grpc.Message {

View file

@ -1,9 +1,9 @@
package container
import (
acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetContainer sets container of the request.

Binary file not shown.

Binary file not shown.

View file

@ -1,8 +1,8 @@
package container
import (
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
netmap "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
)
// SetKey sets key to the container attribute.

Binary file not shown.

View file

@ -1,8 +1,8 @@
package container
import (
container "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
container "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (a *Attribute) MarshalJSON() ([]byte, error) {

View file

@ -1,9 +1,9 @@
package container
import (
container "github.com/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
container "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package container_test
import (
"testing"
containertest "github.com/TrueCloudLab/frostfs-api-go/v2/container/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
containertest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,8 +1,8 @@
package container
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/status"
statusgrpc "github.com/TrueCloudLab/frostfs-api-go/v2/status/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status"
statusgrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc"
)
// LocalizeFailStatus checks if passed global status.Code is related to container failure and:

View file

@ -3,8 +3,8 @@ package container_test
import (
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
statustest "github.com/TrueCloudLab/frostfs-api-go/v2/status/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
statustest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/test"
)
func TestStatusCodes(t *testing.T) {

View file

@ -1,11 +1,11 @@
package containertest
import (
acltest "github.com/TrueCloudLab/frostfs-api-go/v2/acl/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
netmaptest "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/test"
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "github.com/TrueCloudLab/frostfs-api-go/v2/session/test"
acltest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/test"
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/test"
)
func GenerateAttribute(empty bool) *container.Attribute {

View file

@ -1,10 +1,10 @@
package container
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
)
type Attribute struct {

12
go.mod
View file

@ -1,22 +1,24 @@
module github.com/TrueCloudLab/frostfs-api-go/v2
module git.frostfs.info/TrueCloudLab/frostfs-api-go/v2
go 1.17
go 1.18
require (
github.com/TrueCloudLab/frostfs-crypto v0.5.0
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0
github.com/stretchr/testify v1.7.0
golang.org/x/sync v0.1.0
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.0
)
require (
github.com/TrueCloudLab/rfc6979 v0.3.0 // indirect
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 // indirect
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.3.3 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect

17
go.sum
View file

@ -1,10 +1,10 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 h1:FxqFDhQYYgpe41qsIHVOcdzSVCB8JNSfPG7Uk4r2oSk=
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0/go.mod h1:RUIKZATQLJ+TaYQa60X2fTDwfuhMfm8Ar60bQ5fr+vU=
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 h1:M2KR3iBj7WpY3hP10IevfIB9MURr4O9mwVfJ+SjT3HA=
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0/go.mod h1:okpbKfVYf/BpejtfFTfhZqFP+sZ8rsHrP8Rr/jYPNRc=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/TrueCloudLab/frostfs-crypto v0.5.0 h1:ZoLjixSkQv3j1EwZ1WJzMEJY2NR+9nO4Pd8WSyM/RRI=
github.com/TrueCloudLab/frostfs-crypto v0.5.0/go.mod h1:775MUewpH8AWpXrimAG2NYWOXB6lpKOI5kqgu+eI5zs=
github.com/TrueCloudLab/rfc6979 v0.3.0 h1:0SYMAfQWh/TjnofqYQHy+s3rmQ5gi0fvOaDbqd60/Ic=
github.com/TrueCloudLab/rfc6979 v0.3.0/go.mod h1:qylxFXFQ/sMvpZC/8JyWp+mfzk5Zj/KDT5FAbekhobc=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@ -46,8 +46,9 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
@ -82,13 +83,16 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
@ -98,7 +102,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

View file

@ -1,6 +1,6 @@
package lock
import refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
import refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
// SetMembers sets `members` field.
func (x *Lock) SetMembers(ids []*refs.ObjectID) {

BIN
lock/grpc/types.pb.go generated

Binary file not shown.

View file

@ -5,11 +5,15 @@ import (
"fmt"
"strings"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
)
// prefix of keys to subnet attributes.
const attrSubnetPrefix = "__NEOFS__SUBNET_"
const attrSubnetPrefix = "__SYSTEM__SUBNET_"
// prefix of keys to subnet attributes.
// Deprecated: use attrSubnetPrefix
const attrSubnetPrefixNeoFS = "__NEOFS__SUBNET_"
const (
// subnet attribute's value denoting subnet entry
@ -62,7 +66,7 @@ func subnetAttributeKey(id *refs.SubnetID) string {
// - disables non-zero subnet;
// - enables zero subnet.
//
// Attribute key is calculated from ID using format `__NEOFS__SUBNET_%s`.
// Attribute key is calculated from ID using format `__SYSTEM__SUBNET_%s`.
// Attribute Value is:
// - `True` if node enters the subnet;
// - `False`, otherwise.
@ -143,8 +147,11 @@ func IterateSubnets(node *NodeInfo, f func(refs.SubnetID) error) error {
// cut subnet ID string
idTxt := strings.TrimPrefix(key, attrSubnetPrefix)
if len(idTxt) == len(key) {
// not a subnet attribute
continue
idTxt = strings.TrimPrefix(key, attrSubnetPrefixNeoFS)
if len(idTxt) == len(key) {
// not a subnet attribute
continue
}
}
// check value

View file

@ -4,14 +4,14 @@ import (
"strconv"
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
netmaptest "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/stretchr/testify/require"
)
func subnetAttrKey(val string) string {
return "__NEOFS__SUBNET_" + val
return "__SYSTEM__SUBNET_" + val
}
func assertSubnetAttrKey(t *testing.T, attr *netmap.Attribute, num uint32) {

View file

@ -1,11 +1,11 @@
package netmap
import (
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
netmap "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (f *Filter) ToGRPCMessage() grpc.Message {

View file

@ -1,8 +1,8 @@
package netmap
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetBody sets body of the request.

Binary file not shown.

View file

@ -1,6 +1,6 @@
package netmap
import refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
import refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
// SetReplicas of placement policy.
func (m *PlacementPolicy) SetReplicas(v []*Replica) {

BIN
netmap/grpc/types.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package netmap
import (
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
netmap "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (p *PlacementPolicy) MarshalJSON() ([]byte, error) {

View file

@ -1,9 +1,9 @@
package netmap
import (
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
netmap "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
protoutil "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package netmap_test
import (
"testing"
netmaptest "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,7 +1,7 @@
package netmap
import (
netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
netmap "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc"
)
// String returns string representation of Clause.

View file

@ -1,9 +1,9 @@
package netmaptest
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "github.com/TrueCloudLab/frostfs-api-go/v2/session/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/test"
)
func GenerateFilter(empty bool) *netmap.Filter {

View file

@ -1,8 +1,8 @@
package netmap
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
)
type LocalNodeInfoRequest struct {

View file

@ -7,7 +7,7 @@ import (
)
// SysAttributePrefix is a prefix of key to system attribute.
const SysAttributePrefix = "__NEOFS__"
const SysAttributePrefix = "__SYSTEM__"
const (
// SysAttributeUploadID marks smaller parts of a split bigger object.
@ -25,6 +25,30 @@ const (
SysAttributeTickTopic = SysAttributePrefix + "TICK_TOPIC"
)
// SysAttributePrefixNeoFS is a prefix of key to system attribute.
// Deprecated: use SysAttributePrefix
const SysAttributePrefixNeoFS = "__NEOFS__"
const (
// SysAttributeUploadIDNeoFS marks smaller parts of a split bigger object.
// Deprecated: use SysAttributeUploadID
SysAttributeUploadIDNeoFS = SysAttributePrefixNeoFS + "UPLOAD_ID"
// SysAttributeExpEpochNeoFS tells GC to delete object after that epoch.
// Deprecated: use SysAttributeExpEpoch
SysAttributeExpEpochNeoFS = SysAttributePrefixNeoFS + "EXPIRATION_EPOCH"
// SysAttributeTickEpochNeoFS defines what epoch must produce object
// notification.
// Deprecated: use SysAttributeTickEpoch
SysAttributeTickEpochNeoFS = SysAttributePrefixNeoFS + "TICK_EPOCH"
// SysAttributeTickTopicNeoFS defines what topic object notification
// must be sent to.
// Deprecated: use SysAttributeTickTopic
SysAttributeTickTopicNeoFS = SysAttributePrefixNeoFS + "TICK_TOPIC"
)
// NotificationInfo groups information about object notification
// that can be written to object.
//
@ -81,10 +105,10 @@ func WriteNotificationInfo(o *Object, ni NotificationInfo) {
for i := range attrs {
switch attrs[i].GetKey() {
case SysAttributeTickEpoch:
case SysAttributeTickEpoch, SysAttributeTickEpochNeoFS:
attrs[i].SetValue(epoch)
changedEpoch = true
case SysAttributeTickTopic:
case SysAttributeTickTopic, SysAttributeTickTopicNeoFS:
changedTopic = true
if topic == "" {
@ -141,7 +165,7 @@ func GetNotificationInfo(o *Object) (*NotificationInfo, error) {
for _, attr := range o.GetHeader().GetAttributes() {
switch key := attr.GetKey(); key {
case SysAttributeTickEpoch:
case SysAttributeTickEpoch, SysAttributeTickEpochNeoFS:
epoch, err := strconv.ParseUint(attr.GetValue(), 10, 64)
if err != nil {
return nil, fmt.Errorf("could not parse epoch: %w", err)
@ -150,7 +174,7 @@ func GetNotificationInfo(o *Object) (*NotificationInfo, error) {
ni.SetEpoch(epoch)
foundEpoch = true
case SysAttributeTickTopic:
case SysAttributeTickTopic, SysAttributeTickTopicNeoFS:
ni.SetTopic(attr.GetValue())
}
}

View file

@ -3,13 +3,13 @@ package object
import (
"fmt"
object "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
sessionGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
object "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
sessionGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
func TypeToGRPCField(t Type) object.ObjectType {

View file

@ -1,8 +1,8 @@
package object
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetAddress sets address of the requested object.

Binary file not shown.

Binary file not shown.

BIN
object/grpc/status.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package object
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetKey sets key to the object attribute.

BIN
object/grpc/types.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package object
import (
object "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
object "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (h *ShortHeader) MarshalJSON() ([]byte, error) {

View file

@ -4,12 +4,12 @@ import (
"errors"
"fmt"
lock "github.com/TrueCloudLab/frostfs-api-go/v2/lock/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
lock "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/lock/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
// Lock represents object Lock message from NeoFS API V2 protocol.

View file

@ -3,8 +3,8 @@ package object_test
import (
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/object"
objecttest "github.com/TrueCloudLab/frostfs-api-go/v2/object/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
objecttest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/test"
"github.com/stretchr/testify/require"
)

View file

@ -1,10 +1,10 @@
package object
import (
object "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
object "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package object_test
import (
"testing"
objecttest "github.com/TrueCloudLab/frostfs-api-go/v2/object/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
objecttest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,8 +1,8 @@
package object
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/status"
statusgrpc "github.com/TrueCloudLab/frostfs-api-go/v2/status/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status"
statusgrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/grpc"
)
// LocalizeFailStatus checks if passed global status.Code is related to object failure and:

View file

@ -3,9 +3,9 @@ package object_test
import (
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/object"
"github.com/TrueCloudLab/frostfs-api-go/v2/status"
statustest "github.com/TrueCloudLab/frostfs-api-go/v2/status/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status"
statustest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/test"
"github.com/stretchr/testify/require"
)

View file

@ -1,7 +1,7 @@
package object
import (
object "github.com/TrueCloudLab/frostfs-api-go/v2/object/grpc"
object "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object/grpc"
)
// String returns string representation of Type.

View file

@ -1,11 +1,11 @@
package objecttest
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/internal/random"
"github.com/TrueCloudLab/frostfs-api-go/v2/object"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "github.com/TrueCloudLab/frostfs-api-go/v2/session/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/internal/random"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
sessiontest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/test"
)
func GenerateShortHeader(empty bool) *object.ShortHeader {

View file

@ -1,8 +1,8 @@
package object
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
)
type Type uint32

View file

@ -1,9 +1,9 @@
package refs
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (o *OwnerID) ToGRPCMessage() grpc.Message {

BIN
refs/grpc/types.pb.go generated

Binary file not shown.

View file

@ -1,8 +1,8 @@
package refs
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
func (a *Address) MarshalJSON() ([]byte, error) {

View file

@ -3,9 +3,9 @@ package refs
import (
"encoding/binary"
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
)
const (

View file

@ -3,9 +3,9 @@ package refs_test
import (
"testing"
refstest "github.com/TrueCloudLab/frostfs-api-go/v2/refs/test"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
)
func TestMessageConvert(t *testing.T) {

View file

@ -1,7 +1,7 @@
package refs
import (
refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
)
// String returns string representation of ChecksumType.

View file

@ -3,7 +3,7 @@ package refstest
import (
"math/rand"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
)
func GenerateVersion(empty bool) *refs.Version {

View file

@ -5,7 +5,7 @@ import (
"strconv"
"testing"
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
"github.com/stretchr/testify/require"
)

View file

@ -1,11 +1,11 @@
package reputation
import (
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "github.com/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
reputation "github.com/TrueCloudLab/frostfs-api-go/v2/reputation/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
reputation "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
)
// ToGRPCMessage converts PeerID to gRPC-generated

View file

@ -1,7 +1,7 @@
package reputation
import (
session "github.com/TrueCloudLab/frostfs-api-go/v2/session/grpc"
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
)
// SetEpoch sets epoch in which the trust was assessed.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more