Compare commits
No commits in common. "master" and "feature/28-use-any" have entirely different histories.
master
...
feature/28
118 changed files with 4325 additions and 7023 deletions
|
@ -1,21 +0,0 @@
|
|||
name: DCO action
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
dco:
|
||||
name: DCO
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Run commit format checker
|
||||
uses: https://git.frostfs.info/TrueCloudLab/dco-go@v3
|
||||
with:
|
||||
from: 'origin/${{ github.event.pull_request.base.ref }}'
|
|
@ -1,54 +0,0 @@
|
|||
name: Tests and linters
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.20'
|
||||
cache: true
|
||||
|
||||
- name: golangci-lint
|
||||
uses: https://github.com/golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go_versions: [ '1.19', '1.20' ]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '${{ matrix.go_versions }}'
|
||||
cache: true
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
||||
tests-race:
|
||||
name: Tests with -race
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.20'
|
||||
cache: true
|
||||
|
||||
- name: Run tests
|
||||
run: go test ./... -count=1 -race
|
10
.gitlint
Normal file
10
.gitlint
Normal file
|
@ -0,0 +1,10 @@
|
|||
[general]
|
||||
fail-without-commits=true
|
||||
contrib=CC1
|
||||
|
||||
[title-match-regex]
|
||||
regex=^\[\#[0-9Xx]+\]\s
|
||||
|
||||
[ignore-by-title]
|
||||
regex=^Release(.*)
|
||||
ignore=title-match-regex
|
|
@ -18,25 +18,13 @@ repos:
|
|||
- id: end-of-file-fixer
|
||||
exclude: ".key$"
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: gofumpt
|
||||
name: gofumpt
|
||||
entry: make fumpt
|
||||
pass_filenames: false
|
||||
types: [go]
|
||||
language: system
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: go-unit-tests
|
||||
name: go unit tests
|
||||
entry: make test GOFLAGS=''
|
||||
pass_filenames: false
|
||||
types: [go]
|
||||
language: system
|
||||
|
||||
- repo: https://github.com/golangci/golangci-lint
|
||||
rev: v1.56.2
|
||||
rev: v1.51.2
|
||||
hooks:
|
||||
- id: golangci-lint
|
||||
|
||||
- repo: https://github.com/jorisroovers/gitlint
|
||||
rev: v0.18.0
|
||||
hooks:
|
||||
- id: gitlint
|
||||
stages: [commit-msg]
|
||||
|
|
22
CHANGELOG.md
22
CHANGELOG.md
|
@ -2,37 +2,15 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
### Fixed
|
||||
### Changed
|
||||
### Removed
|
||||
### Updated
|
||||
|
||||
## [2.16.0] - 2023-09-14 - Academy of Sciences Glacier
|
||||
|
||||
### Added
|
||||
- Add impersonate flag to bearer token (#17)
|
||||
- `NOT` and `UNIQUE` keywords to the placement policy (#26)
|
||||
- `PutSingle` RPC (#45)
|
||||
|
||||
### Fixed
|
||||
### Changed
|
||||
- `StableSize()` is optimized and no does no allocations (#49)
|
||||
- Marshaling code now uses `protowire` package (#50)
|
||||
### Removed
|
||||
- Reputation system (#21)
|
||||
|
||||
### Updated
|
||||
- `github.com/stretchr/testify` to `v1.8.3`
|
||||
- `go.opentelemetry.io/otel` to `v1.15.1`
|
||||
- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` to `v1.15.1`
|
||||
- `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` to `v1.15.1`
|
||||
- `go.opentelemetry.io/otel/sdk` to `v1.15.1`
|
||||
- `go.opentelemetry.io/otel/trace` to `v1.15.1`
|
||||
- `golang.org/x/sync` to `v0.2.0`
|
||||
- `google.golang.org/grpc` to `v1.55.0`
|
||||
- `google.golang.org/protobuf` to `v1.30.0`
|
||||
|
||||
|
||||
## 2.15.0 - 2023-04-11
|
||||
|
||||
|
|
24
Makefile
24
Makefile
|
@ -3,35 +3,40 @@ SHELL = bash
|
|||
|
||||
VERSION ?= $(shell git describe --tags --match "v*" --abbrev=8 --dirty --always)
|
||||
|
||||
.PHONY: dep fmts fumpt imports protoc test lint version help
|
||||
.PHONY: dep fmts fmt imports protoc test lint version help
|
||||
|
||||
# Pull go dependencies
|
||||
dep:
|
||||
@printf "⇒ Tidy requirements : "
|
||||
CGO_ENABLED=0 \
|
||||
GO111MODULE=on \
|
||||
go mod tidy -v && echo OK
|
||||
@printf "⇒ Download requirements: "
|
||||
CGO_ENABLED=0 \
|
||||
GO111MODULE=on \
|
||||
go mod download && echo OK
|
||||
@printf "⇒ Install test requirements: "
|
||||
CGO_ENABLED=0 \
|
||||
GO111MODULE=on \
|
||||
go test ./... && echo OK
|
||||
|
||||
# Run all code formatters
|
||||
fmts: fumpt imports
|
||||
fmts: fmt imports
|
||||
|
||||
# Reformat code
|
||||
fmt:
|
||||
@echo "⇒ Processing gofmt check"
|
||||
@for f in `find . -type f -name '*.go' -not -path './vendor/*' -not -name '*.pb.go' -prune`; do \
|
||||
GO111MODULE=on gofmt -s -w $$f; \
|
||||
done
|
||||
|
||||
# Reformat imports
|
||||
imports:
|
||||
@echo "⇒ Processing goimports check"
|
||||
@for f in `find . -type f -name '*.go' -not -path './vendor/*' -not -name '*.pb.go' -prune`; do \
|
||||
goimports -w $$f; \
|
||||
GO111MODULE=on goimports -w $$f; \
|
||||
done
|
||||
|
||||
# Run gofumpt
|
||||
fumpt:
|
||||
@echo "⇒ Processing gofumpt check"
|
||||
@gofumpt -l -w .
|
||||
|
||||
# Regenerate code for proto files
|
||||
protoc:
|
||||
@GOPRIVATE=github.com/TrueCloudLab go mod vendor
|
||||
|
@ -49,10 +54,9 @@ protoc:
|
|||
rm -rf vendor
|
||||
|
||||
# Run Unit Test with go test
|
||||
test: GOFLAGS ?= "-count=1"
|
||||
test:
|
||||
@echo "⇒ Running go test"
|
||||
@GOFLAGS="$(GOFLAGS)" go test ./...
|
||||
@GO111MODULE=on go test ./...
|
||||
|
||||
# Run linters
|
||||
lint:
|
||||
|
|
7
accounting/grpc/service.pb.go
generated
7
accounting/grpc/service.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: accounting/grpc/service.proto
|
||||
|
||||
package accounting
|
||||
|
@ -216,8 +216,7 @@ func (x *BalanceRequest_Body) GetOwnerId() *grpc1.OwnerID {
|
|||
}
|
||||
|
||||
// The amount of funds in GAS token for the `OwnerID`'s account requested.
|
||||
// Balance is given in the `Decimal` format to avoid precision issues with
|
||||
// rounding.
|
||||
// Balance is given in the `Decimal` format to avoid precision issues with rounding.
|
||||
type BalanceResponse_Body struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
2
accounting/grpc/service_grpc.pb.go
generated
2
accounting/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// - protoc v3.21.9
|
||||
// source: accounting/grpc/service.proto
|
||||
|
||||
package accounting
|
||||
|
|
4
accounting/grpc/types.pb.go
generated
4
accounting/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: accounting/grpc/types.proto
|
||||
|
||||
package accounting
|
||||
|
|
|
@ -2,8 +2,6 @@ package acl
|
|||
|
||||
import (
|
||||
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
||||
apeGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/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"
|
||||
|
@ -166,7 +164,7 @@ func (f *HeaderFilter) ToGRPCMessage() grpc.Message {
|
|||
|
||||
m.SetKey(f.key)
|
||||
m.SetValue(f.value)
|
||||
m.SetHeaderType(HeaderTypeToGRPCField(f.hdrType))
|
||||
m.SetHeader(HeaderTypeToGRPCField(f.hdrType))
|
||||
m.SetMatchType(MatchTypeToGRPCField(f.matchType))
|
||||
}
|
||||
|
||||
|
@ -420,54 +418,6 @@ func (l *TokenLifetime) FromGRPCMessage(m grpc.Message) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (c *APEOverride) ToGRPCMessage() grpc.Message {
|
||||
var m *acl.BearerToken_Body_APEOverride
|
||||
|
||||
if c != nil {
|
||||
m = new(acl.BearerToken_Body_APEOverride)
|
||||
|
||||
m.SetTarget(c.target.ToGRPCMessage().(*apeGRPC.ChainTarget))
|
||||
|
||||
if len(c.chains) > 0 {
|
||||
apeChains := make([]*apeGRPC.Chain, len(c.chains))
|
||||
for i := range c.chains {
|
||||
apeChains[i] = c.chains[i].ToGRPCMessage().(*apeGRPC.Chain)
|
||||
}
|
||||
m.SetChains(apeChains)
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (c *APEOverride) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*acl.BearerToken_Body_APEOverride)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
if targetGRPC := v.GetTarget(); targetGRPC != nil {
|
||||
if c.target == nil {
|
||||
c.target = new(ape.ChainTarget)
|
||||
}
|
||||
if err := c.target.FromGRPCMessage(v.GetTarget()); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if apeChains := v.GetChains(); len(apeChains) > 0 {
|
||||
c.chains = make([]*ape.Chain, len(apeChains))
|
||||
for i := range apeChains {
|
||||
c.chains[i] = new(ape.Chain)
|
||||
if err := c.chains[i].FromGRPCMessage(apeChains[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message {
|
||||
var m *acl.BearerToken_Body
|
||||
|
||||
|
@ -477,8 +427,7 @@ func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message {
|
|||
m.SetOwnerId(bt.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
||||
m.SetLifetime(bt.lifetime.ToGRPCMessage().(*acl.BearerToken_Body_TokenLifetime))
|
||||
m.SetEaclTable(bt.eacl.ToGRPCMessage().(*acl.EACLTable))
|
||||
m.SetAllowImpersonate(bt.impersonate)
|
||||
m.SetAPEOverride(bt.apeOverride.ToGRPCMessage().(*acl.BearerToken_Body_APEOverride))
|
||||
m.SetImpersonate(bt.impersonate)
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -528,19 +477,7 @@ func (bt *BearerTokenBody) FromGRPCMessage(m grpc.Message) error {
|
|||
bt.eacl = new(Table)
|
||||
}
|
||||
|
||||
if err = bt.eacl.FromGRPCMessage(eacl); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if apeOverrideGRPC := v.GetApeOverride(); apeOverrideGRPC != nil {
|
||||
if bt.apeOverride == nil {
|
||||
bt.apeOverride = new(APEOverride)
|
||||
}
|
||||
err = bt.apeOverride.FromGRPCMessage(apeOverrideGRPC)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = bt.eacl.FromGRPCMessage(eacl)
|
||||
}
|
||||
|
||||
bt.impersonate = v.GetAllowImpersonate()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package acl
|
||||
|
||||
import (
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||
)
|
||||
|
||||
|
@ -40,8 +39,8 @@ func (m *EACLRecord) SetTargets(v []*EACLRecord_Target) {
|
|||
m.Targets = v
|
||||
}
|
||||
|
||||
// SetHeaderType sets header type of the eACL filter.
|
||||
func (m *EACLRecord_Filter) SetHeaderType(v HeaderType) {
|
||||
// SetHeader sets header type of the eACL filter.
|
||||
func (m *EACLRecord_Filter) SetHeader(v HeaderType) {
|
||||
m.HeaderType = v
|
||||
}
|
||||
|
||||
|
@ -75,18 +74,6 @@ func (m *BearerToken_Body) SetEaclTable(v *EACLTable) {
|
|||
m.EaclTable = v
|
||||
}
|
||||
|
||||
func (m *BearerToken_Body) SetAPEOverride(v *BearerToken_Body_APEOverride) {
|
||||
m.ApeOverride = v
|
||||
}
|
||||
|
||||
func (m *BearerToken_Body_APEOverride) SetChains(v []*ape.Chain) {
|
||||
m.Chains = v
|
||||
}
|
||||
|
||||
func (m *BearerToken_Body_APEOverride) SetTarget(v *ape.ChainTarget) {
|
||||
m.Target = v
|
||||
}
|
||||
|
||||
// SetOwnerId sets identifier of the bearer token owner.
|
||||
func (m *BearerToken_Body) SetOwnerId(v *refs.OwnerID) {
|
||||
m.OwnerId = v
|
||||
|
@ -97,8 +84,8 @@ func (m *BearerToken_Body) SetLifetime(v *BearerToken_Body_TokenLifetime) {
|
|||
m.Lifetime = v
|
||||
}
|
||||
|
||||
// SetAllowImpersonate allows impersonate.
|
||||
func (m *BearerToken_Body) SetAllowImpersonate(v bool) {
|
||||
// SetImpersonate allows impersonate.
|
||||
func (m *BearerToken_Body) SetImpersonate(v bool) {
|
||||
m.AllowImpersonate = v
|
||||
}
|
||||
|
||||
|
|
357
acl/grpc/types.pb.go
generated
357
acl/grpc/types.pb.go
generated
|
@ -1,13 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: acl/grpc/types.proto
|
||||
|
||||
package acl
|
||||
|
||||
import (
|
||||
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
|
@ -33,8 +32,7 @@ const (
|
|||
// System target rule is applied if sender is a storage node within the
|
||||
// container or an inner ring node
|
||||
Role_SYSTEM Role = 2
|
||||
// Others target rule is applied if sender is neither a user nor a system
|
||||
// target
|
||||
// Others target rule is applied if sender is neither a user nor a system target
|
||||
Role_OTHERS Role = 3
|
||||
)
|
||||
|
||||
|
@ -474,8 +472,8 @@ func (x *EACLTable) GetRecords() []*EACLRecord {
|
|||
// used in the similar use cases, like providing authorisation to externally
|
||||
// authenticated party.
|
||||
//
|
||||
// BearerToken can be issued only by the container's owner and must be signed
|
||||
// using the key associated with the container's `OwnerID`.
|
||||
// BearerToken can be issued only by the container's owner and must be signed using
|
||||
// the key associated with the container's `OwnerID`.
|
||||
type BearerToken struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -697,8 +695,8 @@ func (x *EACLRecord_Target) GetKeys() [][]byte {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Bearer Token body structure contains Extended ACL table issued by the
|
||||
// container owner with additional information preventing token abuse.
|
||||
// Bearer Token body structure contains Extended ACL table issued by the container
|
||||
// owner with additional information preventing token abuse.
|
||||
type BearerToken_Body struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -706,10 +704,8 @@ type BearerToken_Body struct {
|
|||
|
||||
// Table of Extended ACL rules to use instead of the ones attached to the
|
||||
// container. If it contains `container_id` field, bearer token is only
|
||||
// valid for this specific container. Otherwise, any container of the same
|
||||
// owner is allowed.
|
||||
//
|
||||
// Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead.
|
||||
// valid for this specific container. Otherwise, any container of the same owner
|
||||
// is allowed.
|
||||
EaclTable *EACLTable `protobuf:"bytes,1,opt,name=eacl_table,json=eaclTable,proto3" json:"eacl_table,omitempty"`
|
||||
// `OwnerID` defines to whom the token was issued. It must match the request
|
||||
// originator's `OwnerID`. If empty, any token bearer will be accepted.
|
||||
|
@ -719,8 +715,6 @@ type BearerToken_Body struct {
|
|||
// AllowImpersonate flag to consider token signer as request owner.
|
||||
// If this field is true extended ACL table in token body isn't processed.
|
||||
AllowImpersonate bool `protobuf:"varint,4,opt,name=allow_impersonate,json=allowImpersonate,proto3" json:"allow_impersonate,omitempty"`
|
||||
// APE override for the target.
|
||||
ApeOverride *BearerToken_Body_APEOverride `protobuf:"bytes,5,opt,name=ape_override,json=apeOverride,proto3" json:"ape_override,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body) Reset() {
|
||||
|
@ -783,13 +777,6 @@ func (x *BearerToken_Body) GetAllowImpersonate() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body) GetApeOverride() *BearerToken_Body_APEOverride {
|
||||
if x != nil {
|
||||
return x.ApeOverride
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Lifetime parameters of the token. Field names taken from
|
||||
// [rfc7519](https://tools.ietf.org/html/rfc7519).
|
||||
type BearerToken_Body_TokenLifetime struct {
|
||||
|
@ -858,189 +845,113 @@ func (x *BearerToken_Body_TokenLifetime) GetIat() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// APEOverride is the list of APE chains defined for a target.
|
||||
// These chains are meant to serve as overrides to the already defined (or even undefined)
|
||||
// APE chains for the target (see contract `Policy`).
|
||||
//
|
||||
// The server-side processing of the bearer token with set APE overrides must verify if a client is permitted
|
||||
// to override chains for the target, preventing unauthorized access through the APE mechanism.
|
||||
type BearerToken_Body_APEOverride struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Target for which chains are applied.
|
||||
Target *grpc1.ChainTarget `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
|
||||
// The list of APE chains.
|
||||
Chains []*grpc1.Chain `protobuf:"bytes,2,rep,name=chains,proto3" json:"chains,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body_APEOverride) Reset() {
|
||||
*x = BearerToken_Body_APEOverride{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_acl_grpc_types_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body_APEOverride) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*BearerToken_Body_APEOverride) ProtoMessage() {}
|
||||
|
||||
func (x *BearerToken_Body_APEOverride) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_acl_grpc_types_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BearerToken_Body_APEOverride.ProtoReflect.Descriptor instead.
|
||||
func (*BearerToken_Body_APEOverride) Descriptor() ([]byte, []int) {
|
||||
return file_acl_grpc_types_proto_rawDescGZIP(), []int{2, 0, 1}
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body_APEOverride) GetTarget() *grpc1.ChainTarget {
|
||||
if x != nil {
|
||||
return x.Target
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *BearerToken_Body_APEOverride) GetChains() []*grpc1.Chain {
|
||||
if x != nil {
|
||||
return x.Chains
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_acl_grpc_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_acl_grpc_types_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x61, 0x63, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x1a, 0x15, 0x72, 0x65, 0x66, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63,
|
||||
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x61, 0x70,
|
||||
0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a, 0x0a, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x12, 0x36, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09,
|
||||
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
|
||||
0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74,
|
||||
0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
|
||||
0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c,
|
||||
0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
||||
0x1a, 0xa5, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
||||
0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x68, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65,
|
||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x45, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x13, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
||||
0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b,
|
||||
0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22,
|
||||
0xb3, 0x01, 0x0a, 0x09, 0x45, 0x41, 0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a,
|
||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44,
|
||||
0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63,
|
||||
0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xf3, 0x04, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
|
||||
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e,
|
||||
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
|
||||
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
|
||||
0x75, 0x72, 0x65, 0x1a, 0xf5, 0x03, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x0a,
|
||||
0x65, 0x61, 0x63, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
||||
0x2e, 0x45, 0x41, 0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x65, 0x61, 0x63, 0x6c,
|
||||
0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44,
|
||||
0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x49, 0x0a, 0x08, 0x6c, 0x69, 0x66,
|
||||
0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65,
|
||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72,
|
||||
0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x54, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x08, 0x6c, 0x69, 0x66, 0x65,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6d,
|
||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74,
|
||||
0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x61, 0x70, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
|
||||
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x41, 0x50, 0x45, 0x4f, 0x76, 0x65, 0x72,
|
||||
0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x61, 0x70, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
|
||||
0x65, 0x1a, 0x45, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x03, 0x65, 0x78, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x62, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x03, 0x6e, 0x62, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x61, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x03, 0x69, 0x61, 0x74, 0x1a, 0x71, 0x0a, 0x0b, 0x41, 0x50, 0x45, 0x4f,
|
||||
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x06,
|
||||
0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66,
|
||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x2e, 0x43, 0x68,
|
||||
0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2a, 0x3e, 0x0a, 0x04, 0x52,
|
||||
0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
|
||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45,
|
||||
0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x12,
|
||||
0x0a, 0x0a, 0x06, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x53, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x09, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43,
|
||||
0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45,
|
||||
0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
|
||||
0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x2a, 0x7a, 0x0a, 0x09,
|
||||
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45,
|
||||
0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x03,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x45, 0x54, 0x52,
|
||||
0x41, 0x4e, 0x47, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e,
|
||||
0x47, 0x45, 0x48, 0x41, 0x53, 0x48, 0x10, 0x07, 0x2a, 0x35, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53,
|
||||
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c,
|
||||
0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x2a,
|
||||
0x4a, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x12, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
|
||||
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54,
|
||||
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x0b,
|
||||
0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x03, 0x42, 0x58, 0x5a, 0x3c, 0x67,
|
||||
0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f,
|
||||
0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f,
|
||||
0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61,
|
||||
0x63, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61, 0x63, 0x6c, 0xaa, 0x02, 0x17, 0x4e, 0x65,
|
||||
0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50,
|
||||
0x49, 0x2e, 0x41, 0x63, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a,
|
||||
0x0a, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4f,
|
||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x61, 0x63, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x46,
|
||||
0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a,
|
||||
0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e,
|
||||
0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0xa5, 0x01, 0x0a, 0x06, 0x46,
|
||||
0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f,
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||
0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x1a, 0x45, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x04,
|
||||
0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
|
||||
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x41,
|
||||
0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
|
||||
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66,
|
||||
0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0b, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65,
|
||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22,
|
||||
0xb0, 0x03, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||
0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
|
||||
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65,
|
||||
0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04,
|
||||
0x62, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
|
||||
0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xb2, 0x02,
|
||||
0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x0a, 0x65, 0x61, 0x63, 0x6c, 0x5f, 0x74,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x54,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x65, 0x61, 0x63, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12,
|
||||
0x32, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65,
|
||||
0x66, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65,
|
||||
0x72, 0x49, 0x44, 0x12, 0x49, 0x0a, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x52, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b,
|
||||
0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||
0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
|
||||
0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x1a, 0x45, 0x0a, 0x0d, 0x54,
|
||||
0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6e, 0x62, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6e, 0x62, 0x66,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x69, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x69,
|
||||
0x61, 0x74, 0x2a, 0x3e, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f,
|
||||
0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
|
||||
0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59,
|
||||
0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x53,
|
||||
0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53,
|
||||
0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41,
|
||||
0x4c, 0x10, 0x02, 0x2a, 0x7a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47,
|
||||
0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x07,
|
||||
0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54,
|
||||
0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x05, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a,
|
||||
0x0c, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x48, 0x41, 0x53, 0x48, 0x10, 0x07, 0x2a,
|
||||
0x35, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54,
|
||||
0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
|
||||
0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x2a, 0x4a, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a,
|
||||
0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,
|
||||
0x10, 0x03, 0x42, 0x58, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d,
|
||||
0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61,
|
||||
0x63, 0x6c, 0xaa, 0x02, 0x17, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f,
|
||||
0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x41, 0x63, 0x6c, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1056,7 +967,7 @@ func file_acl_grpc_types_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_acl_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
|
||||
var file_acl_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_acl_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_acl_grpc_types_proto_goTypes = []interface{}{
|
||||
(Role)(0), // 0: neo.fs.v2.acl.Role
|
||||
(MatchType)(0), // 1: neo.fs.v2.acl.MatchType
|
||||
|
@ -1070,38 +981,32 @@ var file_acl_grpc_types_proto_goTypes = []interface{}{
|
|||
(*EACLRecord_Target)(nil), // 9: neo.fs.v2.acl.EACLRecord.Target
|
||||
(*BearerToken_Body)(nil), // 10: neo.fs.v2.acl.BearerToken.Body
|
||||
(*BearerToken_Body_TokenLifetime)(nil), // 11: neo.fs.v2.acl.BearerToken.Body.TokenLifetime
|
||||
(*BearerToken_Body_APEOverride)(nil), // 12: neo.fs.v2.acl.BearerToken.Body.APEOverride
|
||||
(*grpc.Version)(nil), // 13: neo.fs.v2.refs.Version
|
||||
(*grpc.ContainerID)(nil), // 14: neo.fs.v2.refs.ContainerID
|
||||
(*grpc.Signature)(nil), // 15: neo.fs.v2.refs.Signature
|
||||
(*grpc.OwnerID)(nil), // 16: neo.fs.v2.refs.OwnerID
|
||||
(*grpc1.ChainTarget)(nil), // 17: frostfs.v2.ape.ChainTarget
|
||||
(*grpc1.Chain)(nil), // 18: frostfs.v2.ape.Chain
|
||||
(*grpc.Version)(nil), // 12: neo.fs.v2.refs.Version
|
||||
(*grpc.ContainerID)(nil), // 13: neo.fs.v2.refs.ContainerID
|
||||
(*grpc.Signature)(nil), // 14: neo.fs.v2.refs.Signature
|
||||
(*grpc.OwnerID)(nil), // 15: neo.fs.v2.refs.OwnerID
|
||||
}
|
||||
var file_acl_grpc_types_proto_depIdxs = []int32{
|
||||
2, // 0: neo.fs.v2.acl.EACLRecord.operation:type_name -> neo.fs.v2.acl.Operation
|
||||
3, // 1: neo.fs.v2.acl.EACLRecord.action:type_name -> neo.fs.v2.acl.Action
|
||||
8, // 2: neo.fs.v2.acl.EACLRecord.filters:type_name -> neo.fs.v2.acl.EACLRecord.Filter
|
||||
9, // 3: neo.fs.v2.acl.EACLRecord.targets:type_name -> neo.fs.v2.acl.EACLRecord.Target
|
||||
13, // 4: neo.fs.v2.acl.EACLTable.version:type_name -> neo.fs.v2.refs.Version
|
||||
14, // 5: neo.fs.v2.acl.EACLTable.container_id:type_name -> neo.fs.v2.refs.ContainerID
|
||||
12, // 4: neo.fs.v2.acl.EACLTable.version:type_name -> neo.fs.v2.refs.Version
|
||||
13, // 5: neo.fs.v2.acl.EACLTable.container_id:type_name -> neo.fs.v2.refs.ContainerID
|
||||
5, // 6: neo.fs.v2.acl.EACLTable.records:type_name -> neo.fs.v2.acl.EACLRecord
|
||||
10, // 7: neo.fs.v2.acl.BearerToken.body:type_name -> neo.fs.v2.acl.BearerToken.Body
|
||||
15, // 8: neo.fs.v2.acl.BearerToken.signature:type_name -> neo.fs.v2.refs.Signature
|
||||
14, // 8: neo.fs.v2.acl.BearerToken.signature:type_name -> neo.fs.v2.refs.Signature
|
||||
4, // 9: neo.fs.v2.acl.EACLRecord.Filter.header_type:type_name -> neo.fs.v2.acl.HeaderType
|
||||
1, // 10: neo.fs.v2.acl.EACLRecord.Filter.match_type:type_name -> neo.fs.v2.acl.MatchType
|
||||
0, // 11: neo.fs.v2.acl.EACLRecord.Target.role:type_name -> neo.fs.v2.acl.Role
|
||||
6, // 12: neo.fs.v2.acl.BearerToken.Body.eacl_table:type_name -> neo.fs.v2.acl.EACLTable
|
||||
16, // 13: neo.fs.v2.acl.BearerToken.Body.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
15, // 13: neo.fs.v2.acl.BearerToken.Body.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
11, // 14: neo.fs.v2.acl.BearerToken.Body.lifetime:type_name -> neo.fs.v2.acl.BearerToken.Body.TokenLifetime
|
||||
12, // 15: neo.fs.v2.acl.BearerToken.Body.ape_override:type_name -> neo.fs.v2.acl.BearerToken.Body.APEOverride
|
||||
17, // 16: neo.fs.v2.acl.BearerToken.Body.APEOverride.target:type_name -> frostfs.v2.ape.ChainTarget
|
||||
18, // 17: neo.fs.v2.acl.BearerToken.Body.APEOverride.chains:type_name -> frostfs.v2.ape.Chain
|
||||
18, // [18:18] is the sub-list for method output_type
|
||||
18, // [18:18] is the sub-list for method input_type
|
||||
18, // [18:18] is the sub-list for extension type_name
|
||||
18, // [18:18] is the sub-list for extension extendee
|
||||
0, // [0:18] is the sub-list for field type_name
|
||||
15, // [15:15] is the sub-list for method output_type
|
||||
15, // [15:15] is the sub-list for method input_type
|
||||
15, // [15:15] is the sub-list for extension type_name
|
||||
15, // [15:15] is the sub-list for extension extendee
|
||||
0, // [0:15] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_acl_grpc_types_proto_init() }
|
||||
|
@ -1194,18 +1099,6 @@ func file_acl_grpc_types_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_acl_grpc_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BearerToken_Body_APEOverride); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -1213,7 +1106,7 @@ func file_acl_grpc_types_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_acl_grpc_types_proto_rawDesc,
|
||||
NumEnums: 5,
|
||||
NumMessages: 8,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -21,14 +21,6 @@ func (t *Target) UnmarshalJSON(data []byte) error {
|
|||
return message.UnmarshalJSON(t, data, new(acl.EACLRecord_Target))
|
||||
}
|
||||
|
||||
func (a *APEOverride) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(a)
|
||||
}
|
||||
|
||||
func (a *APEOverride) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(a, data, new(acl.BearerToken_Body_APEOverride))
|
||||
}
|
||||
|
||||
func (r *Record) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(r)
|
||||
}
|
||||
|
|
|
@ -28,14 +28,10 @@ const (
|
|||
lifetimeNotValidBeforeField = 2
|
||||
lifetimeIssuedAtField = 3
|
||||
|
||||
tokenAPEChainsTargetField = 1
|
||||
tokenAPEChainsChainsField = 2
|
||||
|
||||
bearerTokenBodyACLField = 1
|
||||
bearerTokenBodyOwnerField = 2
|
||||
bearerTokenBodyLifetimeField = 3
|
||||
bearerTokenBodyImpersonate = 4
|
||||
bearerTokenTokenAPEChainsField = 5
|
||||
bearerTokenBodyACLField = 1
|
||||
bearerTokenBodyOwnerField = 2
|
||||
bearerTokenBodyLifetimeField = 3
|
||||
bearerTokenBodyImpersonate = 4
|
||||
|
||||
bearerTokenBodyField = 1
|
||||
bearerTokenSignatureField = 2
|
||||
|
@ -243,42 +239,6 @@ func (l *TokenLifetime) Unmarshal(data []byte) error {
|
|||
return message.Unmarshal(l, data, new(acl.BearerToken_Body_TokenLifetime))
|
||||
}
|
||||
|
||||
func (c *APEOverride) StableMarshal(buf []byte) []byte {
|
||||
if c == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, c.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += protoutil.NestedStructureMarshal(tokenAPEChainsTargetField, buf[offset:], c.target)
|
||||
for i := range c.chains {
|
||||
offset += protoutil.NestedStructureMarshal(tokenAPEChainsChainsField, buf[offset:], c.chains[i])
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (c *APEOverride) StableSize() (size int) {
|
||||
if c == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.NestedStructureSize(tokenAPEChainsTargetField, c.target)
|
||||
for i := range c.chains {
|
||||
size += protoutil.NestedStructureSize(tokenAPEChainsChainsField, c.chains[i])
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (c *APEOverride) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(c, data, new(acl.BearerToken_Body_APEOverride))
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte {
|
||||
if bt == nil {
|
||||
return []byte{}
|
||||
|
@ -293,8 +253,7 @@ func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte {
|
|||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyACLField, buf[offset:], bt.eacl)
|
||||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyOwnerField, buf[offset:], bt.ownerID)
|
||||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyLifetimeField, buf[offset:], bt.lifetime)
|
||||
offset += protoutil.BoolMarshal(bearerTokenBodyImpersonate, buf[offset:], bt.impersonate)
|
||||
protoutil.NestedStructureMarshal(bearerTokenTokenAPEChainsField, buf[offset:], bt.apeOverride)
|
||||
protoutil.BoolMarshal(bearerTokenBodyImpersonate, buf[offset:], bt.impersonate)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
@ -308,7 +267,6 @@ func (bt *BearerTokenBody) StableSize() (size int) {
|
|||
size += protoutil.NestedStructureSize(bearerTokenBodyOwnerField, bt.ownerID)
|
||||
size += protoutil.NestedStructureSize(bearerTokenBodyLifetimeField, bt.lifetime)
|
||||
size += protoutil.BoolSize(bearerTokenBodyImpersonate, bt.impersonate)
|
||||
size += protoutil.NestedStructureSize(bearerTokenTokenAPEChainsField, bt.apeOverride)
|
||||
|
||||
return size
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package acltest
|
|||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
|
||||
apetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/test"
|
||||
accountingtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
||||
)
|
||||
|
||||
|
@ -23,20 +22,8 @@ func GenerateBearerTokenBody(empty bool) *acl.BearerTokenBody {
|
|||
|
||||
if !empty {
|
||||
m.SetOwnerID(accountingtest.GenerateOwnerID(false))
|
||||
m.SetEACL(GenerateTable(false))
|
||||
m.SetLifetime(GenerateTokenLifetime(false))
|
||||
m.SetAPEOverride(GenerateAPEOverride(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateAPEOverride(empty bool) *acl.APEOverride {
|
||||
var m *acl.APEOverride
|
||||
|
||||
if !empty {
|
||||
m = new(acl.APEOverride)
|
||||
m.SetTarget(apetest.GenerateChainTarget(empty))
|
||||
m.SetChains(apetest.GenerateRawChains(false, 3))
|
||||
}
|
||||
|
||||
return m
|
||||
|
|
41
acl/types.go
41
acl/types.go
|
@ -1,9 +1,6 @@
|
|||
package acl
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
||||
"git.frostfs.info/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.
|
||||
|
@ -49,12 +46,6 @@ type TokenLifetime struct {
|
|||
exp, nbf, iat uint64
|
||||
}
|
||||
|
||||
type APEOverride struct {
|
||||
target *ape.ChainTarget
|
||||
|
||||
chains []*ape.Chain
|
||||
}
|
||||
|
||||
type BearerTokenBody struct {
|
||||
eacl *Table
|
||||
|
||||
|
@ -62,8 +53,6 @@ type BearerTokenBody struct {
|
|||
|
||||
lifetime *TokenLifetime
|
||||
|
||||
apeOverride *APEOverride
|
||||
|
||||
impersonate bool
|
||||
}
|
||||
|
||||
|
@ -329,34 +318,6 @@ func (bt *BearerTokenBody) SetEACL(v *Table) {
|
|||
bt.eacl = v
|
||||
}
|
||||
|
||||
func (t *APEOverride) GetTarget() *ape.ChainTarget {
|
||||
return t.target
|
||||
}
|
||||
|
||||
func (t *APEOverride) GetChains() []*ape.Chain {
|
||||
return t.chains
|
||||
}
|
||||
|
||||
func (t *APEOverride) SetTarget(v *ape.ChainTarget) {
|
||||
t.target = v
|
||||
}
|
||||
|
||||
func (t *APEOverride) SetChains(v []*ape.Chain) {
|
||||
t.chains = v
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) GetAPEOverride() *APEOverride {
|
||||
if bt != nil {
|
||||
return bt.apeOverride
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) SetAPEOverride(v *APEOverride) {
|
||||
bt.apeOverride = v
|
||||
}
|
||||
|
||||
func (bt *BearerTokenBody) GetOwnerID() *refs.OwnerID {
|
||||
if bt != nil {
|
||||
return bt.ownerID
|
||||
|
|
132
ape/convert.go
132
ape/convert.go
|
@ -1,132 +0,0 @@
|
|||
package ape
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
func TargetTypeToGRPCField(typ TargetType) ape.TargetType {
|
||||
switch typ {
|
||||
case TargetTypeNamespace:
|
||||
return ape.TargetType_NAMESPACE
|
||||
case TargetTypeContainer:
|
||||
return ape.TargetType_CONTAINER
|
||||
case TargetTypeUser:
|
||||
return ape.TargetType_USER
|
||||
case TargetTypeGroup:
|
||||
return ape.TargetType_GROUP
|
||||
default:
|
||||
return ape.TargetType_UNDEFINED
|
||||
}
|
||||
}
|
||||
|
||||
func TargetTypeFromGRPCField(typ ape.TargetType) TargetType {
|
||||
switch typ {
|
||||
case ape.TargetType_NAMESPACE:
|
||||
return TargetTypeNamespace
|
||||
case ape.TargetType_CONTAINER:
|
||||
return TargetTypeContainer
|
||||
case ape.TargetType_USER:
|
||||
return TargetTypeUser
|
||||
case ape.TargetType_GROUP:
|
||||
return TargetTypeGroup
|
||||
default:
|
||||
return TargetTypeUndefined
|
||||
}
|
||||
}
|
||||
|
||||
func TargetTypeToGRPC(typ TargetType) ape.TargetType {
|
||||
return ape.TargetType(typ)
|
||||
}
|
||||
|
||||
func TargetTypeFromGRPC(typ ape.TargetType) TargetType {
|
||||
return TargetType(typ)
|
||||
}
|
||||
|
||||
func (v2 *ChainTarget) ToGRPCMessage() grpc.Message {
|
||||
var mgrpc *ape.ChainTarget
|
||||
|
||||
if v2 != nil {
|
||||
mgrpc = new(ape.ChainTarget)
|
||||
|
||||
mgrpc.SetType(TargetTypeToGRPC(v2.GetTargetType()))
|
||||
mgrpc.SetName(v2.GetName())
|
||||
}
|
||||
|
||||
return mgrpc
|
||||
}
|
||||
|
||||
func (v2 *ChainTarget) FromGRPCMessage(m grpc.Message) error {
|
||||
mgrpc, ok := m.(*ape.ChainTarget)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, mgrpc)
|
||||
}
|
||||
|
||||
v2.SetTargetType(TargetTypeFromGRPC(mgrpc.GetType()))
|
||||
v2.SetName(mgrpc.GetName())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v2 *ChainRaw) ToGRPCMessage() grpc.Message {
|
||||
var mgrpc *ape.Chain_Raw
|
||||
|
||||
if v2 != nil {
|
||||
mgrpc = new(ape.Chain_Raw)
|
||||
|
||||
mgrpc.SetRaw(v2.GetRaw())
|
||||
}
|
||||
|
||||
return mgrpc
|
||||
}
|
||||
|
||||
func (v2 *ChainRaw) FromGRPCMessage(m grpc.Message) error {
|
||||
mgrpc, ok := m.(*ape.Chain_Raw)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, mgrpc)
|
||||
}
|
||||
|
||||
v2.SetRaw(mgrpc.GetRaw())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (v2 *Chain) ToGRPCMessage() grpc.Message {
|
||||
var mgrpc *ape.Chain
|
||||
|
||||
if v2 != nil {
|
||||
mgrpc = new(ape.Chain)
|
||||
|
||||
switch chainKind := v2.GetKind().(type) {
|
||||
default:
|
||||
panic(fmt.Sprintf("unsupported chain kind: %T", chainKind))
|
||||
case *ChainRaw:
|
||||
mgrpc.SetKind(chainKind.ToGRPCMessage().(*ape.Chain_Raw))
|
||||
}
|
||||
}
|
||||
|
||||
return mgrpc
|
||||
}
|
||||
|
||||
func (v2 *Chain) FromGRPCMessage(m grpc.Message) error {
|
||||
mgrpc, ok := m.(*ape.Chain)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, mgrpc)
|
||||
}
|
||||
|
||||
switch chainKind := mgrpc.GetKind().(type) {
|
||||
default:
|
||||
return fmt.Errorf("unsupported chain kind: %T", chainKind)
|
||||
case *ape.Chain_Raw:
|
||||
chainRaw := new(ChainRaw)
|
||||
if err := chainRaw.FromGRPCMessage(chainKind); err != nil {
|
||||
return err
|
||||
}
|
||||
v2.SetKind(chainRaw)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package ape
|
||||
|
||||
func (t *ChainTarget) SetType(typ TargetType) {
|
||||
t.Type = typ
|
||||
}
|
||||
|
||||
func (t *ChainTarget) SetName(name string) {
|
||||
t.Name = name
|
||||
}
|
||||
|
||||
func (c *Chain) SetKind(kind isChain_Kind) {
|
||||
c.Kind = kind
|
||||
}
|
||||
|
||||
func (cr *Chain_Raw) SetRaw(raw []byte) {
|
||||
cr.Raw = raw
|
||||
}
|
||||
|
||||
func (cr *Chain_Raw) GetRaw() []byte {
|
||||
return cr.Raw
|
||||
}
|
310
ape/grpc/types.pb.go
generated
310
ape/grpc/types.pb.go
generated
|
@ -1,310 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// source: ape/grpc/types.proto
|
||||
|
||||
package ape
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// TargetType is a type target to which a rule chain is defined.
|
||||
type TargetType int32
|
||||
|
||||
const (
|
||||
TargetType_UNDEFINED TargetType = 0
|
||||
TargetType_NAMESPACE TargetType = 1
|
||||
TargetType_CONTAINER TargetType = 2
|
||||
TargetType_USER TargetType = 3
|
||||
TargetType_GROUP TargetType = 4
|
||||
)
|
||||
|
||||
// Enum value maps for TargetType.
|
||||
var (
|
||||
TargetType_name = map[int32]string{
|
||||
0: "UNDEFINED",
|
||||
1: "NAMESPACE",
|
||||
2: "CONTAINER",
|
||||
3: "USER",
|
||||
4: "GROUP",
|
||||
}
|
||||
TargetType_value = map[string]int32{
|
||||
"UNDEFINED": 0,
|
||||
"NAMESPACE": 1,
|
||||
"CONTAINER": 2,
|
||||
"USER": 3,
|
||||
"GROUP": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x TargetType) Enum() *TargetType {
|
||||
p := new(TargetType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x TargetType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (TargetType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_ape_grpc_types_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (TargetType) Type() protoreflect.EnumType {
|
||||
return &file_ape_grpc_types_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x TargetType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TargetType.Descriptor instead.
|
||||
func (TargetType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_ape_grpc_types_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// ChainTarget is an object to which a rule chain is defined.
|
||||
type ChainTarget struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type TargetType `protobuf:"varint,1,opt,name=type,proto3,enum=frostfs.v2.ape.TargetType" json:"type,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ChainTarget) Reset() {
|
||||
*x = ChainTarget{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ape_grpc_types_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ChainTarget) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ChainTarget) ProtoMessage() {}
|
||||
|
||||
func (x *ChainTarget) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ape_grpc_types_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChainTarget.ProtoReflect.Descriptor instead.
|
||||
func (*ChainTarget) Descriptor() ([]byte, []int) {
|
||||
return file_ape_grpc_types_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ChainTarget) GetType() TargetType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return TargetType_UNDEFINED
|
||||
}
|
||||
|
||||
func (x *ChainTarget) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Chain is a chain of rules defined for a specific target.
|
||||
type Chain struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Kind:
|
||||
//
|
||||
// *Chain_Raw
|
||||
Kind isChain_Kind `protobuf_oneof:"kind"`
|
||||
}
|
||||
|
||||
func (x *Chain) Reset() {
|
||||
*x = Chain{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_ape_grpc_types_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Chain) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Chain) ProtoMessage() {}
|
||||
|
||||
func (x *Chain) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ape_grpc_types_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Chain.ProtoReflect.Descriptor instead.
|
||||
func (*Chain) Descriptor() ([]byte, []int) {
|
||||
return file_ape_grpc_types_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *Chain) GetKind() isChain_Kind {
|
||||
if m != nil {
|
||||
return m.Kind
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Chain) GetRaw() []byte {
|
||||
if x, ok := x.GetKind().(*Chain_Raw); ok {
|
||||
return x.Raw
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isChain_Kind interface {
|
||||
isChain_Kind()
|
||||
}
|
||||
|
||||
type Chain_Raw struct {
|
||||
// Raw representation of a serizalized rule chain.
|
||||
Raw []byte `protobuf:"bytes,1,opt,name=raw,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*Chain_Raw) isChain_Kind() {}
|
||||
|
||||
var File_ape_grpc_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_ape_grpc_types_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x61, 0x70, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x22, 0x51, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x61, 0x70, 0x65, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x05, 0x43, 0x68, 0x61,
|
||||
0x69, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48,
|
||||
0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x2a, 0x4e,
|
||||
0x0a, 0x0a, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09,
|
||||
0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e,
|
||||
0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f,
|
||||
0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45,
|
||||
0x52, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x04, 0x42, 0x3e,
|
||||
0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f,
|
||||
0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76,
|
||||
0x32, 0x2f, 0x61, 0x70, 0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61, 0x70, 0x65, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_ape_grpc_types_proto_rawDescOnce sync.Once
|
||||
file_ape_grpc_types_proto_rawDescData = file_ape_grpc_types_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_ape_grpc_types_proto_rawDescGZIP() []byte {
|
||||
file_ape_grpc_types_proto_rawDescOnce.Do(func() {
|
||||
file_ape_grpc_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_ape_grpc_types_proto_rawDescData)
|
||||
})
|
||||
return file_ape_grpc_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ape_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_ape_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_ape_grpc_types_proto_goTypes = []interface{}{
|
||||
(TargetType)(0), // 0: frostfs.v2.ape.TargetType
|
||||
(*ChainTarget)(nil), // 1: frostfs.v2.ape.ChainTarget
|
||||
(*Chain)(nil), // 2: frostfs.v2.ape.Chain
|
||||
}
|
||||
var file_ape_grpc_types_proto_depIdxs = []int32{
|
||||
0, // 0: frostfs.v2.ape.ChainTarget.type:type_name -> frostfs.v2.ape.TargetType
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_ape_grpc_types_proto_init() }
|
||||
func file_ape_grpc_types_proto_init() {
|
||||
if File_ape_grpc_types_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_ape_grpc_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChainTarget); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_ape_grpc_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Chain); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_ape_grpc_types_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
(*Chain_Raw)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_ape_grpc_types_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_ape_grpc_types_proto_goTypes,
|
||||
DependencyIndexes: file_ape_grpc_types_proto_depIdxs,
|
||||
EnumInfos: file_ape_grpc_types_proto_enumTypes,
|
||||
MessageInfos: file_ape_grpc_types_proto_msgTypes,
|
||||
}.Build()
|
||||
File_ape_grpc_types_proto = out.File
|
||||
file_ape_grpc_types_proto_rawDesc = nil
|
||||
file_ape_grpc_types_proto_goTypes = nil
|
||||
file_ape_grpc_types_proto_depIdxs = nil
|
||||
}
|
14
ape/json.go
14
ape/json.go
|
@ -1,14 +0,0 @@
|
|||
package ape
|
||||
|
||||
import (
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
func (t *ChainTarget) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(t)
|
||||
}
|
||||
|
||||
func (t *ChainTarget) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(t, data, new(ape.ChainTarget))
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package ape
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
chainTargetTargetTypeField = 1
|
||||
chainTargetNameField = 2
|
||||
|
||||
chainRawField = 1
|
||||
)
|
||||
|
||||
func (t *ChainTarget) StableSize() (size int) {
|
||||
if t == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.EnumSize(chainTargetTargetTypeField, int32(t.targeType))
|
||||
size += proto.StringSize(chainTargetNameField, t.name)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (t *ChainTarget) StableMarshal(buf []byte) []byte {
|
||||
if t == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, t.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.EnumMarshal(chainTargetTargetTypeField, buf[offset:], int32(t.targeType))
|
||||
proto.StringMarshal(chainTargetNameField, buf[offset:], t.name)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (t *ChainTarget) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(t, data, new(ape.ChainTarget))
|
||||
}
|
||||
|
||||
func (c *Chain) StableSize() (size int) {
|
||||
if c == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
switch v := c.GetKind().(type) {
|
||||
case *ChainRaw:
|
||||
if v != nil {
|
||||
size += proto.BytesSize(chainRawField, v.GetRaw())
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("unsupported chain kind: %T", v))
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (c *Chain) StableMarshal(buf []byte) []byte {
|
||||
if c == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, c.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
switch v := c.GetKind().(type) {
|
||||
case *ChainRaw:
|
||||
if v != nil {
|
||||
proto.BytesMarshal(chainRawField, buf[offset:], v.GetRaw())
|
||||
}
|
||||
default:
|
||||
panic(fmt.Sprintf("unsupported chain kind: %T", v))
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (c *Chain) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(c, data, new(ape.Chain))
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package ape
|
||||
|
||||
import (
|
||||
apegrpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
)
|
||||
|
||||
func (tt TargetType) String() string {
|
||||
return TargetTypeToGRPCField(tt).String()
|
||||
}
|
||||
|
||||
func (tt *TargetType) FromString(s string) bool {
|
||||
i, ok := apegrpc.TargetType_value[s]
|
||||
if ok {
|
||||
*tt = TargetType(i)
|
||||
}
|
||||
|
||||
return ok
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
||||
)
|
||||
|
||||
func GenerateRawChains(empty bool, n int) []*ape.Chain {
|
||||
if empty {
|
||||
return []*ape.Chain{}
|
||||
}
|
||||
|
||||
res := make([]*ape.Chain, n)
|
||||
for i := range res {
|
||||
res[i] = GenerateRawChain(empty)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func GenerateRawChain(empty bool) *ape.Chain {
|
||||
chRaw := new(ape.ChainRaw)
|
||||
|
||||
if empty {
|
||||
chRaw.SetRaw([]byte("{}"))
|
||||
} else {
|
||||
chRaw.SetRaw([]byte(`{
|
||||
"ID": "",
|
||||
"Rules": [
|
||||
{
|
||||
"Status": "Allow",
|
||||
"Actions": {
|
||||
"Inverted": false,
|
||||
"Names": [
|
||||
"GetObject"
|
||||
]
|
||||
},
|
||||
"Resources": {
|
||||
"Inverted": false,
|
||||
"Names": [
|
||||
"native:object/*"
|
||||
]
|
||||
},
|
||||
"Any": false,
|
||||
"Condition": [
|
||||
{
|
||||
"Op": "StringEquals",
|
||||
"Object": "Resource",
|
||||
"Key": "Department",
|
||||
"Value": "HR"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"MatchType": "DenyPriority"
|
||||
}`))
|
||||
}
|
||||
|
||||
ch := new(ape.Chain)
|
||||
ch.SetKind(chRaw)
|
||||
return ch
|
||||
}
|
||||
|
||||
func GenerateChainTarget(empty bool) *ape.ChainTarget {
|
||||
m := new(ape.ChainTarget)
|
||||
|
||||
if !empty {
|
||||
m.SetTargetType(ape.TargetTypeContainer)
|
||||
m.SetName("BzQw5HH3feoxFDD5tCT87Y1726qzgLfxEE7wgtoRzB3R")
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
71
ape/types.go
71
ape/types.go
|
@ -1,71 +0,0 @@
|
|||
package ape
|
||||
|
||||
type TargetType uint32
|
||||
|
||||
const (
|
||||
TargetTypeUndefined TargetType = iota
|
||||
TargetTypeNamespace
|
||||
TargetTypeContainer
|
||||
TargetTypeUser
|
||||
TargetTypeGroup
|
||||
)
|
||||
|
||||
type ChainTarget struct {
|
||||
targeType TargetType
|
||||
|
||||
name string
|
||||
}
|
||||
|
||||
func (ct *ChainTarget) SetTargetType(targeType TargetType) {
|
||||
ct.targeType = targeType
|
||||
}
|
||||
|
||||
func (ct *ChainTarget) SetName(name string) {
|
||||
ct.name = name
|
||||
}
|
||||
|
||||
func (ct *ChainTarget) GetTargetType() TargetType {
|
||||
if ct != nil {
|
||||
return ct.targeType
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func (ct *ChainTarget) GetName() string {
|
||||
if ct != nil {
|
||||
return ct.name
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
type chainKind interface {
|
||||
isChainKind()
|
||||
}
|
||||
|
||||
type Chain struct {
|
||||
kind chainKind
|
||||
}
|
||||
|
||||
func (c *Chain) SetKind(kind chainKind) {
|
||||
c.kind = kind
|
||||
}
|
||||
|
||||
func (c *Chain) GetKind() chainKind {
|
||||
return c.kind
|
||||
}
|
||||
|
||||
type ChainRaw struct {
|
||||
Raw []byte
|
||||
}
|
||||
|
||||
func (*ChainRaw) isChainKind() {}
|
||||
|
||||
func (c *ChainRaw) SetRaw(raw []byte) {
|
||||
c.Raw = raw
|
||||
}
|
||||
|
||||
func (c *ChainRaw) GetRaw() []byte {
|
||||
return c.Raw
|
||||
}
|
|
@ -1,358 +0,0 @@
|
|||
package apemanager
|
||||
|
||||
import (
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
||||
apeGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
apemanager "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
func (reqBody *AddChainRequestBody) ToGRPCMessage() grpc.Message {
|
||||
var reqBodygrpc *apemanager.AddChainRequest_Body
|
||||
|
||||
if reqBody != nil {
|
||||
reqBodygrpc = new(apemanager.AddChainRequest_Body)
|
||||
|
||||
reqBodygrpc.SetTarget(reqBody.GetTarget().ToGRPCMessage().(*apeGRPC.ChainTarget))
|
||||
reqBodygrpc.SetChain(reqBody.GetChain().ToGRPCMessage().(*apeGRPC.Chain))
|
||||
}
|
||||
|
||||
return reqBodygrpc
|
||||
}
|
||||
|
||||
func (reqBody *AddChainRequestBody) FromGRPCMessage(m grpc.Message) error {
|
||||
reqBodygrpc, ok := m.(*apemanager.AddChainRequest_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqBodygrpc)
|
||||
}
|
||||
|
||||
if targetgrpc := reqBodygrpc.GetTarget(); targetgrpc != nil {
|
||||
reqBody.target = new(ape.ChainTarget)
|
||||
if err := reqBody.target.FromGRPCMessage(targetgrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if chaingrpc := reqBodygrpc.GetChain(); chaingrpc != nil {
|
||||
reqBody.chain = new(ape.Chain)
|
||||
if err := reqBody.GetChain().FromGRPCMessage(chaingrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (req *AddChainRequest) ToGRPCMessage() grpc.Message {
|
||||
var reqgrpc *apemanager.AddChainRequest
|
||||
|
||||
if req != nil {
|
||||
reqgrpc = new(apemanager.AddChainRequest)
|
||||
|
||||
reqgrpc.SetBody(req.GetBody().ToGRPCMessage().(*apemanager.AddChainRequest_Body))
|
||||
req.RequestHeaders.ToMessage(reqgrpc)
|
||||
}
|
||||
|
||||
return reqgrpc
|
||||
}
|
||||
|
||||
func (req *AddChainRequest) FromGRPCMessage(m grpc.Message) error {
|
||||
reqgrpc, ok := m.(*apemanager.AddChainRequest)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqgrpc)
|
||||
}
|
||||
|
||||
if reqBodygrpc := reqgrpc.GetBody(); reqBodygrpc != nil {
|
||||
req.body = new(AddChainRequestBody)
|
||||
if err := req.body.FromGRPCMessage(reqBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return req.RequestHeaders.FromMessage(reqgrpc)
|
||||
}
|
||||
|
||||
func (respBody *AddChainResponseBody) ToGRPCMessage() grpc.Message {
|
||||
var respBodygrpc *apemanager.AddChainResponse_Body
|
||||
|
||||
if respBody != nil {
|
||||
respBodygrpc = new(apemanager.AddChainResponse_Body)
|
||||
|
||||
respBodygrpc.SetChainId(respBody.GetChainID())
|
||||
}
|
||||
|
||||
return respBodygrpc
|
||||
}
|
||||
|
||||
func (respBody *AddChainResponseBody) FromGRPCMessage(m grpc.Message) error {
|
||||
respBodygrpc, ok := m.(*apemanager.AddChainResponse_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respBodygrpc)
|
||||
}
|
||||
|
||||
respBody.SetChainID(respBodygrpc.GetChainId())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (resp *AddChainResponse) ToGRPCMessage() grpc.Message {
|
||||
var respgrpc *apemanager.AddChainResponse
|
||||
|
||||
if resp != nil {
|
||||
respgrpc = new(apemanager.AddChainResponse)
|
||||
|
||||
respgrpc.SetBody(resp.body.ToGRPCMessage().(*apemanager.AddChainResponse_Body))
|
||||
resp.ResponseHeaders.ToMessage(respgrpc)
|
||||
}
|
||||
|
||||
return respgrpc
|
||||
}
|
||||
|
||||
func (resp *AddChainResponse) FromGRPCMessage(m grpc.Message) error {
|
||||
respgrpc, ok := m.(*apemanager.AddChainResponse)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respgrpc)
|
||||
}
|
||||
|
||||
if respBodygrpc := respgrpc.GetBody(); respBodygrpc != nil {
|
||||
resp.body = new(AddChainResponseBody)
|
||||
if err := resp.body.FromGRPCMessage(respBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return resp.ResponseHeaders.FromMessage(respgrpc)
|
||||
}
|
||||
|
||||
func (reqBody *RemoveChainRequestBody) ToGRPCMessage() grpc.Message {
|
||||
var reqBodygrpc *apemanager.RemoveChainRequest_Body
|
||||
|
||||
if reqBody != nil {
|
||||
reqBodygrpc = new(apemanager.RemoveChainRequest_Body)
|
||||
|
||||
reqBodygrpc.SetTarget(reqBody.target.ToGRPCMessage().(*apeGRPC.ChainTarget))
|
||||
reqBodygrpc.SetChainId(reqBody.GetChainID())
|
||||
}
|
||||
|
||||
return reqBodygrpc
|
||||
}
|
||||
|
||||
func (reqBody *RemoveChainRequestBody) FromGRPCMessage(m grpc.Message) error {
|
||||
reqBodygrpc, ok := m.(*apemanager.RemoveChainRequest_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqBodygrpc)
|
||||
}
|
||||
|
||||
if targetgrpc := reqBodygrpc.GetTarget(); targetgrpc != nil {
|
||||
reqBody.target = new(ape.ChainTarget)
|
||||
if err := reqBody.target.FromGRPCMessage(targetgrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
reqBody.SetChainID(reqBodygrpc.GetChainId())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (req *RemoveChainRequest) ToGRPCMessage() grpc.Message {
|
||||
var reqgrpc *apemanager.RemoveChainRequest
|
||||
|
||||
if req != nil {
|
||||
reqgrpc = new(apemanager.RemoveChainRequest)
|
||||
|
||||
reqgrpc.SetBody(req.body.ToGRPCMessage().(*apemanager.RemoveChainRequest_Body))
|
||||
req.RequestHeaders.ToMessage(reqgrpc)
|
||||
}
|
||||
|
||||
return reqgrpc
|
||||
}
|
||||
|
||||
func (req *RemoveChainRequest) FromGRPCMessage(m grpc.Message) error {
|
||||
reqgrpc, ok := m.(*apemanager.RemoveChainRequest)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqgrpc)
|
||||
}
|
||||
|
||||
if reqBodygrpc := reqgrpc.GetBody(); reqBodygrpc != nil {
|
||||
req.body = new(RemoveChainRequestBody)
|
||||
if err := req.body.FromGRPCMessage(reqBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return req.RequestHeaders.FromMessage(reqgrpc)
|
||||
}
|
||||
|
||||
func (respBody *RemoveChainResponseBody) ToGRPCMessage() grpc.Message {
|
||||
var respBodygrpc *apemanager.RemoveChainResponse_Body
|
||||
|
||||
if respBody != nil {
|
||||
respBodygrpc = new(apemanager.RemoveChainResponse_Body)
|
||||
}
|
||||
|
||||
return respBodygrpc
|
||||
}
|
||||
|
||||
func (respBody *RemoveChainResponseBody) FromGRPCMessage(m grpc.Message) error {
|
||||
respBodygrpc, ok := m.(*apemanager.RemoveChainResponse_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respBodygrpc)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (resp *RemoveChainResponse) ToGRPCMessage() grpc.Message {
|
||||
var respgrpc *apemanager.RemoveChainResponse
|
||||
|
||||
if resp != nil {
|
||||
respgrpc = new(apemanager.RemoveChainResponse)
|
||||
|
||||
respgrpc.SetBody(resp.body.ToGRPCMessage().(*apemanager.RemoveChainResponse_Body))
|
||||
resp.ResponseHeaders.ToMessage(respgrpc)
|
||||
}
|
||||
|
||||
return respgrpc
|
||||
}
|
||||
|
||||
func (resp *RemoveChainResponse) FromGRPCMessage(m grpc.Message) error {
|
||||
respgrpc, ok := m.(*apemanager.RemoveChainResponse)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respgrpc)
|
||||
}
|
||||
|
||||
if respBodygrpc := respgrpc.GetBody(); respBodygrpc != nil {
|
||||
resp.body = new(RemoveChainResponseBody)
|
||||
if err := resp.body.FromGRPCMessage(respBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return resp.ResponseHeaders.FromMessage(respgrpc)
|
||||
}
|
||||
|
||||
func (reqBody *ListChainsRequestBody) ToGRPCMessage() grpc.Message {
|
||||
var reqBodygrpc *apemanager.ListChainsRequest_Body
|
||||
|
||||
if reqBody != nil {
|
||||
reqBodygrpc = new(apemanager.ListChainsRequest_Body)
|
||||
|
||||
reqBodygrpc.SetTarget(reqBody.target.ToGRPCMessage().(*apeGRPC.ChainTarget))
|
||||
}
|
||||
|
||||
return reqBodygrpc
|
||||
}
|
||||
|
||||
func (reqBody *ListChainsRequestBody) FromGRPCMessage(m grpc.Message) error {
|
||||
reqBodygrpc, ok := m.(*apemanager.ListChainsRequest_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqBodygrpc)
|
||||
}
|
||||
|
||||
if targetgrpc := reqBodygrpc.GetTarget(); targetgrpc != nil {
|
||||
reqBody.target = new(ape.ChainTarget)
|
||||
if err := reqBody.target.FromGRPCMessage(targetgrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (req *ListChainsRequest) ToGRPCMessage() grpc.Message {
|
||||
var reqgrpc *apemanager.ListChainsRequest
|
||||
|
||||
if req != nil {
|
||||
reqgrpc = new(apemanager.ListChainsRequest)
|
||||
|
||||
reqgrpc.SetBody(req.body.ToGRPCMessage().(*apemanager.ListChainsRequest_Body))
|
||||
req.RequestHeaders.ToMessage(reqgrpc)
|
||||
}
|
||||
|
||||
return reqgrpc
|
||||
}
|
||||
|
||||
func (req *ListChainsRequest) FromGRPCMessage(m grpc.Message) error {
|
||||
reqgrpc, ok := m.(*apemanager.ListChainsRequest)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, reqgrpc)
|
||||
}
|
||||
|
||||
if reqBodygrpc := reqgrpc.GetBody(); reqBodygrpc != nil {
|
||||
req.body = new(ListChainsRequestBody)
|
||||
if err := req.body.FromGRPCMessage(reqBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return req.RequestHeaders.FromMessage(reqgrpc)
|
||||
}
|
||||
|
||||
func (respBody *ListChainsResponseBody) ToGRPCMessage() grpc.Message {
|
||||
var respBodygrpc *apemanager.ListChainsResponse_Body
|
||||
|
||||
if respBody != nil {
|
||||
respBodygrpc = new(apemanager.ListChainsResponse_Body)
|
||||
|
||||
chainsgrpc := make([]*apeGRPC.Chain, 0, len(respBody.GetChains()))
|
||||
for _, chain := range respBody.GetChains() {
|
||||
chainsgrpc = append(chainsgrpc, chain.ToGRPCMessage().(*apeGRPC.Chain))
|
||||
}
|
||||
|
||||
respBodygrpc.SetChains(chainsgrpc)
|
||||
}
|
||||
|
||||
return respBodygrpc
|
||||
}
|
||||
|
||||
func (respBody *ListChainsResponseBody) FromGRPCMessage(m grpc.Message) error {
|
||||
respBodygrpc, ok := m.(*apemanager.ListChainsResponse_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respBodygrpc)
|
||||
}
|
||||
|
||||
chains := make([]*ape.Chain, 0, len(respBodygrpc.GetChains()))
|
||||
|
||||
for _, chaingrpc := range respBodygrpc.GetChains() {
|
||||
chain := new(ape.Chain)
|
||||
if err := chain.FromGRPCMessage(chaingrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
chains = append(chains, chain)
|
||||
}
|
||||
|
||||
respBody.SetChains(chains)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (resp *ListChainsResponse) ToGRPCMessage() grpc.Message {
|
||||
var respgrpc *apemanager.ListChainsResponse
|
||||
|
||||
if resp != nil {
|
||||
respgrpc = new(apemanager.ListChainsResponse)
|
||||
|
||||
respgrpc.SetBody(resp.body.ToGRPCMessage().(*apemanager.ListChainsResponse_Body))
|
||||
resp.ResponseHeaders.ToMessage(respgrpc)
|
||||
}
|
||||
|
||||
return respgrpc
|
||||
}
|
||||
|
||||
func (resp *ListChainsResponse) FromGRPCMessage(m grpc.Message) error {
|
||||
respgrpc, ok := m.(*apemanager.ListChainsResponse)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, respgrpc)
|
||||
}
|
||||
|
||||
if respBodygrpc := respgrpc.GetBody(); respBodygrpc != nil {
|
||||
resp.body = new(ListChainsResponseBody)
|
||||
if err := resp.body.FromGRPCMessage(respBodygrpc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return resp.ResponseHeaders.FromMessage(respgrpc)
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
package apemanager
|
||||
|
||||
import (
|
||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
||||
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
||||
)
|
||||
|
||||
func (rb *AddChainRequest_Body) SetTarget(t *ape.ChainTarget) {
|
||||
rb.Target = t
|
||||
}
|
||||
|
||||
func (rb *AddChainRequest_Body) SetChain(chain *ape.Chain) {
|
||||
rb.Chain = chain
|
||||
}
|
||||
|
||||
func (r *AddChainRequest) SetBody(rb *AddChainRequest_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *AddChainRequest) SetMetaHeader(mh *session.RequestMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *AddChainRequest) SetVerifyHeader(vh *session.RequestVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
||||
|
||||
func (rb *AddChainResponse_Body) SetChainId(chainID []byte) {
|
||||
rb.ChainId = chainID
|
||||
}
|
||||
|
||||
func (r *AddChainResponse) SetBody(rb *AddChainResponse_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *AddChainResponse) SetMetaHeader(mh *session.ResponseMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *AddChainResponse) SetVerifyHeader(vh *session.ResponseVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequest_Body) SetTarget(t *ape.ChainTarget) {
|
||||
rb.Target = t
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequest_Body) SetChainId(chainID []byte) {
|
||||
rb.ChainId = chainID
|
||||
}
|
||||
|
||||
func (r *RemoveChainRequest) SetBody(rb *RemoveChainRequest_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *RemoveChainRequest) SetMetaHeader(mh *session.RequestMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *RemoveChainRequest) SetVerifyHeader(vh *session.RequestVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
||||
|
||||
func (r *RemoveChainResponse) SetBody(rb *RemoveChainResponse_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *RemoveChainResponse) SetMetaHeader(mh *session.ResponseMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *RemoveChainResponse) SetVerifyHeader(vh *session.ResponseVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest_Body) SetTarget(t *ape.ChainTarget) {
|
||||
r.Target = t
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest) SetBody(rb *ListChainsRequest_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest) SetMetaHeader(mh *session.RequestMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest) SetVerifyHeader(vh *session.RequestVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
||||
|
||||
func (rb *ListChainsResponse_Body) SetChains(chains []*ape.Chain) {
|
||||
rb.Chains = chains
|
||||
}
|
||||
|
||||
func (r *ListChainsResponse) SetBody(rb *ListChainsResponse_Body) {
|
||||
r.Body = rb
|
||||
}
|
||||
|
||||
func (r *ListChainsResponse) SetMetaHeader(mh *session.ResponseMetaHeader) {
|
||||
r.MetaHeader = mh
|
||||
}
|
||||
|
||||
func (r *ListChainsResponse) SetVerifyHeader(vh *session.ResponseVerificationHeader) {
|
||||
r.VerifyHeader = vh
|
||||
}
|
1129
apemanager/grpc/service.pb.go
generated
1129
apemanager/grpc/service.pb.go
generated
File diff suppressed because it is too large
Load diff
245
apemanager/grpc/service_grpc.pb.go
generated
245
apemanager/grpc/service_grpc.pb.go
generated
|
@ -1,245 +0,0 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// source: apemanager/grpc/service.proto
|
||||
|
||||
package apemanager
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
APEManagerService_AddChain_FullMethodName = "/frostfs.v2.apemanager.APEManagerService/AddChain"
|
||||
APEManagerService_RemoveChain_FullMethodName = "/frostfs.v2.apemanager.APEManagerService/RemoveChain"
|
||||
APEManagerService_ListChains_FullMethodName = "/frostfs.v2.apemanager.APEManagerService/ListChains"
|
||||
)
|
||||
|
||||
// APEManagerServiceClient is the client API for APEManagerService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type APEManagerServiceClient interface {
|
||||
// Add a rule chain for a specific target to `Policy` smart contract.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// the chain has been successfully added;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
AddChain(ctx context.Context, in *AddChainRequest, opts ...grpc.CallOption) (*AddChainResponse, error)
|
||||
// Remove a rule chain for a specific target from `Policy` smart contract.
|
||||
// RemoveChain is an idempotent operation: removal of non-existing rule chain
|
||||
// also means success.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// the chain has been successfully removed;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
RemoveChain(ctx context.Context, in *RemoveChainRequest, opts ...grpc.CallOption) (*RemoveChainResponse, error)
|
||||
// List chains defined for a specific target from `Policy` smart contract.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// chains have been successfully listed;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
ListChains(ctx context.Context, in *ListChainsRequest, opts ...grpc.CallOption) (*ListChainsResponse, error)
|
||||
}
|
||||
|
||||
type aPEManagerServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewAPEManagerServiceClient(cc grpc.ClientConnInterface) APEManagerServiceClient {
|
||||
return &aPEManagerServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *aPEManagerServiceClient) AddChain(ctx context.Context, in *AddChainRequest, opts ...grpc.CallOption) (*AddChainResponse, error) {
|
||||
out := new(AddChainResponse)
|
||||
err := c.cc.Invoke(ctx, APEManagerService_AddChain_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *aPEManagerServiceClient) RemoveChain(ctx context.Context, in *RemoveChainRequest, opts ...grpc.CallOption) (*RemoveChainResponse, error) {
|
||||
out := new(RemoveChainResponse)
|
||||
err := c.cc.Invoke(ctx, APEManagerService_RemoveChain_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *aPEManagerServiceClient) ListChains(ctx context.Context, in *ListChainsRequest, opts ...grpc.CallOption) (*ListChainsResponse, error) {
|
||||
out := new(ListChainsResponse)
|
||||
err := c.cc.Invoke(ctx, APEManagerService_ListChains_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// APEManagerServiceServer is the server API for APEManagerService service.
|
||||
// All implementations should embed UnimplementedAPEManagerServiceServer
|
||||
// for forward compatibility
|
||||
type APEManagerServiceServer interface {
|
||||
// Add a rule chain for a specific target to `Policy` smart contract.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// the chain has been successfully added;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
AddChain(context.Context, *AddChainRequest) (*AddChainResponse, error)
|
||||
// Remove a rule chain for a specific target from `Policy` smart contract.
|
||||
// RemoveChain is an idempotent operation: removal of non-existing rule chain
|
||||
// also means success.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// the chain has been successfully removed;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
RemoveChain(context.Context, *RemoveChainRequest) (*RemoveChainResponse, error)
|
||||
// List chains defined for a specific target from `Policy` smart contract.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// chains have been successfully listed;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container (as target) not found;
|
||||
// - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
|
||||
// the operation is denied by the service.
|
||||
ListChains(context.Context, *ListChainsRequest) (*ListChainsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAPEManagerServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedAPEManagerServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedAPEManagerServiceServer) AddChain(context.Context, *AddChainRequest) (*AddChainResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddChain not implemented")
|
||||
}
|
||||
func (UnimplementedAPEManagerServiceServer) RemoveChain(context.Context, *RemoveChainRequest) (*RemoveChainResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveChain not implemented")
|
||||
}
|
||||
func (UnimplementedAPEManagerServiceServer) ListChains(context.Context, *ListChainsRequest) (*ListChainsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListChains not implemented")
|
||||
}
|
||||
|
||||
// UnsafeAPEManagerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to APEManagerServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeAPEManagerServiceServer interface {
|
||||
mustEmbedUnimplementedAPEManagerServiceServer()
|
||||
}
|
||||
|
||||
func RegisterAPEManagerServiceServer(s grpc.ServiceRegistrar, srv APEManagerServiceServer) {
|
||||
s.RegisterService(&APEManagerService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _APEManagerService_AddChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddChainRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(APEManagerServiceServer).AddChain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: APEManagerService_AddChain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(APEManagerServiceServer).AddChain(ctx, req.(*AddChainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _APEManagerService_RemoveChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveChainRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(APEManagerServiceServer).RemoveChain(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: APEManagerService_RemoveChain_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(APEManagerServiceServer).RemoveChain(ctx, req.(*RemoveChainRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _APEManagerService_ListChains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListChainsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(APEManagerServiceServer).ListChains(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: APEManagerService_ListChains_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(APEManagerServiceServer).ListChains(ctx, req.(*ListChainsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// APEManagerService_ServiceDesc is the grpc.ServiceDesc for APEManagerService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var APEManagerService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "frostfs.v2.apemanager.APEManagerService",
|
||||
HandlerType: (*APEManagerServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AddChain",
|
||||
Handler: _APEManagerService_AddChain_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RemoveChain",
|
||||
Handler: _APEManagerService_RemoveChain_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListChains",
|
||||
Handler: _APEManagerService_ListChains_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "apemanager/grpc/service.proto",
|
||||
}
|
|
@ -1,205 +0,0 @@
|
|||
package apemanager
|
||||
|
||||
import (
|
||||
apemanager "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
addChainReqBodyTargetField = 1
|
||||
addChainReqBodyChainField = 2
|
||||
|
||||
addChainRespBodyChainIDField = 1
|
||||
|
||||
removeChainReqBodyTargetField = 1
|
||||
removeChainReqBodyChainField = 2
|
||||
|
||||
/*
|
||||
Fields for RemoveResponseBody are missed since RemoveResponseBody is empty.
|
||||
*/
|
||||
|
||||
listChainsReqBodyTargetField = 1
|
||||
|
||||
listChainsRespBodyChainsField = 1
|
||||
)
|
||||
|
||||
func (rb *AddChainRequestBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(addChainReqBodyTargetField, rb.target)
|
||||
size += proto.NestedStructureSize(addChainReqBodyChainField, rb.chain)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.NestedStructureMarshal(addChainReqBodyTargetField, buf[offset:], rb.target)
|
||||
proto.NestedStructureMarshal(addChainReqBodyChainField, buf[offset:], rb.chain)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.AddChainRequest_Body))
|
||||
}
|
||||
|
||||
func (rb *AddChainResponseBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.BytesSize(addChainRespBodyChainIDField, rb.chainID)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *AddChainResponseBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
proto.BytesMarshal(addChainRespBodyChainIDField, buf[offset:], rb.chainID)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *AddChainResponseBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.AddChainResponse_Body))
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(addChainReqBodyTargetField, rb.target)
|
||||
size += proto.BytesSize(addChainReqBodyChainField, rb.chainID)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.NestedStructureMarshal(removeChainReqBodyTargetField, buf[offset:], rb.target)
|
||||
proto.BytesMarshal(removeChainReqBodyChainField, buf[offset:], rb.chainID)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.RemoveChainRequest_Body))
|
||||
}
|
||||
|
||||
func (rb *RemoveChainResponseBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *RemoveChainResponseBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *RemoveChainResponseBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.RemoveChainResponse_Body))
|
||||
}
|
||||
|
||||
func (rb *ListChainsRequestBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(listChainsReqBodyTargetField, rb.target)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *ListChainsRequestBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
proto.NestedStructureMarshal(addChainReqBodyTargetField, buf[offset:], rb.target)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *ListChainsRequestBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.ListChainsRequest_Body))
|
||||
}
|
||||
|
||||
func (rb *ListChainsResponseBody) StableSize() (size int) {
|
||||
if rb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
for _, chain := range rb.GetChains() {
|
||||
size += proto.NestedStructureSize(listChainsRespBodyChainsField, chain)
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (rb *ListChainsResponseBody) StableMarshal(buf []byte) []byte {
|
||||
if rb == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, rb.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
for _, chain := range rb.GetChains() {
|
||||
offset += proto.NestedStructureMarshal(listChainsRespBodyChainsField, buf[offset:], chain)
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (rb *ListChainsResponseBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(rb, data, new(apemanager.ListChainsResponse_Body))
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package apemanager_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
apemanagertest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/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) {
|
||||
messagetest.TestRPCMessage(t,
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateAddChainRequestBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateAddChainRequest(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateAddChainResponseBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateAddChainResponse(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateRemoveChainRequestBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateRemoveChainRequest(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateRemoveChainResponseBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateRemoveChainResponse(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateListChainsRequestBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateListChainsRequest(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateListChainsResponseBody(empty) },
|
||||
func(empty bool) message.Message { return apemanagertest.GenerateListChainsResponse(empty) },
|
||||
)
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
package apemanager
|
||||
|
||||
import (
|
||||
"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 ape manager failure and:
|
||||
//
|
||||
// then localizes the code and returns true,
|
||||
// else leaves the code unchanged and returns false.
|
||||
//
|
||||
// Arg must be non-nil.
|
||||
func LocalizeFailStatus(c *status.Code) bool {
|
||||
return status.LocalizeIfInSection(c, uint32(statusgrpc.Section_SECTION_APE_MANAGER))
|
||||
}
|
||||
|
||||
// GlobalizeFail globalizes local code of ape manager failure.
|
||||
//
|
||||
// Arg must be non-nil.
|
||||
func GlobalizeFail(c *status.Code) {
|
||||
c.GlobalizeSection(uint32(statusgrpc.Section_SECTION_APE_MANAGER))
|
||||
}
|
||||
|
||||
const (
|
||||
// StatusAPEManagerAccessDenied is a local status.Code value for
|
||||
// ACCESS_DENIED ape manager failure.
|
||||
StatusAPEManagerAccessDenied status.Code = iota
|
||||
)
|
||||
|
||||
const (
|
||||
// detailAccessDeniedDesc is a StatusAccessDenied detail ID for
|
||||
// human-readable description.
|
||||
detailAccessDeniedDesc = iota
|
||||
)
|
||||
|
||||
// WriteAccessDeniedDesc writes human-readable description of StatusAccessDenied
|
||||
// into status.Status as a detail. The status must not be nil.
|
||||
//
|
||||
// Existing details are expected to be ID-unique, otherwise undefined behavior.
|
||||
func WriteAccessDeniedDesc(st *status.Status, desc string) {
|
||||
var found bool
|
||||
|
||||
st.IterateDetails(func(d *status.Detail) bool {
|
||||
if d.ID() == detailAccessDeniedDesc {
|
||||
found = true
|
||||
d.SetValue([]byte(desc))
|
||||
}
|
||||
|
||||
return found
|
||||
})
|
||||
|
||||
if !found {
|
||||
var d status.Detail
|
||||
|
||||
d.SetID(detailAccessDeniedDesc)
|
||||
d.SetValue([]byte(desc))
|
||||
|
||||
st.AppendDetails(d)
|
||||
}
|
||||
}
|
||||
|
||||
// ReadAccessDeniedDesc looks up for status detail with human-readable description
|
||||
// of StatusAccessDenied. Returns empty string if detail is missing.
|
||||
func ReadAccessDeniedDesc(st status.Status) (desc string) {
|
||||
st.IterateDetails(func(d *status.Detail) bool {
|
||||
if d.ID() == detailAccessDeniedDesc {
|
||||
desc = string(d.Value())
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
return
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
package apemanager_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager"
|
||||
"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"
|
||||
)
|
||||
|
||||
func TestStatusCodes(t *testing.T) {
|
||||
statustest.TestCodes(t, apemanager.LocalizeFailStatus, apemanager.GlobalizeFail,
|
||||
apemanager.StatusAPEManagerAccessDenied, 5120,
|
||||
)
|
||||
}
|
||||
|
||||
func TestAccessDeniedDesc(t *testing.T) {
|
||||
var st status.Status
|
||||
|
||||
require.Empty(t, apemanager.ReadAccessDeniedDesc(st))
|
||||
|
||||
const desc = "some description"
|
||||
|
||||
apemanager.WriteAccessDeniedDesc(&st, desc)
|
||||
require.Equal(t, desc, apemanager.ReadAccessDeniedDesc(st))
|
||||
|
||||
apemanager.WriteAccessDeniedDesc(&st, desc+"1")
|
||||
require.Equal(t, desc+"1", apemanager.ReadAccessDeniedDesc(st))
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
package apemanagertest
|
||||
|
||||
import (
|
||||
apetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/test"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager"
|
||||
sessiontest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/test"
|
||||
)
|
||||
|
||||
func generateChainID(empty bool) []byte {
|
||||
if empty {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
return []byte("616c6c6f774f626a476574436e72")
|
||||
}
|
||||
|
||||
func GenerateAddChainRequestBody(empty bool) *apemanager.AddChainRequestBody {
|
||||
m := new(apemanager.AddChainRequestBody)
|
||||
|
||||
if !empty {
|
||||
m.SetTarget(apetest.GenerateChainTarget(empty))
|
||||
m.SetChain(apetest.GenerateRawChain(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateAddChainRequest(empty bool) *apemanager.AddChainRequest {
|
||||
m := new(apemanager.AddChainRequest)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateAddChainRequestBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateAddChainResponseBody(empty bool) *apemanager.AddChainResponseBody {
|
||||
m := new(apemanager.AddChainResponseBody)
|
||||
|
||||
if !empty {
|
||||
m.SetChainID(generateChainID(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateAddChainResponse(empty bool) *apemanager.AddChainResponse {
|
||||
m := new(apemanager.AddChainResponse)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateAddChainResponseBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateRemoveChainRequestBody(empty bool) *apemanager.RemoveChainRequestBody {
|
||||
m := new(apemanager.RemoveChainRequestBody)
|
||||
|
||||
if !empty {
|
||||
m.SetChainID(generateChainID(empty))
|
||||
m.SetTarget(apetest.GenerateChainTarget(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateRemoveChainRequest(empty bool) *apemanager.RemoveChainRequest {
|
||||
m := new(apemanager.RemoveChainRequest)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateRemoveChainRequestBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateRemoveChainResponseBody(_ bool) *apemanager.RemoveChainResponseBody {
|
||||
return new(apemanager.RemoveChainResponseBody)
|
||||
}
|
||||
|
||||
func GenerateRemoveChainResponse(empty bool) *apemanager.RemoveChainResponse {
|
||||
m := new(apemanager.RemoveChainResponse)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateRemoveChainResponseBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateListChainsRequestBody(empty bool) *apemanager.ListChainsRequestBody {
|
||||
m := new(apemanager.ListChainsRequestBody)
|
||||
|
||||
if !empty {
|
||||
m.SetTarget(apetest.GenerateChainTarget(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateListChainsRequest(empty bool) *apemanager.ListChainsRequest {
|
||||
m := new(apemanager.ListChainsRequest)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateListChainsRequestBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateListChainsResponseBody(empty bool) *apemanager.ListChainsResponseBody {
|
||||
m := new(apemanager.ListChainsResponseBody)
|
||||
|
||||
if !empty {
|
||||
m.SetChains(apetest.GenerateRawChains(empty, 10))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateListChainsResponse(empty bool) *apemanager.ListChainsResponse {
|
||||
m := new(apemanager.ListChainsResponse)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GenerateListChainsResponseBody(empty))
|
||||
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
|
@ -1,175 +0,0 @@
|
|||
package apemanager
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
)
|
||||
|
||||
type AddChainRequest struct {
|
||||
body *AddChainRequestBody
|
||||
|
||||
session.RequestHeaders
|
||||
}
|
||||
|
||||
func (r *AddChainRequest) SetBody(body *AddChainRequestBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *AddChainRequest) GetBody() *AddChainRequestBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type AddChainRequestBody struct {
|
||||
target *ape.ChainTarget
|
||||
|
||||
chain *ape.Chain
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) SetTarget(target *ape.ChainTarget) {
|
||||
rb.target = target
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) GetTarget() *ape.ChainTarget {
|
||||
return rb.target
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) SetChain(chain *ape.Chain) {
|
||||
rb.chain = chain
|
||||
}
|
||||
|
||||
func (rb *AddChainRequestBody) GetChain() *ape.Chain {
|
||||
return rb.chain
|
||||
}
|
||||
|
||||
type AddChainResponse struct {
|
||||
body *AddChainResponseBody
|
||||
|
||||
session.ResponseHeaders
|
||||
}
|
||||
|
||||
func (r *AddChainResponse) SetBody(body *AddChainResponseBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *AddChainResponse) GetBody() *AddChainResponseBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type AddChainResponseBody struct {
|
||||
chainID []byte
|
||||
}
|
||||
|
||||
func (rb *AddChainResponseBody) SetChainID(chainID []byte) {
|
||||
rb.chainID = chainID
|
||||
}
|
||||
|
||||
func (rb *AddChainResponseBody) GetChainID() []byte {
|
||||
return rb.chainID
|
||||
}
|
||||
|
||||
type RemoveChainRequest struct {
|
||||
body *RemoveChainRequestBody
|
||||
|
||||
session.RequestHeaders
|
||||
}
|
||||
|
||||
func (r *RemoveChainRequest) SetBody(body *RemoveChainRequestBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *RemoveChainRequest) GetBody() *RemoveChainRequestBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type RemoveChainRequestBody struct {
|
||||
target *ape.ChainTarget
|
||||
|
||||
chainID []byte
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) SetTarget(target *ape.ChainTarget) {
|
||||
rb.target = target
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) GetTarget() *ape.ChainTarget {
|
||||
return rb.target
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) SetChainID(chainID []byte) {
|
||||
rb.chainID = chainID
|
||||
}
|
||||
|
||||
func (rb *RemoveChainRequestBody) GetChainID() []byte {
|
||||
return rb.chainID
|
||||
}
|
||||
|
||||
type RemoveChainResponse struct {
|
||||
body *RemoveChainResponseBody
|
||||
|
||||
session.ResponseHeaders
|
||||
}
|
||||
|
||||
type RemoveChainResponseBody struct {
|
||||
}
|
||||
|
||||
func (r *RemoveChainResponse) SetBody(body *RemoveChainResponseBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *RemoveChainResponse) GetBody() *RemoveChainResponseBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type ListChainsRequest struct {
|
||||
body *ListChainsRequestBody
|
||||
|
||||
session.RequestHeaders
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest) SetBody(body *ListChainsRequestBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *ListChainsRequest) GetBody() *ListChainsRequestBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type ListChainsRequestBody struct {
|
||||
target *ape.ChainTarget
|
||||
}
|
||||
|
||||
func (rb *ListChainsRequestBody) SetTarget(target *ape.ChainTarget) {
|
||||
rb.target = target
|
||||
}
|
||||
|
||||
func (rb *ListChainsRequestBody) GetTarget() *ape.ChainTarget {
|
||||
return rb.target
|
||||
}
|
||||
|
||||
type ListChainsResponse struct {
|
||||
body *ListChainsResponseBody
|
||||
|
||||
session.ResponseHeaders
|
||||
}
|
||||
|
||||
func (r *ListChainsResponse) SetBody(body *ListChainsResponseBody) {
|
||||
r.body = body
|
||||
}
|
||||
|
||||
func (r *ListChainsResponse) GetBody() *ListChainsResponseBody {
|
||||
return r.body
|
||||
}
|
||||
|
||||
type ListChainsResponseBody struct {
|
||||
chains []*ape.Chain
|
||||
|
||||
session.RequestHeaders
|
||||
}
|
||||
|
||||
func (r *ListChainsResponseBody) SetChains(chains []*ape.Chain) {
|
||||
r.chains = chains
|
||||
}
|
||||
|
||||
func (r *ListChainsResponseBody) GetChains() []*ape.Chain {
|
||||
return r.chains
|
||||
}
|
94
audit/convert.go
Normal file
94
audit/convert.go
Normal file
|
@ -0,0 +1,94 @@
|
|||
package audit
|
||||
|
||||
import (
|
||||
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 {
|
||||
var m *audit.DataAuditResult
|
||||
|
||||
if a != nil {
|
||||
m = new(audit.DataAuditResult)
|
||||
|
||||
m.SetAuditEpoch(a.auditEpoch)
|
||||
m.SetPublicKey(a.pubKey)
|
||||
m.SetContainerId(a.cid.ToGRPCMessage().(*refsGRPC.ContainerID))
|
||||
m.SetComplete(a.complete)
|
||||
m.SetVersion(a.version.ToGRPCMessage().(*refsGRPC.Version))
|
||||
m.SetPassNodes(a.passNodes)
|
||||
m.SetFailNodes(a.failNodes)
|
||||
m.SetRetries(a.retries)
|
||||
m.SetRequests(a.requests)
|
||||
m.SetHit(a.hit)
|
||||
m.SetMiss(a.miss)
|
||||
m.SetFail(a.fail)
|
||||
m.SetPassSg(refs.ObjectIDListToGRPCMessage(a.passSG))
|
||||
m.SetFailSg(refs.ObjectIDListToGRPCMessage(a.failSG))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (a *DataAuditResult) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*audit.DataAuditResult)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
cid := v.GetContainerId()
|
||||
if cid == nil {
|
||||
a.cid = nil
|
||||
} else {
|
||||
if a.cid == nil {
|
||||
a.cid = new(refs.ContainerID)
|
||||
}
|
||||
|
||||
err = a.cid.FromGRPCMessage(cid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
version := v.GetVersion()
|
||||
if version == nil {
|
||||
a.version = nil
|
||||
} else {
|
||||
if a.version == nil {
|
||||
a.version = new(refs.Version)
|
||||
}
|
||||
|
||||
err = a.version.FromGRPCMessage(version)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
a.passSG, err = refs.ObjectIDListFromGRPCMessage(v.GetPassSg())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.failSG, err = refs.ObjectIDListFromGRPCMessage(v.GetFailSg())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.auditEpoch = v.GetAuditEpoch()
|
||||
a.pubKey = v.GetPublicKey()
|
||||
a.complete = v.GetComplete()
|
||||
a.passNodes = v.GetPassNodes()
|
||||
a.failNodes = v.GetFailNodes()
|
||||
a.retries = v.GetRetries()
|
||||
a.requests = v.GetRequests()
|
||||
a.hit = v.GetHit()
|
||||
a.miss = v.GetMiss()
|
||||
a.fail = v.GetFail()
|
||||
|
||||
return err
|
||||
}
|
75
audit/grpc/types.go
Normal file
75
audit/grpc/types.go
Normal file
|
@ -0,0 +1,75 @@
|
|||
package audit
|
||||
|
||||
import (
|
||||
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||
)
|
||||
|
||||
// SetVersion is a Version field setter.
|
||||
func (x *DataAuditResult) SetVersion(v *refs.Version) {
|
||||
x.Version = v
|
||||
}
|
||||
|
||||
// SetAuditEpoch is an AuditEpoch field setter.
|
||||
func (x *DataAuditResult) SetAuditEpoch(v uint64) {
|
||||
x.AuditEpoch = v
|
||||
}
|
||||
|
||||
// SetContainerId is a ContainerId field setter.
|
||||
func (x *DataAuditResult) SetContainerId(v *refs.ContainerID) {
|
||||
x.ContainerId = v
|
||||
}
|
||||
|
||||
// SetPublicKey is a PublicKey field setter.
|
||||
func (x *DataAuditResult) SetPublicKey(v []byte) {
|
||||
x.PublicKey = v
|
||||
}
|
||||
|
||||
// SetComplete is a Complete field setter.
|
||||
func (x *DataAuditResult) SetComplete(v bool) {
|
||||
x.Complete = v
|
||||
}
|
||||
|
||||
// SetRequests is a Requests field setter.
|
||||
func (x *DataAuditResult) SetRequests(v uint32) {
|
||||
x.Requests = v
|
||||
}
|
||||
|
||||
// SetRetries is a Retries field setter.
|
||||
func (x *DataAuditResult) SetRetries(v uint32) {
|
||||
x.Retries = v
|
||||
}
|
||||
|
||||
// SetPassSg is a PassSg field setter.
|
||||
func (x *DataAuditResult) SetPassSg(v []*refs.ObjectID) {
|
||||
x.PassSg = v
|
||||
}
|
||||
|
||||
// SetFailSg is a FailSg field setter.
|
||||
func (x *DataAuditResult) SetFailSg(v []*refs.ObjectID) {
|
||||
x.FailSg = v
|
||||
}
|
||||
|
||||
// SetHit is a Hit field setter.
|
||||
func (x *DataAuditResult) SetHit(v uint32) {
|
||||
x.Hit = v
|
||||
}
|
||||
|
||||
// SetMiss is a Miss field setter.
|
||||
func (x *DataAuditResult) SetMiss(v uint32) {
|
||||
x.Miss = v
|
||||
}
|
||||
|
||||
// SetFail is a Fail field setter.
|
||||
func (x *DataAuditResult) SetFail(v uint32) {
|
||||
x.Fail = v
|
||||
}
|
||||
|
||||
// SetPassNodes is a PassNodes field setter.
|
||||
func (x *DataAuditResult) SetPassNodes(v [][]byte) {
|
||||
x.PassNodes = v
|
||||
}
|
||||
|
||||
// SetFailNodes is a FailNodes field setter.
|
||||
func (x *DataAuditResult) SetFailNodes(v [][]byte) {
|
||||
x.FailNodes = v
|
||||
}
|
311
audit/grpc/types.pb.go
generated
Normal file
311
audit/grpc/types.pb.go
generated
Normal file
|
@ -0,0 +1,311 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: audit/grpc/types.proto
|
||||
|
||||
package audit
|
||||
|
||||
import (
|
||||
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// DataAuditResult keeps record of conducted Data Audits. The detailed report is
|
||||
// generated separately.
|
||||
type DataAuditResult struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Data Audit Result format version. Effectively, the version of API library
|
||||
// used to report DataAuditResult structure.
|
||||
Version *grpc.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
// Epoch number when the Data Audit was conducted
|
||||
AuditEpoch uint64 `protobuf:"fixed64,2,opt,name=audit_epoch,json=auditEpoch,proto3" json:"audit_epoch,omitempty"`
|
||||
// Container under audit
|
||||
ContainerId *grpc.ContainerID `protobuf:"bytes,3,opt,name=container_id,json=containerID,proto3" json:"container_id,omitempty"`
|
||||
// Public key of the auditing InnerRing node in a binary format
|
||||
PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||
// Shows if Data Audit process was complete in time or if it was cancelled
|
||||
Complete bool `protobuf:"varint,5,opt,name=complete,proto3" json:"complete,omitempty"`
|
||||
// Number of request done at PoR stage
|
||||
Requests uint32 `protobuf:"varint,6,opt,name=requests,proto3" json:"requests,omitempty"`
|
||||
// Number of retries done at PoR stage
|
||||
Retries uint32 `protobuf:"varint,7,opt,name=retries,proto3" json:"retries,omitempty"`
|
||||
// List of Storage Groups that passed audit PoR stage
|
||||
PassSg []*grpc.ObjectID `protobuf:"bytes,8,rep,name=pass_sg,json=passSG,proto3" json:"pass_sg,omitempty"`
|
||||
// List of Storage Groups that failed audit PoR stage
|
||||
FailSg []*grpc.ObjectID `protobuf:"bytes,9,rep,name=fail_sg,json=failSG,proto3" json:"fail_sg,omitempty"`
|
||||
// Number of sampled objects under the audit placed in an optimal way according to
|
||||
// the containers placement policy when checking PoP
|
||||
Hit uint32 `protobuf:"varint,10,opt,name=hit,proto3" json:"hit,omitempty"`
|
||||
// Number of sampled objects under the audit placed in suboptimal way according to
|
||||
// the containers placement policy, but still at a satisfactory level when
|
||||
// checking PoP
|
||||
Miss uint32 `protobuf:"varint,11,opt,name=miss,proto3" json:"miss,omitempty"`
|
||||
// Number of sampled objects under the audit stored inconsistently with the
|
||||
// placement policy or not found at all when checking PoP
|
||||
Fail uint32 `protobuf:"varint,12,opt,name=fail,proto3" json:"fail,omitempty"`
|
||||
// List of storage node public keys that passed at least one PDP
|
||||
PassNodes [][]byte `protobuf:"bytes,13,rep,name=pass_nodes,json=passNodes,proto3" json:"pass_nodes,omitempty"`
|
||||
// List of storage node public keys that failed at least one PDP
|
||||
FailNodes [][]byte `protobuf:"bytes,14,rep,name=fail_nodes,json=failNodes,proto3" json:"fail_nodes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) Reset() {
|
||||
*x = DataAuditResult{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_grpc_types_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DataAuditResult) ProtoMessage() {}
|
||||
|
||||
func (x *DataAuditResult) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_grpc_types_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DataAuditResult.ProtoReflect.Descriptor instead.
|
||||
func (*DataAuditResult) Descriptor() ([]byte, []int) {
|
||||
return file_audit_grpc_types_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetVersion() *grpc.Version {
|
||||
if x != nil {
|
||||
return x.Version
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetAuditEpoch() uint64 {
|
||||
if x != nil {
|
||||
return x.AuditEpoch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetContainerId() *grpc.ContainerID {
|
||||
if x != nil {
|
||||
return x.ContainerId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetPublicKey() []byte {
|
||||
if x != nil {
|
||||
return x.PublicKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetComplete() bool {
|
||||
if x != nil {
|
||||
return x.Complete
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetRequests() uint32 {
|
||||
if x != nil {
|
||||
return x.Requests
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetRetries() uint32 {
|
||||
if x != nil {
|
||||
return x.Retries
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetPassSg() []*grpc.ObjectID {
|
||||
if x != nil {
|
||||
return x.PassSg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetFailSg() []*grpc.ObjectID {
|
||||
if x != nil {
|
||||
return x.FailSg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetHit() uint32 {
|
||||
if x != nil {
|
||||
return x.Hit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetMiss() uint32 {
|
||||
if x != nil {
|
||||
return x.Miss
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetFail() uint32 {
|
||||
if x != nil {
|
||||
return x.Fail
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetPassNodes() [][]byte {
|
||||
if x != nil {
|
||||
return x.PassNodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DataAuditResult) GetFailNodes() [][]byte {
|
||||
if x != nil {
|
||||
return x.FailNodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_audit_grpc_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_audit_grpc_types_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70,
|
||||
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x1a, 0x15, 0x72, 0x65, 0x66, 0x73, 0x2f,
|
||||
0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0xf4, 0x03, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65,
|
||||
0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x0a, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c,
|
||||
0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75,
|
||||
0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, 0x73,
|
||||
0x73, 0x5f, 0x73, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x49, 0x44, 0x52, 0x06, 0x70, 0x61, 0x73, 0x73, 0x53, 0x47, 0x12, 0x31, 0x0a, 0x07,
|
||||
0x66, 0x61, 0x69, 0x6c, 0x5f, 0x73, 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x53, 0x47, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x68, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x68, 0x69,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x69, 0x73, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x04, 0x6d, 0x69, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x61, 0x69, 0x6c, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x52, 0x04, 0x66, 0x61, 0x69, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x73,
|
||||
0x73, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x70,
|
||||
0x61, 0x73, 0x73, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c,
|
||||
0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x66, 0x61,
|
||||
0x69, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x42, 0x5e, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x2e, 0x66,
|
||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65,
|
||||
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
|
||||
0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0xaa, 0x02, 0x19, 0x4e, 0x65,
|
||||
0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50,
|
||||
0x49, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_audit_grpc_types_proto_rawDescOnce sync.Once
|
||||
file_audit_grpc_types_proto_rawDescData = file_audit_grpc_types_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_audit_grpc_types_proto_rawDescGZIP() []byte {
|
||||
file_audit_grpc_types_proto_rawDescOnce.Do(func() {
|
||||
file_audit_grpc_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_audit_grpc_types_proto_rawDescData)
|
||||
})
|
||||
return file_audit_grpc_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_audit_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_audit_grpc_types_proto_goTypes = []interface{}{
|
||||
(*DataAuditResult)(nil), // 0: neo.fs.v2.audit.DataAuditResult
|
||||
(*grpc.Version)(nil), // 1: neo.fs.v2.refs.Version
|
||||
(*grpc.ContainerID)(nil), // 2: neo.fs.v2.refs.ContainerID
|
||||
(*grpc.ObjectID)(nil), // 3: neo.fs.v2.refs.ObjectID
|
||||
}
|
||||
var file_audit_grpc_types_proto_depIdxs = []int32{
|
||||
1, // 0: neo.fs.v2.audit.DataAuditResult.version:type_name -> neo.fs.v2.refs.Version
|
||||
2, // 1: neo.fs.v2.audit.DataAuditResult.container_id:type_name -> neo.fs.v2.refs.ContainerID
|
||||
3, // 2: neo.fs.v2.audit.DataAuditResult.pass_sg:type_name -> neo.fs.v2.refs.ObjectID
|
||||
3, // 3: neo.fs.v2.audit.DataAuditResult.fail_sg:type_name -> neo.fs.v2.refs.ObjectID
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_audit_grpc_types_proto_init() }
|
||||
func file_audit_grpc_types_proto_init() {
|
||||
if File_audit_grpc_types_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_audit_grpc_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DataAuditResult); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_audit_grpc_types_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_audit_grpc_types_proto_goTypes,
|
||||
DependencyIndexes: file_audit_grpc_types_proto_depIdxs,
|
||||
MessageInfos: file_audit_grpc_types_proto_msgTypes,
|
||||
}.Build()
|
||||
File_audit_grpc_types_proto = out.File
|
||||
file_audit_grpc_types_proto_rawDesc = nil
|
||||
file_audit_grpc_types_proto_goTypes = nil
|
||||
file_audit_grpc_types_proto_depIdxs = nil
|
||||
}
|
14
audit/json.go
Normal file
14
audit/json.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package audit
|
||||
|
||||
import (
|
||||
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) {
|
||||
return message.MarshalJSON(a)
|
||||
}
|
||||
|
||||
func (a *DataAuditResult) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(a, data, new(audit.DataAuditResult))
|
||||
}
|
88
audit/marshal.go
Normal file
88
audit/marshal.go
Normal file
|
@ -0,0 +1,88 @@
|
|||
package audit
|
||||
|
||||
import (
|
||||
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 (
|
||||
_ = iota
|
||||
versionFNum
|
||||
auditEpochFNum
|
||||
cidFNum
|
||||
pubKeyFNum
|
||||
completeFNum
|
||||
requestsFNum
|
||||
retriesFNum
|
||||
passSGFNum
|
||||
failSGFNum
|
||||
hitFNum
|
||||
missFNum
|
||||
failFNum
|
||||
passNodesFNum
|
||||
failNodesFNum
|
||||
)
|
||||
|
||||
// StableMarshal marshals unified DataAuditResult structure into a protobuf
|
||||
// binary format without field order shuffle.
|
||||
func (a *DataAuditResult) StableMarshal(buf []byte) []byte {
|
||||
if a == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, a.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.NestedStructureMarshal(versionFNum, buf[offset:], a.version)
|
||||
offset += proto.Fixed64Marshal(auditEpochFNum, buf[offset:], a.auditEpoch)
|
||||
offset += proto.NestedStructureMarshal(cidFNum, buf[offset:], a.cid)
|
||||
offset += proto.BytesMarshal(pubKeyFNum, buf[offset:], a.pubKey)
|
||||
offset += proto.BoolMarshal(completeFNum, buf[offset:], a.complete)
|
||||
offset += proto.UInt32Marshal(requestsFNum, buf[offset:], a.requests)
|
||||
offset += proto.UInt32Marshal(retriesFNum, buf[offset:], a.retries)
|
||||
offset += refs.ObjectIDNestedListMarshal(passSGFNum, buf[offset:], a.passSG)
|
||||
offset += refs.ObjectIDNestedListMarshal(failSGFNum, buf[offset:], a.failSG)
|
||||
offset += proto.UInt32Marshal(hitFNum, buf[offset:], a.hit)
|
||||
offset += proto.UInt32Marshal(missFNum, buf[offset:], a.miss)
|
||||
offset += proto.UInt32Marshal(failFNum, buf[offset:], a.fail)
|
||||
offset += proto.RepeatedBytesMarshal(passNodesFNum, buf[offset:], a.passNodes)
|
||||
proto.RepeatedBytesMarshal(failNodesFNum, buf[offset:], a.failNodes)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
// StableSize returns byte length of DataAuditResult structure
|
||||
// marshaled by StableMarshal function.
|
||||
func (a *DataAuditResult) StableSize() (size int) {
|
||||
if a == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(versionFNum, a.version)
|
||||
size += proto.Fixed64Size(auditEpochFNum, a.auditEpoch)
|
||||
size += proto.NestedStructureSize(cidFNum, a.cid)
|
||||
size += proto.BytesSize(pubKeyFNum, a.pubKey)
|
||||
size += proto.BoolSize(completeFNum, a.complete)
|
||||
size += proto.UInt32Size(requestsFNum, a.requests)
|
||||
size += proto.UInt32Size(retriesFNum, a.retries)
|
||||
size += refs.ObjectIDNestedListSize(passSGFNum, a.passSG)
|
||||
size += refs.ObjectIDNestedListSize(failSGFNum, a.failSG)
|
||||
size += proto.UInt32Size(hitFNum, a.hit)
|
||||
size += proto.UInt32Size(missFNum, a.miss)
|
||||
size += proto.UInt32Size(failFNum, a.fail)
|
||||
size += proto.RepeatedBytesSize(passNodesFNum, a.passNodes)
|
||||
size += proto.RepeatedBytesSize(failNodesFNum, a.failNodes)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
// Unmarshal unmarshals DataAuditResult structure from its protobuf
|
||||
// binary representation.
|
||||
func (a *DataAuditResult) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(a, data, new(audit.DataAuditResult))
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
package ape_test
|
||||
package audit_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
apetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/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) {
|
||||
messagetest.TestRPCMessage(t,
|
||||
func(empty bool) message.Message { return apetest.GenerateChainTarget(empty) },
|
||||
func(empty bool) message.Message { return audittest.GenerateDataAuditResult(empty) },
|
||||
)
|
||||
}
|
29
audit/test/generate.go
Normal file
29
audit/test/generate.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package audittest
|
||||
|
||||
import (
|
||||
"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 {
|
||||
m := new(audit.DataAuditResult)
|
||||
|
||||
if !empty {
|
||||
m.SetPublicKey([]byte{1, 2, 3})
|
||||
m.SetAuditEpoch(13)
|
||||
m.SetHit(100)
|
||||
m.SetMiss(200)
|
||||
m.SetFail(300)
|
||||
m.SetComplete(true)
|
||||
m.SetPassNodes([][]byte{{1}, {2}})
|
||||
m.SetFailNodes([][]byte{{3}, {4}})
|
||||
m.SetRequests(666)
|
||||
m.SetRetries(777)
|
||||
m.SetVersion(refstest.GenerateVersion(false))
|
||||
m.SetContainerID(refstest.GenerateContainerID(false))
|
||||
m.SetPassSG(refstest.GenerateObjectIDs(false))
|
||||
m.SetFailSG(refstest.GenerateObjectIDs(false))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
243
audit/types.go
Normal file
243
audit/types.go
Normal file
|
@ -0,0 +1,243 @@
|
|||
package audit
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
)
|
||||
|
||||
// DataAuditResult is a unified structure of
|
||||
// DataAuditResult message from proto definition.
|
||||
type DataAuditResult struct {
|
||||
version *refs.Version
|
||||
|
||||
auditEpoch uint64
|
||||
|
||||
requests, retries uint32
|
||||
|
||||
hit, miss, fail uint32
|
||||
|
||||
cid *refs.ContainerID
|
||||
|
||||
pubKey []byte
|
||||
|
||||
passSG, failSG []refs.ObjectID
|
||||
|
||||
failNodes, passNodes [][]byte
|
||||
|
||||
complete bool
|
||||
}
|
||||
|
||||
// GetVersion returns version of Data Audit structure.
|
||||
func (a *DataAuditResult) GetVersion() *refs.Version {
|
||||
if a != nil {
|
||||
return a.version
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetVersion sets version of Data Audit structure.
|
||||
func (a *DataAuditResult) SetVersion(v *refs.Version) {
|
||||
a.version = v
|
||||
}
|
||||
|
||||
// GetAuditEpoch returns epoch number when the Data Audit was conducted.
|
||||
func (a *DataAuditResult) GetAuditEpoch() uint64 {
|
||||
if a != nil {
|
||||
return a.auditEpoch
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetAuditEpoch sets epoch number when the Data Audit was conducted.
|
||||
func (a *DataAuditResult) SetAuditEpoch(v uint64) {
|
||||
a.auditEpoch = v
|
||||
}
|
||||
|
||||
// GetContainerID returns container under audit.
|
||||
func (a *DataAuditResult) GetContainerID() *refs.ContainerID {
|
||||
if a != nil {
|
||||
return a.cid
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetContainerID sets container under audit.
|
||||
func (a *DataAuditResult) SetContainerID(v *refs.ContainerID) {
|
||||
a.cid = v
|
||||
}
|
||||
|
||||
// GetPublicKey returns public key of the auditing InnerRing node in a binary format.
|
||||
func (a *DataAuditResult) GetPublicKey() []byte {
|
||||
if a != nil {
|
||||
return a.pubKey
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetPublicKey sets public key of the auditing InnerRing node in a binary format.
|
||||
func (a *DataAuditResult) SetPublicKey(v []byte) {
|
||||
a.pubKey = v
|
||||
}
|
||||
|
||||
// GetPassSG returns list of Storage Groups that passed audit PoR stage.
|
||||
func (a *DataAuditResult) GetPassSG() []refs.ObjectID {
|
||||
if a != nil {
|
||||
return a.passSG
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetPassSG sets list of Storage Groups that passed audit PoR stage.
|
||||
func (a *DataAuditResult) SetPassSG(v []refs.ObjectID) {
|
||||
a.passSG = v
|
||||
}
|
||||
|
||||
// GetFailSG returns list of Storage Groups that failed audit PoR stage.
|
||||
func (a *DataAuditResult) GetFailSG() []refs.ObjectID {
|
||||
if a != nil {
|
||||
return a.failSG
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetFailSG sets list of Storage Groups that failed audit PoR stage.
|
||||
func (a *DataAuditResult) SetFailSG(v []refs.ObjectID) {
|
||||
a.failSG = v
|
||||
}
|
||||
|
||||
// GetRequests returns number of requests made by PoR audit check to get
|
||||
// all headers of the objects inside storage groups.
|
||||
func (a *DataAuditResult) GetRequests() uint32 {
|
||||
if a != nil {
|
||||
return a.requests
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetRequests sets number of requests made by PoR audit check to get
|
||||
// all headers of the objects inside storage groups.
|
||||
func (a *DataAuditResult) SetRequests(v uint32) {
|
||||
a.requests = v
|
||||
}
|
||||
|
||||
// GetRetries returns number of retries made by PoR audit check to get
|
||||
// all headers of the objects inside storage groups.
|
||||
func (a *DataAuditResult) GetRetries() uint32 {
|
||||
if a != nil {
|
||||
return a.retries
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetRetries sets number of retries made by PoR audit check to get
|
||||
// all headers of the objects inside storage groups.
|
||||
func (a *DataAuditResult) SetRetries(v uint32) {
|
||||
a.retries = v
|
||||
}
|
||||
|
||||
// GetHit returns number of sampled objects under audit placed
|
||||
// in an optimal way according to the containers placement policy
|
||||
// when checking PoP.
|
||||
func (a *DataAuditResult) GetHit() uint32 {
|
||||
if a != nil {
|
||||
return a.hit
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetHit sets number of sampled objects under audit placed
|
||||
// in an optimal way according to the containers placement policy
|
||||
// when checking PoP.
|
||||
func (a *DataAuditResult) SetHit(v uint32) {
|
||||
a.hit = v
|
||||
}
|
||||
|
||||
// GetMiss returns number of sampled objects under audit placed
|
||||
// in suboptimal way according to the containers placement policy,
|
||||
// but still at a satisfactory level when checking PoP.
|
||||
func (a *DataAuditResult) GetMiss() uint32 {
|
||||
if a != nil {
|
||||
return a.miss
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetMiss sets number of sampled objects under audit placed
|
||||
// in suboptimal way according to the containers placement policy,
|
||||
// but still at a satisfactory level when checking PoP.
|
||||
func (a *DataAuditResult) SetMiss(v uint32) {
|
||||
a.miss = v
|
||||
}
|
||||
|
||||
// GetFail returns number of sampled objects under audit stored
|
||||
// in a way not confirming placement policy or not found at all
|
||||
// when checking PoP.
|
||||
func (a *DataAuditResult) GetFail() uint32 {
|
||||
if a != nil {
|
||||
return a.fail
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// SetFail sets number of sampled objects under audit stored
|
||||
// in a way not confirming placement policy or not found at all
|
||||
// when checking PoP.
|
||||
func (a *DataAuditResult) SetFail(v uint32) {
|
||||
a.fail = v
|
||||
}
|
||||
|
||||
// GetPassNodes returns list of storage node public keys that
|
||||
// passed at least one PDP.
|
||||
func (a *DataAuditResult) GetPassNodes() [][]byte {
|
||||
if a != nil {
|
||||
return a.passNodes
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetPassNodes sets list of storage node public keys that
|
||||
// passed at least one PDP.
|
||||
func (a *DataAuditResult) SetPassNodes(v [][]byte) {
|
||||
a.passNodes = v
|
||||
}
|
||||
|
||||
// GetFailNodes returns list of storage node public keys that
|
||||
// failed at least one PDP.
|
||||
func (a *DataAuditResult) GetFailNodes() [][]byte {
|
||||
if a != nil {
|
||||
return a.failNodes
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetFailNodes sets list of storage node public keys that
|
||||
// failed at least one PDP.
|
||||
func (a *DataAuditResult) SetFailNodes(v [][]byte) {
|
||||
a.failNodes = v
|
||||
}
|
||||
|
||||
// GetComplete returns boolean completion statement of audit result.
|
||||
func (a *DataAuditResult) GetComplete() bool {
|
||||
if a != nil {
|
||||
return a.complete
|
||||
}
|
||||
|
||||
return false // bool default
|
||||
}
|
||||
|
||||
// SetComplete sets boolean completion statement of audit result.
|
||||
func (a *DataAuditResult) SetComplete(v bool) {
|
||||
a.complete = v
|
||||
}
|
15
container/grpc/service.pb.go
generated
15
container/grpc/service.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: container/grpc/service.proto
|
||||
|
||||
package container
|
||||
|
@ -1128,8 +1128,7 @@ type DeleteRequest_Body struct {
|
|||
|
||||
// Identifier of the container to delete from NeoFS
|
||||
ContainerId *grpc1.ContainerID `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||
// `ContainerID` signed with the container owner's key according to
|
||||
// RFC-6979.
|
||||
// `ContainerID` signed with the container owner's key according to RFC-6979.
|
||||
Signature *grpc1.SignatureRFC6979 `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -1494,8 +1493,8 @@ func (x *SetExtendedACLRequest_Body) GetSignature() *grpc1.SignatureRFC6979 {
|
|||
}
|
||||
|
||||
// `SetExtendedACLResponse` has an empty body because the operation is
|
||||
// asynchronous and the update should be reflected in `Container` smart
|
||||
// contract's storage after next block is issued in sidechain.
|
||||
// asynchronous and the update should be reflected in `Container` smart contract's
|
||||
// storage after next block is issued in sidechain.
|
||||
type SetExtendedACLResponse_Body struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -1584,8 +1583,8 @@ func (x *GetExtendedACLRequest_Body) GetContainerId() *grpc1.ContainerID {
|
|||
}
|
||||
|
||||
// Get Extended ACL Response body can be empty if the requested container does
|
||||
// not have Extended ACL Table attached or Extended ACL has not been allowed
|
||||
// at the time of container creation.
|
||||
// not have Extended ACL Table attached or Extended ACL has not been allowed at
|
||||
// the time of container creation.
|
||||
type GetExtendedACLResponse_Body struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
74
container/grpc/service_grpc.pb.go
generated
74
container/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// - protoc v3.21.9
|
||||
// source: container/grpc/service.proto
|
||||
|
||||
package container
|
||||
|
@ -34,27 +34,23 @@ const (
|
|||
type ContainerServiceClient interface {
|
||||
// `Put` invokes `Container` smart contract's `Put` method and returns
|
||||
// response immediately. After a new block is issued in sidechain, request is
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the
|
||||
// container is added into smart contract storage.
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the container
|
||||
// is added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to save the container has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container create access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
||||
// `Delete` invokes `Container` smart contract's `Delete` method and returns
|
||||
// response immediately. After a new block is issued in sidechain, request is
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the
|
||||
// container is added into smart contract storage.
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the container
|
||||
// is added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to remove the container has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container delete access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
||||
// Returns container structure from `Container` smart contract storage.
|
||||
//
|
||||
|
@ -63,29 +59,23 @@ type ContainerServiceClient interface {
|
|||
// container has been successfully read;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// requested container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied.
|
||||
// requested container not found.
|
||||
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
||||
// Returns all owner's containers from 'Container` smart contract' storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// container list has been successfully read;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container list access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
||||
// Invokes 'SetEACL' method of 'Container` smart contract and returns response
|
||||
// immediately. After one more block in sidechain, changes in an Extended ACL
|
||||
// are added into smart contract storage.
|
||||
// immediately. After one more block in sidechain, changes in an Extended ACL are
|
||||
// added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to save container eACL has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// set container eACL access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
SetExtendedACL(ctx context.Context, in *SetExtendedACLRequest, opts ...grpc.CallOption) (*SetExtendedACLResponse, error)
|
||||
// Returns Extended ACL table and signature from `Container` smart contract
|
||||
// storage.
|
||||
|
@ -97,9 +87,7 @@ type ContainerServiceClient interface {
|
|||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container not found;
|
||||
// - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
|
||||
// eACL table not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container eACL is denied.
|
||||
// eACL table not found.
|
||||
GetExtendedACL(ctx context.Context, in *GetExtendedACLRequest, opts ...grpc.CallOption) (*GetExtendedACLResponse, error)
|
||||
// Announces the space values used by the container for P2P synchronization.
|
||||
//
|
||||
|
@ -187,27 +175,23 @@ func (c *containerServiceClient) AnnounceUsedSpace(ctx context.Context, in *Anno
|
|||
type ContainerServiceServer interface {
|
||||
// `Put` invokes `Container` smart contract's `Put` method and returns
|
||||
// response immediately. After a new block is issued in sidechain, request is
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the
|
||||
// container is added into smart contract storage.
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the container
|
||||
// is added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to save the container has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container create access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
Put(context.Context, *PutRequest) (*PutResponse, error)
|
||||
// `Delete` invokes `Container` smart contract's `Delete` method and returns
|
||||
// response immediately. After a new block is issued in sidechain, request is
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the
|
||||
// container is added into smart contract storage.
|
||||
// verified by Inner Ring nodes. After one more block in sidechain, the container
|
||||
// is added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to remove the container has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container delete access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
||||
// Returns container structure from `Container` smart contract storage.
|
||||
//
|
||||
|
@ -216,29 +200,23 @@ type ContainerServiceServer interface {
|
|||
// container has been successfully read;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// requested container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied.
|
||||
// requested container not found.
|
||||
Get(context.Context, *GetRequest) (*GetResponse, error)
|
||||
// Returns all owner's containers from 'Container` smart contract' storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// container list has been successfully read;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// container list access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
List(context.Context, *ListRequest) (*ListResponse, error)
|
||||
// Invokes 'SetEACL' method of 'Container` smart contract and returns response
|
||||
// immediately. After one more block in sidechain, changes in an Extended ACL
|
||||
// are added into smart contract storage.
|
||||
// immediately. After one more block in sidechain, changes in an Extended ACL are
|
||||
// added into smart contract storage.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// request to save container eACL has been sent to the sidechain;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// set container eACL access denied.
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
SetExtendedACL(context.Context, *SetExtendedACLRequest) (*SetExtendedACLResponse, error)
|
||||
// Returns Extended ACL table and signature from `Container` smart contract
|
||||
// storage.
|
||||
|
@ -250,9 +228,7 @@ type ContainerServiceServer interface {
|
|||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// container not found;
|
||||
// - **EACL_NOT_FOUND** (3073, SECTION_CONTAINER): \
|
||||
// eACL table not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container eACL is denied.
|
||||
// eACL table not found.
|
||||
GetExtendedACL(context.Context, *GetExtendedACLRequest) (*GetExtendedACLResponse, error)
|
||||
// Announces the space values used by the container for P2P synchronization.
|
||||
//
|
||||
|
|
31
container/grpc/types.pb.go
generated
31
container/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: container/grpc/types.proto
|
||||
|
||||
package container
|
||||
|
@ -24,8 +24,8 @@ const (
|
|||
|
||||
// Container is a structure that defines object placement behaviour. Objects can
|
||||
// be stored only within containers. They define placement rule, attributes and
|
||||
// access control information. An ID of a container is a 32 byte long SHA256
|
||||
// hash of stable-marshalled container message.
|
||||
// access control information. An ID of a container is a 32 byte long SHA256 hash
|
||||
// of stable-marshalled container message.
|
||||
type Container struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -38,8 +38,8 @@ type Container struct {
|
|||
OwnerId *grpc.OwnerID `protobuf:"bytes,2,opt,name=owner_id,json=ownerID,proto3" json:"owner_id,omitempty"`
|
||||
// Nonce is a 16 byte UUIDv4, used to avoid collisions of `ContainerID`s
|
||||
Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
|
||||
// `BasicACL` contains access control rules for the owner, system and others
|
||||
// groups, as well as permission bits for `BearerToken` and `Extended ACL`
|
||||
// `BasicACL` contains access control rules for the owner, system and others groups,
|
||||
// as well as permission bits for `BearerToken` and `Extended ACL`
|
||||
BasicAcl uint32 `protobuf:"varint,4,opt,name=basic_acl,json=basicACL,proto3" json:"basic_acl,omitempty"`
|
||||
// Attributes represent immutable container's meta data
|
||||
Attributes []*Container_Attribute `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"`
|
||||
|
@ -122,8 +122,8 @@ func (x *Container) GetPlacementPolicy() *grpc1.PlacementPolicy {
|
|||
}
|
||||
|
||||
// `Attribute` is a user-defined Key-Value metadata pair attached to the
|
||||
// container. Container attributes are immutable. They are set at the moment
|
||||
// of container creation and can never be added or updated.
|
||||
// container. Container attributes are immutable. They are set at the moment of
|
||||
// container creation and can never be added or updated.
|
||||
//
|
||||
// Key name must be a container-unique valid UTF-8 string. Value can't be
|
||||
// empty. Containers with duplicated attribute names or attributes with empty
|
||||
|
@ -137,16 +137,15 @@ func (x *Container) GetPlacementPolicy() *grpc1.PlacementPolicy {
|
|||
// NNS contract.
|
||||
// - [ __SYSTEM__ZONE ] \
|
||||
// (`__NEOFS__ZONE` is deprecated) \
|
||||
// String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated).
|
||||
// Used as a TLD of a domain name in NNS contract. If no zone is specified,
|
||||
// use default zone: `container`.
|
||||
// String of a zone for `__SYSTEM__NAME` (`__NEOFS__NAME` is deprecated). Used as a TLD of a domain name in NNS
|
||||
// contract. If no zone is specified, use default zone: `container`.
|
||||
// - [ __SYSTEM__DISABLE_HOMOMORPHIC_HASHING ] \
|
||||
// (`__NEOFS__DISABLE_HOMOMORPHIC_HASHING` is deprecated) \
|
||||
// Disables homomorphic hashing for the container if the value equals "true"
|
||||
// string. Any other values are interpreted as missing attribute. Container
|
||||
// could be accepted in a NeoFS network only if the global network hashing
|
||||
// configuration value corresponds with that attribute's value. After
|
||||
// container inclusion, network setting is ignored.
|
||||
// Disables homomorphic hashing for the container if the value equals "true" string.
|
||||
// Any other values are interpreted as missing attribute. Container could be
|
||||
// accepted in a NeoFS network only if the global network hashing configuration
|
||||
// value corresponds with that attribute's value. After container inclusion, network
|
||||
// setting is ignored.
|
||||
//
|
||||
// And some well-known attributes used by applications only:
|
||||
//
|
||||
|
|
34
go.mod
34
go.mod
|
@ -1,26 +1,36 @@
|
|||
module git.frostfs.info/TrueCloudLab/frostfs-api-go/v2
|
||||
|
||||
go 1.20
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0
|
||||
github.com/stretchr/testify v1.8.3
|
||||
golang.org/x/sync v0.2.0
|
||||
google.golang.org/grpc v1.55.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
go.opentelemetry.io/otel v1.14.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0
|
||||
go.opentelemetry.io/otel/sdk v1.14.0
|
||||
go.opentelemetry.io/otel/trace v1.14.0
|
||||
golang.org/x/sync v0.1.0
|
||||
google.golang.org/grpc v1.53.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
)
|
||||
|
||||
require (
|
||||
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
|
||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/text v0.7.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
|
454
go.sum
454
go.sum
|
@ -1,15 +1,143 @@
|
|||
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=
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
|
||||
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
|
||||
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
|
||||
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
|
||||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
|
||||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
|
||||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
|
||||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
|
||||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
|
||||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
|
||||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
|
||||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
|
||||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4=
|
||||
github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
|
||||
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
||||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.4.1/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.1/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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
|
@ -19,30 +147,316 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
|||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
|
||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
|
||||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
|
||||
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho=
|
||||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 h1:TKf2uAs2ueguzLaxOCBXNpHxfO/aC7PAdDsSH0IbeRQ=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 h1:sEL90JjOO/4yhquXl5zTAkLLsZ5+MycAgX99SDsxGc8=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0/go.mod h1:oCslUcizYdpKYyS9e8srZEqM6BB8fq41VJBjLAE6z1w=
|
||||
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
|
||||
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
|
||||
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
|
||||
go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
|
||||
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
|
||||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
|
||||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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-20190227155943-e225da77a7e6/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.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
|
||||
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
|
||||
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
|
||||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
|
||||
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
|
||||
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||
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=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
|
||||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
|
||||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
|
||||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
|
||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
||||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
|
||||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
|
||||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
|
||||
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
|
15
internal/random/rand.go
Normal file
15
internal/random/rand.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package random
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
// Uint32 returns random uint32 value [0, max).
|
||||
func Uint32(max uint32) uint32 {
|
||||
return rand.Uint32() % max
|
||||
}
|
9
lock/grpc/types.pb.go
generated
9
lock/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: lock/grpc/types.proto
|
||||
|
||||
package lock
|
||||
|
@ -23,9 +23,8 @@ const (
|
|||
|
||||
// Lock objects protects a list of objects from being deleted. The lifetime of a
|
||||
// lock object is limited similar to regular objects in
|
||||
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated)
|
||||
// attribute. Lock object MUST have expiration epoch. It is impossible to delete
|
||||
// a lock object via ObjectService.Delete RPC call.
|
||||
// `__SYSTEM__EXPIRATION_EPOCH` (`__NEOFS__EXPIRATION_EPOCH` is deprecated) attribute. Lock object MUST have expiration epoch.
|
||||
// It is impossible to delete a lock object via ObjectService.Delete RPC call.
|
||||
type Lock struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -142,8 +142,6 @@ func (r *Replica) ToGRPCMessage() grpc.Message {
|
|||
|
||||
m.SetSelector(r.selector)
|
||||
m.SetCount(r.count)
|
||||
m.EcDataCount = r.ecDataCount
|
||||
m.EcParityCount = r.ecParityCount
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -157,8 +155,6 @@ func (r *Replica) FromGRPCMessage(m grpc.Message) error {
|
|||
|
||||
r.selector = v.GetSelector()
|
||||
r.count = v.GetCount()
|
||||
r.ecDataCount = v.GetEcDataCount()
|
||||
r.ecParityCount = v.GetEcParityCount()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -202,7 +198,6 @@ func (p *PlacementPolicy) ToGRPCMessage() grpc.Message {
|
|||
m.SetSelectors(SelectorsToGRPC(p.selectors))
|
||||
m.SetReplicas(ReplicasToGRPC(p.replicas))
|
||||
m.SetContainerBackupFactor(p.backupFactor)
|
||||
m.SetUnique(p.unique)
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -233,8 +228,6 @@ func (p *PlacementPolicy) FromGRPCMessage(m grpc.Message) error {
|
|||
|
||||
p.backupFactor = v.GetContainerBackupFactor()
|
||||
|
||||
p.unique = v.GetUnique()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
4
netmap/grpc/service.pb.go
generated
4
netmap/grpc/service.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: netmap/grpc/service.proto
|
||||
|
||||
package netmap
|
||||
|
|
20
netmap/grpc/service_grpc.pb.go
generated
20
netmap/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// - protoc v3.21.9
|
||||
// source: netmap/grpc/service.proto
|
||||
|
||||
package netmap
|
||||
|
@ -29,11 +29,10 @@ const (
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type NetmapServiceClient interface {
|
||||
// Get NodeInfo structure from the particular node directly.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases,
|
||||
// though, one may want to get recent information directly or to talk to the
|
||||
// node not yet present in the `Network Map` to find out what API version can
|
||||
// be used for further communication. This can be also used to check if a node
|
||||
// is up and running.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases, though,
|
||||
// one may want to get recent information directly or to talk to the node not yet
|
||||
// present in the `Network Map` to find out what API version can be used for
|
||||
// further communication. This can be also used to check if a node is up and running.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS):
|
||||
|
@ -96,11 +95,10 @@ func (c *netmapServiceClient) NetmapSnapshot(ctx context.Context, in *NetmapSnap
|
|||
// for forward compatibility
|
||||
type NetmapServiceServer interface {
|
||||
// Get NodeInfo structure from the particular node directly.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases,
|
||||
// though, one may want to get recent information directly or to talk to the
|
||||
// node not yet present in the `Network Map` to find out what API version can
|
||||
// be used for further communication. This can be also used to check if a node
|
||||
// is up and running.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases, though,
|
||||
// one may want to get recent information directly or to talk to the node not yet
|
||||
// present in the `Network Map` to find out what API version can be used for
|
||||
// further communication. This can be also used to check if a node is up and running.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS):
|
||||
|
|
|
@ -20,11 +20,6 @@ func (m *PlacementPolicy) SetFilters(v []*Filter) {
|
|||
m.Filters = v
|
||||
}
|
||||
|
||||
// SetUnique of placement policy.
|
||||
func (m *PlacementPolicy) SetUnique(unique bool) {
|
||||
m.Unique = unique
|
||||
}
|
||||
|
||||
// SetName of placement filter.
|
||||
func (m *Filter) SetName(v string) {
|
||||
m.Name = v
|
||||
|
|
235
netmap/grpc/types.pb.go
generated
235
netmap/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: netmap/grpc/types.proto
|
||||
|
||||
package netmap
|
||||
|
@ -42,8 +42,6 @@ const (
|
|||
Operation_OR Operation = 7
|
||||
// Logical AND
|
||||
Operation_AND Operation = 8
|
||||
// Logical negation
|
||||
Operation_NOT Operation = 9
|
||||
)
|
||||
|
||||
// Enum value maps for Operation.
|
||||
|
@ -58,7 +56,6 @@ var (
|
|||
6: "LE",
|
||||
7: "OR",
|
||||
8: "AND",
|
||||
9: "NOT",
|
||||
}
|
||||
Operation_value = map[string]int32{
|
||||
"OPERATION_UNSPECIFIED": 0,
|
||||
|
@ -70,7 +67,6 @@ var (
|
|||
"LE": 6,
|
||||
"OR": 7,
|
||||
"AND": 8,
|
||||
"NOT": 9,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -213,8 +209,8 @@ func (NodeInfo_State) EnumDescriptor() ([]byte, []int) {
|
|||
return file_netmap_grpc_types_proto_rawDescGZIP(), []int{4, 0}
|
||||
}
|
||||
|
||||
// This filter will return the subset of nodes from `NetworkMap` or another
|
||||
// filter's results that will satisfy filter's conditions.
|
||||
// This filter will return the subset of nodes from `NetworkMap` or another filter's
|
||||
// results that will satisfy filter's conditions.
|
||||
type Filter struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -401,10 +397,6 @@ type Replica struct {
|
|||
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
||||
// Named selector bucket to put replicas
|
||||
Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
|
||||
// Data shards count
|
||||
EcDataCount uint32 `protobuf:"varint,3,opt,name=ec_data_count,json=ecDataCount,proto3" json:"ec_data_count,omitempty"`
|
||||
// Parity shards count
|
||||
EcParityCount uint32 `protobuf:"varint,4,opt,name=ec_parity_count,json=ecParityCount,proto3" json:"ec_parity_count,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Replica) Reset() {
|
||||
|
@ -453,20 +445,6 @@ func (x *Replica) GetSelector() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *Replica) GetEcDataCount() uint32 {
|
||||
if x != nil {
|
||||
return x.EcDataCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Replica) GetEcParityCount() uint32 {
|
||||
if x != nil {
|
||||
return x.EcParityCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Set of rules to select a subset of nodes from `NetworkMap` able to store
|
||||
// container's objects. The format is simple enough to transpile from different
|
||||
// storage policy definition languages.
|
||||
|
@ -485,8 +463,6 @@ type PlacementPolicy struct {
|
|||
Selectors []*Selector `protobuf:"bytes,3,rep,name=selectors,proto3" json:"selectors,omitempty"`
|
||||
// List of named filters to reference in selectors
|
||||
Filters []*Filter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"`
|
||||
// Unique flag defines non-overlapping application for replicas
|
||||
Unique bool `protobuf:"varint,5,opt,name=unique,proto3" json:"unique,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PlacementPolicy) Reset() {
|
||||
|
@ -549,13 +525,6 @@ func (x *PlacementPolicy) GetFilters() []*Filter {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *PlacementPolicy) GetUnique() bool {
|
||||
if x != nil {
|
||||
return x.Unique
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// NeoFS node description
|
||||
type NodeInfo struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -752,8 +721,7 @@ type NetworkInfo struct {
|
|||
CurrentEpoch uint64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"`
|
||||
// Magic number of the sidechain of the NeoFS network
|
||||
MagicNumber uint64 `protobuf:"varint,2,opt,name=magic_number,json=magicNumber,proto3" json:"magic_number,omitempty"`
|
||||
// MillisecondsPerBlock network parameter of the sidechain of the NeoFS
|
||||
// network
|
||||
// MillisecondsPerBlock network parameter of the sidechain of the NeoFS network
|
||||
MsPerBlock int64 `protobuf:"varint,3,opt,name=ms_per_block,json=msPerBlock,proto3" json:"ms_per_block,omitempty"`
|
||||
// NeoFS network configuration
|
||||
NetworkConfig *NetworkConfig `protobuf:"bytes,4,opt,name=network_config,json=networkConfig,proto3" json:"network_config,omitempty"`
|
||||
|
@ -825,15 +793,15 @@ func (x *NetworkInfo) GetNetworkConfig() *NetworkConfig {
|
|||
// string. Value can't be empty.
|
||||
//
|
||||
// Attributes can be constructed into a chain of attributes: any attribute can
|
||||
// have a parent attribute and a child attribute (except the first and the
|
||||
// last one). A string representation of the chain of attributes in NeoFS
|
||||
// Storage Node configuration uses ":" and "/" symbols, e.g.:
|
||||
// have a parent attribute and a child attribute (except the first and the last
|
||||
// one). A string representation of the chain of attributes in NeoFS Storage
|
||||
// Node configuration uses ":" and "/" symbols, e.g.:
|
||||
//
|
||||
// `NEOFS_NODE_ATTRIBUTE_1=key1:val1/key2:val2`
|
||||
//
|
||||
// Therefore the string attribute representation in the Node configuration
|
||||
// must use "\:", "\/" and "\\" escaped symbols if any of them appears in an
|
||||
// attribute's key or value.
|
||||
// Therefore the string attribute representation in the Node configuration must
|
||||
// use "\:", "\/" and "\\" escaped symbols if any of them appears in an attribute's
|
||||
// key or value.
|
||||
//
|
||||
// Node's attributes are mostly used during Storage Policy evaluation to
|
||||
// calculate object's placement and find a set of nodes satisfying policy
|
||||
|
@ -987,12 +955,6 @@ func (x *NodeInfo_Attribute) GetParents() []string {
|
|||
// - **WithdrawFee** \
|
||||
// Fee paid for withdrawal of funds paid by the account owner.
|
||||
// Value: little-endian integer. Default: 0.
|
||||
// - **MaxECDataCount** \
|
||||
// Maximum number of data shards for EC placement policy.
|
||||
// Value: little-endian integer. Default: 0.
|
||||
// - **MaxECParityCount** \
|
||||
// Maximum number of parity shards for EC placement policy.
|
||||
// Value: little-endian integer. Default: 0.
|
||||
type NetworkConfig_Parameter struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -1076,97 +1038,90 @@ var file_netmap_grpc_types_proto_rawDesc = []byte{
|
|||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69,
|
||||
0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74,
|
||||
0x65, 0x72, 0x22, 0x87, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
|
||||
0x12, 0x22, 0x0a, 0x0d, 0x65, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x69, 0x74,
|
||||
0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x65,
|
||||
0x63, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x02, 0x0a,
|
||||
0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
|
||||
0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e,
|
||||
0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x52, 0x08, 0x72,
|
||||
0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x61,
|
||||
0x69, 0x6e, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x66, 0x61, 0x63, 0x74,
|
||||
0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12,
|
||||
0x38, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e,
|
||||
0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09,
|
||||
0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x6c,
|
||||
0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x46, 0x69,
|
||||
0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75,
|
||||
0x6e, 0x69, 0x71, 0x75, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
|
||||
0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12,
|
||||
0x44, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e,
|
||||
0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69,
|
||||
0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x4d, 0x0a,
|
||||
0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x05,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
|
||||
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45,
|
||||
0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x12,
|
||||
0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03,
|
||||
0x22, 0x50, 0x0a, 0x06, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70,
|
||||
0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68,
|
||||
0x12, 0x30, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d,
|
||||
0x61, 0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
|
||||
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
|
||||
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x65, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
|
||||
0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a,
|
||||
0x33, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f,
|
||||
0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x75, 0x72,
|
||||
0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x67,
|
||||
0x69, 0x63, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x0b, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0c,
|
||||
0x6d, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x0a, 0x6d, 0x73, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x46,
|
||||
0x0a, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x70, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e,
|
||||
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06,
|
||||
0x0a, 0x02, 0x45, 0x51, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x06,
|
||||
0x0a, 0x02, 0x47, 0x54, 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, 0x04, 0x12, 0x06,
|
||||
0x0a, 0x02, 0x4c, 0x54, 0x10, 0x05, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x06,
|
||||
0x0a, 0x02, 0x4f, 0x52, 0x10, 0x07, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x08, 0x12,
|
||||
0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, 0x10, 0x09, 0x2a, 0x38, 0x0a, 0x06, 0x43, 0x6c, 0x61, 0x75,
|
||||
0x73, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4c, 0x41, 0x55, 0x53, 0x45, 0x5f, 0x55, 0x4e, 0x53,
|
||||
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x41,
|
||||
0x4d, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x54, 0x49, 0x4e, 0x43, 0x54,
|
||||
0x10, 0x02, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d,
|
||||
0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x67, 0x72, 0x70,
|
||||
0x63, 0x3b, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x4e,
|
||||
0x65, 0x74, 0x6d, 0x61, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x72, 0x22, 0x3b, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22,
|
||||
0xee, 0x01, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c,
|
||||
0x69, 0x63, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x52, 0x08, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x66,
|
||||
0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x46, 0x61, 0x63, 0x74,
|
||||
0x6f, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f,
|
||||
0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x07,
|
||||
0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70,
|
||||
0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73,
|
||||
0x22, 0xd8, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61,
|
||||
0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
|
||||
0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73,
|
||||
0x12, 0x36, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d,
|
||||
0x61, 0x70, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x4d, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
|
||||
0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41,
|
||||
0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x22, 0x50, 0x0a, 0x06, 0x4e,
|
||||
0x65, 0x74, 0x6d, 0x61, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x05, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x8f, 0x01,
|
||||
0x0a, 0x0d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||
0x49, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a,
|
||||
0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x33, 0x0a, 0x09, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
|
||||
0xbf, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45,
|
||||
0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x67, 0x69, 0x63, 0x5f, 0x6e, 0x75,
|
||||
0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x67, 0x69,
|
||||
0x63, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x73, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6d,
|
||||
0x73, 0x50, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x46, 0x0a, 0x0e, 0x6e, 0x65, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6e, 0x65,
|
||||
0x74, 0x6d, 0x61, 0x70, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2a, 0x67, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19,
|
||||
0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50,
|
||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x45, 0x51, 0x10,
|
||||
0x01, 0x12, 0x06, 0x0a, 0x02, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x54, 0x10,
|
||||
0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x45, 0x10, 0x04, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x54, 0x10,
|
||||
0x05, 0x12, 0x06, 0x0a, 0x02, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x52, 0x10,
|
||||
0x07, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x08, 0x2a, 0x38, 0x0a, 0x06, 0x43, 0x6c,
|
||||
0x61, 0x75, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4c, 0x41, 0x55, 0x53, 0x45, 0x5f, 0x55,
|
||||
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04,
|
||||
0x53, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x54, 0x49, 0x4e,
|
||||
0x43, 0x54, 0x10, 0x02, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73,
|
||||
0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f,
|
||||
0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70,
|
||||
0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x2f, 0x67,
|
||||
0x72, 0x70, 0x63, 0x3b, 0x6e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f,
|
||||
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49,
|
||||
0x2e, 0x4e, 0x65, 0x74, 0x6d, 0x61, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -19,16 +19,13 @@ const (
|
|||
attributeSelectorField = 4
|
||||
filterSelectorField = 5
|
||||
|
||||
countReplicaField = 1
|
||||
selectorReplicaField = 2
|
||||
ecDataCountReplicaField = 3
|
||||
ecParityCountReplicaField = 4
|
||||
countReplicaField = 1
|
||||
selectorReplicaField = 2
|
||||
|
||||
replicasPolicyField = 1
|
||||
backupPolicyField = 2
|
||||
selectorsPolicyField = 3
|
||||
filtersPolicyField = 4
|
||||
uniquePolicyField = 5
|
||||
|
||||
keyAttributeField = 1
|
||||
valueAttributeField = 2
|
||||
|
@ -67,10 +64,6 @@ func (f *Filter) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
func (f *Filter) StableSize() (size int) {
|
||||
if f == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.StringSize(nameFilterField, f.name)
|
||||
size += protoutil.StringSize(keyFilterField, f.key)
|
||||
size += protoutil.EnumSize(opFilterField, int32(f.op))
|
||||
|
@ -107,10 +100,6 @@ func (s *Selector) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
func (s *Selector) StableSize() (size int) {
|
||||
if s == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.StringSize(nameSelectorField, s.name)
|
||||
size += protoutil.UInt32Size(countSelectorField, s.count)
|
||||
size += protoutil.EnumSize(countSelectorField, int32(s.clause))
|
||||
|
@ -136,22 +125,14 @@ func (r *Replica) StableMarshal(buf []byte) []byte {
|
|||
var offset int
|
||||
|
||||
offset += protoutil.UInt32Marshal(countReplicaField, buf[offset:], r.count)
|
||||
offset += protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
|
||||
offset += protoutil.UInt32Marshal(ecDataCountReplicaField, buf[offset:], r.ecDataCount)
|
||||
protoutil.UInt32Marshal(ecParityCountReplicaField, buf[offset:], r.ecParityCount)
|
||||
protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (r *Replica) StableSize() (size int) {
|
||||
if r == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.UInt32Size(countReplicaField, r.count)
|
||||
size += protoutil.StringSize(selectorReplicaField, r.selector)
|
||||
size += protoutil.UInt32Size(ecDataCountReplicaField, r.ecDataCount)
|
||||
size += protoutil.UInt32Size(ecParityCountReplicaField, r.ecParityCount)
|
||||
|
||||
return size
|
||||
}
|
||||
|
@ -185,16 +166,10 @@ func (p *PlacementPolicy) StableMarshal(buf []byte) []byte {
|
|||
offset += protoutil.NestedStructureMarshal(filtersPolicyField, buf[offset:], &p.filters[i])
|
||||
}
|
||||
|
||||
protoutil.BoolMarshal(uniquePolicyField, buf[offset:], p.unique)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (p *PlacementPolicy) StableSize() (size int) {
|
||||
if p == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
for i := range p.replicas {
|
||||
size += protoutil.NestedStructureSize(replicasPolicyField, &p.replicas[i])
|
||||
}
|
||||
|
@ -209,8 +184,6 @@ func (p *PlacementPolicy) StableSize() (size int) {
|
|||
size += protoutil.NestedStructureSize(filtersPolicyField, &p.filters[i])
|
||||
}
|
||||
|
||||
size += protoutil.BoolSize(uniquePolicyField, p.unique)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
|
|
|
@ -81,17 +81,6 @@ func GenerateReplica(empty bool) *netmap.Replica {
|
|||
return m
|
||||
}
|
||||
|
||||
func GenerateEC(empty bool) *netmap.Replica {
|
||||
m := new(netmap.Replica)
|
||||
|
||||
if !empty {
|
||||
m.SetECDataCount(4)
|
||||
m.SetECParityCount(2)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateReplicas(empty bool) []netmap.Replica {
|
||||
var res []netmap.Replica
|
||||
|
||||
|
@ -99,7 +88,6 @@ func GenerateReplicas(empty bool) []netmap.Replica {
|
|||
res = append(res,
|
||||
*GenerateReplica(false),
|
||||
*GenerateReplica(false),
|
||||
*GenerateEC(false),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -114,7 +102,6 @@ func GeneratePlacementPolicy(empty bool) *netmap.PlacementPolicy {
|
|||
m.SetFilters(GenerateFilters(false))
|
||||
m.SetSelectors(GenerateSelectors(false))
|
||||
m.SetReplicas(GenerateReplicas(false))
|
||||
m.SetUnique(true)
|
||||
}
|
||||
|
||||
return m
|
||||
|
|
|
@ -50,9 +50,6 @@ type Selector struct {
|
|||
type Replica struct {
|
||||
count uint32
|
||||
selector string
|
||||
|
||||
ecDataCount uint32
|
||||
ecParityCount uint32
|
||||
}
|
||||
|
||||
type Operation uint32
|
||||
|
@ -62,7 +59,6 @@ type PlacementPolicy struct {
|
|||
backupFactor uint32
|
||||
selectors []Selector
|
||||
filters []Filter
|
||||
unique bool
|
||||
}
|
||||
|
||||
// Attribute of storage node.
|
||||
|
@ -110,7 +106,6 @@ const (
|
|||
LE
|
||||
OR
|
||||
AND
|
||||
NOT
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -262,41 +257,6 @@ func (r *Replica) SetCount(count uint32) {
|
|||
r.count = count
|
||||
}
|
||||
|
||||
func (r *Replica) GetECDataCount() uint32 {
|
||||
if r != nil {
|
||||
return r.ecDataCount
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func (r *Replica) SetECDataCount(count uint32) {
|
||||
r.ecDataCount = count
|
||||
}
|
||||
|
||||
func (r *Replica) GetECParityCount() uint32 {
|
||||
if r != nil {
|
||||
return r.ecParityCount
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func (r *Replica) SetECParityCount(count uint32) {
|
||||
r.ecParityCount = count
|
||||
}
|
||||
|
||||
func (p *PlacementPolicy) GetUnique() bool {
|
||||
if p != nil {
|
||||
return p.unique
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (p *PlacementPolicy) SetUnique(unique bool) {
|
||||
p.unique = unique
|
||||
}
|
||||
|
||||
func (p *PlacementPolicy) GetFilters() []Filter {
|
||||
if p != nil {
|
||||
return p.filters
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
func TestSetNotification(t *testing.T) {
|
||||
o := new(Object)
|
||||
|
||||
ni := NotificationInfo{
|
||||
var ni = NotificationInfo{
|
||||
epoch: 10,
|
||||
topic: "test",
|
||||
}
|
||||
|
|
|
@ -262,74 +262,6 @@ func (h *SplitHeader) FromGRPCMessage(m grpc.Message) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (h *ECHeader) ToGRPCMessage() grpc.Message {
|
||||
var m *object.Header_EC
|
||||
|
||||
if h != nil {
|
||||
m = new(object.Header_EC)
|
||||
|
||||
m.Parent = h.Parent.ToGRPCMessage().(*refsGRPC.ObjectID)
|
||||
m.ParentSplitId = h.ParentSplitID
|
||||
m.ParentSplitParentId = h.ParentSplitParentID.ToGRPCMessage().(*refsGRPC.ObjectID)
|
||||
m.ParentAttributes = AttributesToGRPC(h.ParentAttributes)
|
||||
m.Index = h.Index
|
||||
m.Total = h.Total
|
||||
m.Header = h.Header
|
||||
m.HeaderLength = h.HeaderLength
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (h *ECHeader) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.Header_EC)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
par := v.GetParent()
|
||||
if par == nil {
|
||||
h.Parent = nil
|
||||
} else {
|
||||
if h.Parent == nil {
|
||||
h.Parent = new(refs.ObjectID)
|
||||
}
|
||||
|
||||
err = h.Parent.FromGRPCMessage(par)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
h.ParentSplitID = v.GetParentSplitId()
|
||||
|
||||
parSplitParentID := v.GetParentSplitParentId()
|
||||
if parSplitParentID == nil {
|
||||
h.ParentSplitParentID = nil
|
||||
} else {
|
||||
if h.ParentSplitParentID == nil {
|
||||
h.ParentSplitParentID = new(refs.ObjectID)
|
||||
}
|
||||
|
||||
err = h.ParentSplitParentID.FromGRPCMessage(parSplitParentID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if h.ParentAttributes, err = AttributesFromGRPC(v.GetParentAttributes()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
h.Index = v.GetIndex()
|
||||
h.Total = v.GetTotal()
|
||||
h.Header = v.GetHeader()
|
||||
h.HeaderLength = v.GetHeaderLength()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *Header) ToGRPCMessage() grpc.Message {
|
||||
var m *object.Header
|
||||
|
||||
|
@ -343,7 +275,6 @@ func (h *Header) ToGRPCMessage() grpc.Message {
|
|||
m.SetContainerId(h.cid.ToGRPCMessage().(*refsGRPC.ContainerID))
|
||||
m.SetSessionToken(h.sessionToken.ToGRPCMessage().(*sessionGRPC.SessionToken))
|
||||
m.SetSplit(h.split.ToGRPCMessage().(*object.Header_Split))
|
||||
m.Ec = h.ec.ToGRPCMessage().(*object.Header_EC)
|
||||
m.SetAttributes(AttributesToGRPC(h.attr))
|
||||
m.SetPayloadLength(h.payloadLen)
|
||||
m.SetCreationEpoch(h.creatEpoch)
|
||||
|
@ -382,9 +313,6 @@ func (h *Header) FromGRPCMessage(m grpc.Message) error {
|
|||
if err := h.fillSplitHeader(v); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := h.fillECHeader(v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
h.attr, err = AttributesFromGRPC(v.GetAttributes())
|
||||
if err != nil {
|
||||
|
@ -489,19 +417,6 @@ func (h *Header) fillSplitHeader(v *object.Header) error {
|
|||
return h.split.FromGRPCMessage(split)
|
||||
}
|
||||
|
||||
func (h *Header) fillECHeader(v *object.Header) error {
|
||||
ec := v.GetEc()
|
||||
if ec == nil {
|
||||
h.ec = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
if h.ec == nil {
|
||||
h.ec = new(ECHeader)
|
||||
}
|
||||
return h.ec.FromGRPCMessage(ec)
|
||||
}
|
||||
|
||||
func (h *HeaderWithSignature) ToGRPCMessage() grpc.Message {
|
||||
var m *object.HeaderWithSignature
|
||||
|
||||
|
@ -676,73 +591,6 @@ func (s *SplitInfo) FromGRPCMessage(m grpc.Message) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *ECInfo) ToGRPCMessage() grpc.Message {
|
||||
var m *object.ECInfo
|
||||
|
||||
if s != nil {
|
||||
m = new(object.ECInfo)
|
||||
|
||||
if s.Chunks != nil {
|
||||
chunks := make([]*object.ECInfo_Chunk, len(s.Chunks))
|
||||
for i := range chunks {
|
||||
chunks[i] = s.Chunks[i].ToGRPCMessage().(*object.ECInfo_Chunk)
|
||||
}
|
||||
m.Chunks = chunks
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (s *ECInfo) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.ECInfo)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
chunks := v.GetChunks()
|
||||
if chunks == nil {
|
||||
s.Chunks = nil
|
||||
} else {
|
||||
s.Chunks = make([]ECChunk, len(chunks))
|
||||
for i := range chunks {
|
||||
if err := s.Chunks[i].FromGRPCMessage(chunks[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *ECChunk) ToGRPCMessage() grpc.Message {
|
||||
var m *object.ECInfo_Chunk
|
||||
|
||||
if c != nil {
|
||||
m = new(object.ECInfo_Chunk)
|
||||
|
||||
m.Total = c.Total
|
||||
m.Index = c.Index
|
||||
m.Id = c.ID.ToGRPCMessage().(*refsGRPC.ObjectID)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (c *ECChunk) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.ECInfo_Chunk)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
if err := c.ID.FromGRPCMessage(v.GetId()); err != nil {
|
||||
return err
|
||||
}
|
||||
c.Index = v.Index
|
||||
c.Total = v.Total
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *GetRequestBody) ToGRPCMessage() grpc.Message {
|
||||
var m *object.GetRequest_Body
|
||||
|
||||
|
@ -923,8 +771,6 @@ func (r *GetResponseBody) ToGRPCMessage() grpc.Message {
|
|||
m.SetChunk(t.ToGRPCMessage().(*object.GetResponse_Body_Chunk))
|
||||
case *SplitInfo:
|
||||
m.SetSplitInfo(t.ToGRPCMessage().(*object.SplitInfo))
|
||||
case *ECInfo:
|
||||
m.SetEcInfo(t.ToGRPCMessage().(*object.ECInfo))
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown get object part %T", t))
|
||||
}
|
||||
|
@ -963,12 +809,6 @@ func (r *GetResponseBody) FromGRPCMessage(m grpc.Message) error {
|
|||
r.objPart = partSplit
|
||||
err = partSplit.FromGRPCMessage(pt.SplitInfo)
|
||||
}
|
||||
case *object.GetResponse_Body_EcInfo:
|
||||
if pt != nil {
|
||||
partEC := new(ECInfo)
|
||||
r.objPart = partEC
|
||||
err = partEC.FromGRPCMessage(pt.EcInfo)
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("unknown get object part %T", pt)
|
||||
}
|
||||
|
@ -1508,8 +1348,6 @@ func (r *HeadResponseBody) ToGRPCMessage() grpc.Message {
|
|||
m.SetShortHeader(v.ToGRPCMessage().(*object.ShortHeader))
|
||||
case *SplitInfo:
|
||||
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
||||
case *ECInfo:
|
||||
m.SetEcInfo(v.ToGRPCMessage().(*object.ECInfo))
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown head part %T", v))
|
||||
}
|
||||
|
@ -1548,12 +1386,6 @@ func (r *HeadResponseBody) FromGRPCMessage(m grpc.Message) error {
|
|||
r.hdrPart = partSplit
|
||||
err = partSplit.FromGRPCMessage(pt.SplitInfo)
|
||||
}
|
||||
case *object.HeadResponse_Body_EcInfo:
|
||||
if pt != nil {
|
||||
partEC := new(ECInfo)
|
||||
r.hdrPart = partEC
|
||||
err = partEC.FromGRPCMessage(pt.EcInfo)
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("unknown head part %T", pt)
|
||||
}
|
||||
|
@ -1985,8 +1817,6 @@ func (r *GetRangeResponseBody) ToGRPCMessage() grpc.Message {
|
|||
m.SetChunk(v.ToGRPCMessage().(*object.GetRangeResponse_Body_Chunk))
|
||||
case *SplitInfo:
|
||||
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
||||
case *ECInfo:
|
||||
m.SetEcInfo(v.ToGRPCMessage().(*object.ECInfo))
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown get range part %T", v))
|
||||
}
|
||||
|
@ -2019,12 +1849,6 @@ func (r *GetRangeResponseBody) FromGRPCMessage(m grpc.Message) error {
|
|||
r.rngPart = partSplit
|
||||
err = partSplit.FromGRPCMessage(pt.SplitInfo)
|
||||
}
|
||||
case *object.GetRangeResponse_Body_EcInfo:
|
||||
if pt != nil {
|
||||
partEC := new(ECInfo)
|
||||
r.rngPart = partEC
|
||||
err = partEC.FromGRPCMessage(pt.EcInfo)
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("unknown get range part %T", pt)
|
||||
}
|
||||
|
@ -2218,130 +2042,3 @@ func (r *GetRangeHashResponse) FromGRPCMessage(m grpc.Message) error {
|
|||
|
||||
return r.ResponseHeaders.FromMessage(v)
|
||||
}
|
||||
|
||||
func (r *PutSingleRequestBody) ToGRPCMessage() grpc.Message {
|
||||
var m *object.PutSingleRequest_Body
|
||||
|
||||
if r != nil {
|
||||
m = new(object.PutSingleRequest_Body)
|
||||
m.SetObject(r.GetObject().ToGRPCMessage().(*object.Object))
|
||||
m.SetCopiesNumber(r.GetCopiesNumber())
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (r *PutSingleRequestBody) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.PutSingleRequest_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
if v.GetObject() == nil {
|
||||
r.object = nil
|
||||
} else {
|
||||
if r.object == nil {
|
||||
r.object = new(Object)
|
||||
}
|
||||
|
||||
err := r.object.FromGRPCMessage(v.GetObject())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
r.copyNum = v.GetCopiesNumber()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *PutSingleRequest) ToGRPCMessage() grpc.Message {
|
||||
var m *object.PutSingleRequest
|
||||
|
||||
if r != nil {
|
||||
m = new(object.PutSingleRequest)
|
||||
|
||||
m.SetBody(r.body.ToGRPCMessage().(*object.PutSingleRequest_Body))
|
||||
r.RequestHeaders.ToMessage(m)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (r *PutSingleRequest) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.PutSingleRequest)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
body := v.GetBody()
|
||||
if body == nil {
|
||||
r.body = nil
|
||||
} else {
|
||||
if r.body == nil {
|
||||
r.body = new(PutSingleRequestBody)
|
||||
}
|
||||
|
||||
err := r.body.FromGRPCMessage(body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return r.RequestHeaders.FromMessage(v)
|
||||
}
|
||||
|
||||
func (r *PutSingleResponseBody) ToGRPCMessage() grpc.Message {
|
||||
var b *object.PutSingleResponse_Body
|
||||
if r != nil {
|
||||
b = new(object.PutSingleResponse_Body)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (r *PutSingleResponseBody) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.PutSingleResponse_Body)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *PutSingleResponse) ToGRPCMessage() grpc.Message {
|
||||
var m *object.PutSingleResponse
|
||||
|
||||
if r != nil {
|
||||
m = new(object.PutSingleResponse)
|
||||
|
||||
m.SetBody(r.body.ToGRPCMessage().(*object.PutSingleResponse_Body))
|
||||
r.ResponseHeaders.ToMessage(m)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func (r *PutSingleResponse) FromGRPCMessage(m grpc.Message) error {
|
||||
v, ok := m.(*object.PutSingleResponse)
|
||||
if !ok {
|
||||
return message.NewUnexpectedMessageType(m, v)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
body := v.GetBody()
|
||||
if body == nil {
|
||||
r.body = nil
|
||||
} else {
|
||||
if r.body == nil {
|
||||
r.body = new(PutSingleResponseBody)
|
||||
}
|
||||
|
||||
err = r.body.FromGRPCMessage(body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return r.ResponseHeaders.FromMessage(v)
|
||||
}
|
||||
|
|
|
@ -36,9 +36,6 @@ const (
|
|||
|
||||
// FilterHeaderSplitID is a filter key to "split.splitID" field of the object header.
|
||||
FilterHeaderSplitID = ReservedFilterPrefix + "split.splitID"
|
||||
|
||||
// FilterHeaderECParent is a filter key to "ec.parent" field of the object header.
|
||||
FilterHeaderECParent = ReservedFilterPrefix + "ec.parent"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -78,13 +78,6 @@ func (m *GetResponse_Body) SetSplitInfo(v *SplitInfo) {
|
|||
}
|
||||
}
|
||||
|
||||
// SetEcInfo sets part of the object payload.
|
||||
func (m *GetResponse_Body) SetEcInfo(v *ECInfo) {
|
||||
m.ObjectPart = &GetResponse_Body_EcInfo{
|
||||
EcInfo: v,
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets body of the response.
|
||||
func (m *GetResponse) SetBody(v *GetResponse_Body) {
|
||||
m.Body = v
|
||||
|
@ -282,13 +275,6 @@ func (m *HeadResponse_Body) SetSplitInfo(v *SplitInfo) {
|
|||
}
|
||||
}
|
||||
|
||||
// SetEcInfo sets meta info about the erasure coded object.
|
||||
func (m *HeadResponse_Body) SetEcInfo(v *ECInfo) {
|
||||
m.Head = &HeadResponse_Body_EcInfo{
|
||||
EcInfo: v,
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets body of the response.
|
||||
func (m *HeadResponse) SetBody(v *HeadResponse_Body) {
|
||||
m.Body = v
|
||||
|
@ -435,13 +421,6 @@ func (m *GetRangeResponse_Body) SetSplitInfo(v *SplitInfo) {
|
|||
}
|
||||
}
|
||||
|
||||
// SetEcInfo sets meta info about the erasure-coded object.
|
||||
func (m *GetRangeResponse_Body) SetEcInfo(v *ECInfo) {
|
||||
m.RangePart = &GetRangeResponse_Body_EcInfo{
|
||||
EcInfo: v,
|
||||
}
|
||||
}
|
||||
|
||||
// SetBody sets body of the response.
|
||||
func (m *GetRangeResponse) SetBody(v *GetRangeResponse_Body) {
|
||||
m.Body = v
|
||||
|
@ -516,43 +495,3 @@ func (m *GetRangeHashResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
|
|||
func (m *GetRangeHashResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
|
||||
m.VerifyHeader = v
|
||||
}
|
||||
|
||||
// SetObject set object of the body.
|
||||
func (m *PutSingleRequest_Body) SetObject(o *Object) {
|
||||
m.Object = o
|
||||
}
|
||||
|
||||
// SetCopiesNumber sets copies number of the body.
|
||||
func (m *PutSingleRequest_Body) SetCopiesNumber(v []uint32) {
|
||||
m.CopiesNumber = v
|
||||
}
|
||||
|
||||
// SetBody sets body of the request.
|
||||
func (m *PutSingleRequest) SetBody(b *PutSingleRequest_Body) {
|
||||
m.Body = b
|
||||
}
|
||||
|
||||
// SetMetaHeader sets meta header of the request.
|
||||
func (m *PutSingleRequest) SetMetaHeader(v *session.RequestMetaHeader) {
|
||||
m.MetaHeader = v
|
||||
}
|
||||
|
||||
// SetVerifyHeader sets verification header of the request.
|
||||
func (m *PutSingleRequest) SetVerifyHeader(v *session.RequestVerificationHeader) {
|
||||
m.VerifyHeader = v
|
||||
}
|
||||
|
||||
// SetBody sets body of the response.
|
||||
func (m *PutSingleResponse) SetBody(b *PutSingleResponse_Body) {
|
||||
m.Body = b
|
||||
}
|
||||
|
||||
// SetMetaHeader sets meta header of the response.
|
||||
func (m *PutSingleResponse) SetMetaHeader(v *session.ResponseMetaHeader) {
|
||||
m.MetaHeader = v
|
||||
}
|
||||
|
||||
// SetVerifyHeader sets verification header of the response.
|
||||
func (m *PutSingleResponse) SetVerifyHeader(v *session.ResponseVerificationHeader) {
|
||||
m.VerifyHeader = v
|
||||
}
|
||||
|
|
1372
object/grpc/service.pb.go
generated
1372
object/grpc/service.pb.go
generated
File diff suppressed because it is too large
Load diff
199
object/grpc/service_grpc.pb.go
generated
199
object/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// - protoc v3.21.9
|
||||
// source: object/grpc/service.proto
|
||||
|
||||
package object
|
||||
|
@ -26,7 +26,6 @@ const (
|
|||
ObjectService_Search_FullMethodName = "/neo.fs.v2.object.ObjectService/Search"
|
||||
ObjectService_GetRange_FullMethodName = "/neo.fs.v2.object.ObjectService/GetRange"
|
||||
ObjectService_GetRangeHash_FullMethodName = "/neo.fs.v2.object.ObjectService/GetRangeHash"
|
||||
ObjectService_PutSingle_FullMethodName = "/neo.fs.v2.object.ObjectService/PutSingle"
|
||||
)
|
||||
|
||||
// ObjectServiceClient is the client API for ObjectService service.
|
||||
|
@ -34,11 +33,11 @@ const (
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type ObjectServiceClient interface {
|
||||
// Receive full object structure, including Headers and payload. Response uses
|
||||
// gRPC stream. First response message carries the object with the requested
|
||||
// address. Chunk messages are parts of the object's payload if it is needed.
|
||||
// All messages, except the first one, carry payload chunks. The requested
|
||||
// object can be restored by concatenation of object message payload and all
|
||||
// chunks keeping the receiving order.
|
||||
// gRPC stream. First response message carries the object with the requested address.
|
||||
// Chunk messages are parts of the object's payload if it is needed. All
|
||||
// messages, except the first one, carry payload chunks. The requested object can
|
||||
// be restored by concatenation of object message payload and all chunks
|
||||
// keeping the receiving order.
|
||||
//
|
||||
// Extended headers can change `Get` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH ] \
|
||||
|
@ -47,10 +46,9 @@ type ObjectServiceClient interface {
|
|||
// calculation.
|
||||
// - [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
|
||||
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
|
||||
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH`
|
||||
// (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one
|
||||
// otherwise) of Network Map to find an object until the depth limit is
|
||||
// reached.
|
||||
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or
|
||||
// the latest one otherwise) of Network Map to find an object until the depth
|
||||
// limit is reached.
|
||||
//
|
||||
// Please refer to detailed `XHeader` description.
|
||||
//
|
||||
|
@ -66,8 +64,6 @@ type ObjectServiceClient interface {
|
|||
// the requested object has been marked as deleted;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (ObjectService_GetClient, error)
|
||||
|
@ -93,18 +89,15 @@ type ObjectServiceClient interface {
|
|||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// write access to the container is denied;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// placement of an object of type TOMBSTONE that includes at least one
|
||||
// locked object is prohibited;
|
||||
// placement of an object of type TOMBSTONE that includes at least one locked
|
||||
// object is prohibited;
|
||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||
// placement of an object of type LOCK that includes at least one object of
|
||||
// type other than REGULAR is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object storage container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||
// (for trusted object preparation) session private key does not exist or
|
||||
// has
|
||||
// (for trusted object preparation) session private key does not exist or has
|
||||
//
|
||||
// been deleted;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
|
@ -127,15 +120,10 @@ type ObjectServiceClient interface {
|
|||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// delete access to the object is denied;
|
||||
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
|
||||
// the object could not be deleted because it has not been \
|
||||
// found within the container;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// deleting a locked object is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
||||
|
@ -163,8 +151,6 @@ type ObjectServiceClient interface {
|
|||
// the requested object has been marked as deleted;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Head(ctx context.Context, in *HeadRequest, opts ...grpc.CallOption) (*HeadResponse, error)
|
||||
|
@ -188,15 +174,13 @@ type ObjectServiceClient interface {
|
|||
// access to operation SEARCH of the object is denied;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// search container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (ObjectService_SearchClient, error)
|
||||
// Get byte range of data payload. Range is set as an (offset, length) tuple.
|
||||
// Like in `Get` method, the response uses gRPC stream. Requested range can be
|
||||
// restored by concatenation of all received payload chunks keeping the
|
||||
// receiving order.
|
||||
// restored by concatenation of all received payload chunks keeping the receiving
|
||||
// order.
|
||||
//
|
||||
// Extended headers can change `GetRange` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH ] \
|
||||
|
@ -224,8 +208,6 @@ type ObjectServiceClient interface {
|
|||
// the requested range is out of bounds;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
GetRange(ctx context.Context, in *GetRangeRequest, opts ...grpc.CallOption) (ObjectService_GetRangeClient, error)
|
||||
|
@ -258,47 +240,9 @@ type ObjectServiceClient interface {
|
|||
// the requested range is out of bounds;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
GetRangeHash(ctx context.Context, in *GetRangeHashRequest, opts ...grpc.CallOption) (*GetRangeHashResponse, error)
|
||||
// Put the prepared object into container.
|
||||
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of
|
||||
// an object MUST be set.
|
||||
//
|
||||
// Extended headers can change `Put` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH \
|
||||
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
|
||||
// Will use the requested version of Network Map for object placement
|
||||
// calculation.
|
||||
//
|
||||
// Please refer to detailed `XHeader` description.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// object has been successfully saved in the container;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// write access to the container is denied;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// placement of an object of type TOMBSTONE that includes at least one
|
||||
// locked object is prohibited;
|
||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||
// placement of an object of type LOCK that includes at least one object of
|
||||
// type other than REGULAR is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object storage container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||
// (for trusted object preparation) session private key does not exist or
|
||||
// has
|
||||
//
|
||||
// been deleted;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
PutSingle(ctx context.Context, in *PutSingleRequest, opts ...grpc.CallOption) (*PutSingleResponse, error)
|
||||
}
|
||||
|
||||
type objectServiceClient struct {
|
||||
|
@ -466,25 +410,16 @@ func (c *objectServiceClient) GetRangeHash(ctx context.Context, in *GetRangeHash
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectServiceClient) PutSingle(ctx context.Context, in *PutSingleRequest, opts ...grpc.CallOption) (*PutSingleResponse, error) {
|
||||
out := new(PutSingleResponse)
|
||||
err := c.cc.Invoke(ctx, ObjectService_PutSingle_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ObjectServiceServer is the server API for ObjectService service.
|
||||
// All implementations should embed UnimplementedObjectServiceServer
|
||||
// for forward compatibility
|
||||
type ObjectServiceServer interface {
|
||||
// Receive full object structure, including Headers and payload. Response uses
|
||||
// gRPC stream. First response message carries the object with the requested
|
||||
// address. Chunk messages are parts of the object's payload if it is needed.
|
||||
// All messages, except the first one, carry payload chunks. The requested
|
||||
// object can be restored by concatenation of object message payload and all
|
||||
// chunks keeping the receiving order.
|
||||
// gRPC stream. First response message carries the object with the requested address.
|
||||
// Chunk messages are parts of the object's payload if it is needed. All
|
||||
// messages, except the first one, carry payload chunks. The requested object can
|
||||
// be restored by concatenation of object message payload and all chunks
|
||||
// keeping the receiving order.
|
||||
//
|
||||
// Extended headers can change `Get` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH ] \
|
||||
|
@ -493,10 +428,9 @@ type ObjectServiceServer interface {
|
|||
// calculation.
|
||||
// - [ __SYSTEM__NETMAP_LOOKUP_DEPTH ] \
|
||||
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
|
||||
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH`
|
||||
// (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or the latest one
|
||||
// otherwise) of Network Map to find an object until the depth limit is
|
||||
// reached.
|
||||
// Will try older versions (starting from `__SYSTEM__NETMAP_EPOCH` (`__NEOFS__NETMAP_EPOCH` is deprecated) if specified or
|
||||
// the latest one otherwise) of Network Map to find an object until the depth
|
||||
// limit is reached.
|
||||
//
|
||||
// Please refer to detailed `XHeader` description.
|
||||
//
|
||||
|
@ -512,8 +446,6 @@ type ObjectServiceServer interface {
|
|||
// the requested object has been marked as deleted;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Get(*GetRequest, ObjectService_GetServer) error
|
||||
|
@ -539,18 +471,15 @@ type ObjectServiceServer interface {
|
|||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// write access to the container is denied;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// placement of an object of type TOMBSTONE that includes at least one
|
||||
// locked object is prohibited;
|
||||
// placement of an object of type TOMBSTONE that includes at least one locked
|
||||
// object is prohibited;
|
||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||
// placement of an object of type LOCK that includes at least one object of
|
||||
// type other than REGULAR is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object storage container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||
// (for trusted object preparation) session private key does not exist or
|
||||
// has
|
||||
// (for trusted object preparation) session private key does not exist or has
|
||||
//
|
||||
// been deleted;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
|
@ -573,15 +502,10 @@ type ObjectServiceServer interface {
|
|||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// delete access to the object is denied;
|
||||
// - **OBJECT_NOT_FOUND** (2049, SECTION_OBJECT): \
|
||||
// the object could not be deleted because it has not been \
|
||||
// found within the container;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// deleting a locked object is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
||||
|
@ -609,8 +533,6 @@ type ObjectServiceServer interface {
|
|||
// the requested object has been marked as deleted;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Head(context.Context, *HeadRequest) (*HeadResponse, error)
|
||||
|
@ -634,15 +556,13 @@ type ObjectServiceServer interface {
|
|||
// access to operation SEARCH of the object is denied;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// search container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
Search(*SearchRequest, ObjectService_SearchServer) error
|
||||
// Get byte range of data payload. Range is set as an (offset, length) tuple.
|
||||
// Like in `Get` method, the response uses gRPC stream. Requested range can be
|
||||
// restored by concatenation of all received payload chunks keeping the
|
||||
// receiving order.
|
||||
// restored by concatenation of all received payload chunks keeping the receiving
|
||||
// order.
|
||||
//
|
||||
// Extended headers can change `GetRange` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH ] \
|
||||
|
@ -670,8 +590,6 @@ type ObjectServiceServer interface {
|
|||
// the requested range is out of bounds;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
GetRange(*GetRangeRequest, ObjectService_GetRangeServer) error
|
||||
|
@ -704,47 +622,9 @@ type ObjectServiceServer interface {
|
|||
// the requested range is out of bounds;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
GetRangeHash(context.Context, *GetRangeHashRequest) (*GetRangeHashResponse, error)
|
||||
// Put the prepared object into container.
|
||||
// `ContainerID`, `ObjectID`, `OwnerID`, `PayloadHash` and `PayloadLength` of
|
||||
// an object MUST be set.
|
||||
//
|
||||
// Extended headers can change `Put` behaviour:
|
||||
// - [ __SYSTEM__NETMAP_EPOCH \
|
||||
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
|
||||
// Will use the requested version of Network Map for object placement
|
||||
// calculation.
|
||||
//
|
||||
// Please refer to detailed `XHeader` description.
|
||||
//
|
||||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS): \
|
||||
// object has been successfully saved in the container;
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **ACCESS_DENIED** (2048, SECTION_OBJECT): \
|
||||
// write access to the container is denied;
|
||||
// - **LOCKED** (2050, SECTION_OBJECT): \
|
||||
// placement of an object of type TOMBSTONE that includes at least one
|
||||
// locked object is prohibited;
|
||||
// - **LOCK_NON_REGULAR_OBJECT** (2051, SECTION_OBJECT): \
|
||||
// placement of an object of type LOCK that includes at least one object of
|
||||
// type other than REGULAR is prohibited;
|
||||
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
|
||||
// object storage container not found;
|
||||
// - **CONTAINER_ACCESS_DENIED** (3074, SECTION_CONTAINER): \
|
||||
// access to container is denied;
|
||||
// - **TOKEN_NOT_FOUND** (4096, SECTION_SESSION): \
|
||||
// (for trusted object preparation) session private key does not exist or
|
||||
// has
|
||||
//
|
||||
// been deleted;
|
||||
// - **TOKEN_EXPIRED** (4097, SECTION_SESSION): \
|
||||
// provided session token has expired.
|
||||
PutSingle(context.Context, *PutSingleRequest) (*PutSingleResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedObjectServiceServer should be embedded to have forward compatible implementations.
|
||||
|
@ -772,9 +652,6 @@ func (UnimplementedObjectServiceServer) GetRange(*GetRangeRequest, ObjectService
|
|||
func (UnimplementedObjectServiceServer) GetRangeHash(context.Context, *GetRangeHashRequest) (*GetRangeHashResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRangeHash not implemented")
|
||||
}
|
||||
func (UnimplementedObjectServiceServer) PutSingle(context.Context, *PutSingleRequest) (*PutSingleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PutSingle not implemented")
|
||||
}
|
||||
|
||||
// UnsafeObjectServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ObjectServiceServer will
|
||||
|
@ -930,24 +807,6 @@ func _ObjectService_GetRangeHash_Handler(srv interface{}, ctx context.Context, d
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectService_PutSingle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PutSingleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectServiceServer).PutSingle(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectService_PutSingle_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectServiceServer).PutSingle(ctx, req.(*PutSingleRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ObjectService_ServiceDesc is the grpc.ServiceDesc for ObjectService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -967,10 +826,6 @@ var ObjectService_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetRangeHash",
|
||||
Handler: _ObjectService_GetRangeHash_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PutSingle",
|
||||
Handler: _ObjectService_PutSingle_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
|
|
568
object/grpc/types.pb.go
generated
568
object/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: object/grpc/types.proto
|
||||
|
||||
package object
|
||||
|
@ -23,12 +23,13 @@ const (
|
|||
)
|
||||
|
||||
// Type of the object payload content. Only `REGULAR` type objects can be split,
|
||||
// hence `TOMBSTONE` and `LOCK` payload is limited by the
|
||||
// maximum object size.
|
||||
// hence `TOMBSTONE`, `STORAGE_GROUP` and `LOCK` payload is limited by the maximum
|
||||
// object size.
|
||||
//
|
||||
// String presentation of object type is the same as definition:
|
||||
// * REGULAR
|
||||
// * TOMBSTONE
|
||||
// * STORAGE_GROUP
|
||||
// * LOCK
|
||||
type ObjectType int32
|
||||
|
||||
|
@ -37,6 +38,8 @@ const (
|
|||
ObjectType_REGULAR ObjectType = 0
|
||||
// Used internally to identify deleted objects
|
||||
ObjectType_TOMBSTONE ObjectType = 1
|
||||
// StorageGroup information
|
||||
ObjectType_STORAGE_GROUP ObjectType = 2
|
||||
// Object lock
|
||||
ObjectType_LOCK ObjectType = 3
|
||||
)
|
||||
|
@ -46,12 +49,14 @@ var (
|
|||
ObjectType_name = map[int32]string{
|
||||
0: "REGULAR",
|
||||
1: "TOMBSTONE",
|
||||
2: "STORAGE_GROUP",
|
||||
3: "LOCK",
|
||||
}
|
||||
ObjectType_value = map[string]int32{
|
||||
"REGULAR": 0,
|
||||
"TOMBSTONE": 1,
|
||||
"LOCK": 3,
|
||||
"REGULAR": 0,
|
||||
"TOMBSTONE": 1,
|
||||
"STORAGE_GROUP": 2,
|
||||
"LOCK": 3,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -279,8 +284,6 @@ type Header struct {
|
|||
Attributes []*Header_Attribute `protobuf:"bytes,10,rep,name=attributes,proto3" json:"attributes,omitempty"`
|
||||
// Position of the object in the split hierarchy
|
||||
Split *Header_Split `protobuf:"bytes,11,opt,name=split,proto3" json:"split,omitempty"`
|
||||
// Erasure code chunk information.
|
||||
Ec *Header_EC `protobuf:"bytes,12,opt,name=ec,proto3" json:"ec,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Header) Reset() {
|
||||
|
@ -392,16 +395,9 @@ func (x *Header) GetSplit() *Header_Split {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *Header) GetEc() *Header_EC {
|
||||
if x != nil {
|
||||
return x.Ec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Object structure. Object is immutable and content-addressed. It means
|
||||
// `ObjectID` will change if the header or the payload changes. It's calculated
|
||||
// as a hash of header field which contains hash of the object's payload.
|
||||
// `ObjectID` will change if the header or the payload changes. It's calculated as a
|
||||
// hash of header field which contains hash of the object's payload.
|
||||
//
|
||||
// For non-regular object types payload format depends on object type specified
|
||||
// in the header.
|
||||
|
@ -482,8 +478,8 @@ func (x *Object) GetPayload() []byte {
|
|||
|
||||
// Meta information of split hierarchy for object assembly. With the last part
|
||||
// one can traverse linked list of split hierarchy back to the first part and
|
||||
// assemble the original object. With a linking object one can assemble an
|
||||
// object right from the object parts.
|
||||
// assemble the original object. With a linking object one can assemble an object
|
||||
// right from the object parts.
|
||||
type SplitInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -553,55 +549,6 @@ func (x *SplitInfo) GetLink() *grpc.ObjectID {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Meta information for the erasure-encoded object.
|
||||
type ECInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Chunk stored on the node.
|
||||
Chunks []*ECInfo_Chunk `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ECInfo) Reset() {
|
||||
*x = ECInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ECInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ECInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ECInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ECInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ECInfo) Descriptor() ([]byte, []int) {
|
||||
return file_object_grpc_types_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ECInfo) GetChunks() []*ECInfo_Chunk {
|
||||
if x != nil {
|
||||
return x.Chunks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// `Attribute` is a user-defined Key-Value metadata pair attached to an
|
||||
// object.
|
||||
//
|
||||
|
@ -609,16 +556,15 @@ func (x *ECInfo) GetChunks() []*ECInfo_Chunk {
|
|||
// Objects with duplicated attribute names or attributes with empty values
|
||||
// will be considered invalid.
|
||||
//
|
||||
// There are some "well-known" attributes starting with `__SYSTEM__`
|
||||
// (`__NEOFS__` is deprecated) prefix that affect system behaviour:
|
||||
// There are some "well-known" attributes starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix
|
||||
// that affect system behaviour:
|
||||
//
|
||||
// - [ __SYSTEM__UPLOAD_ID ] \
|
||||
// (`__NEOFS__UPLOAD_ID` is deprecated) \
|
||||
// Marks smaller parts of a split bigger object
|
||||
// - [ __SYSTEM__EXPIRATION_EPOCH ] \
|
||||
// (`__NEOFS__EXPIRATION_EPOCH` is deprecated) \
|
||||
// The epoch after which object with no LOCKs on it becomes unavailable.
|
||||
// Locked object continues to be available until each of the LOCKs expire.
|
||||
// Tells GC to delete object after that epoch
|
||||
// - [ __SYSTEM__TICK_EPOCH ] \
|
||||
// (`__NEOFS__TICK_EPOCH` is deprecated) \
|
||||
// Decimal number that defines what epoch must produce
|
||||
|
@ -663,7 +609,7 @@ type Header_Attribute struct {
|
|||
func (x *Header_Attribute) Reset() {
|
||||
*x = Header_Attribute{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[5]
|
||||
mi := &file_object_grpc_types_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -676,7 +622,7 @@ func (x *Header_Attribute) String() string {
|
|||
func (*Header_Attribute) ProtoMessage() {}
|
||||
|
||||
func (x *Header_Attribute) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[5]
|
||||
mi := &file_object_grpc_types_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -734,7 +680,7 @@ type Header_Split struct {
|
|||
func (x *Header_Split) Reset() {
|
||||
*x = Header_Split{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[6]
|
||||
mi := &file_object_grpc_types_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -747,7 +693,7 @@ func (x *Header_Split) String() string {
|
|||
func (*Header_Split) ProtoMessage() {}
|
||||
|
||||
func (x *Header_Split) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[6]
|
||||
mi := &file_object_grpc_types_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -805,190 +751,6 @@ func (x *Header_Split) GetSplitId() []byte {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Erasure code can be applied to any object.
|
||||
// Information about encoded object structure is stored in `EC` header.
|
||||
// All objects belonging to a single EC group have the same `parent` field.
|
||||
type Header_EC struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Identifier of the origin object. Known to all chunks.
|
||||
Parent *grpc.ObjectID `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
|
||||
// Index of this chunk.
|
||||
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
|
||||
// Total number of chunks in this split.
|
||||
Total uint32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
|
||||
// Total length of a parent header. Used to trim padding zeroes.
|
||||
HeaderLength uint32 `protobuf:"varint,4,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"`
|
||||
// Chunk of a parent header.
|
||||
Header []byte `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"`
|
||||
// As the origin object is EC-splitted its identifier is known to all
|
||||
// chunks as parent. But parent itself can be a part of Split (does not relate to EC-split).
|
||||
// In this case parent_split_id should be set.
|
||||
ParentSplitId []byte `protobuf:"bytes,6,opt,name=parent_split_id,json=parentSplitID,proto3" json:"parent_split_id,omitempty"`
|
||||
// EC-parent's parent ID. parent_split_parent_id is set if EC-parent, itself, is a part of Split and
|
||||
// if an object ID of its parent is presented. The field allows to determine how EC-chunk is placed
|
||||
// in Split hierarchy.
|
||||
ParentSplitParentId *grpc.ObjectID `protobuf:"bytes,7,opt,name=parent_split_parent_id,json=parentSplitParentID,proto3" json:"parent_split_parent_id,omitempty"`
|
||||
// EC parent's attributes.
|
||||
ParentAttributes []*Header_Attribute `protobuf:"bytes,8,rep,name=parent_attributes,json=parentAttributes,proto3" json:"parent_attributes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Header_EC) Reset() {
|
||||
*x = Header_EC{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Header_EC) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Header_EC) ProtoMessage() {}
|
||||
|
||||
func (x *Header_EC) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Header_EC.ProtoReflect.Descriptor instead.
|
||||
func (*Header_EC) Descriptor() ([]byte, []int) {
|
||||
return file_object_grpc_types_proto_rawDescGZIP(), []int{1, 2}
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetParent() *grpc.ObjectID {
|
||||
if x != nil {
|
||||
return x.Parent
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetTotal() uint32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetHeaderLength() uint32 {
|
||||
if x != nil {
|
||||
return x.HeaderLength
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetHeader() []byte {
|
||||
if x != nil {
|
||||
return x.Header
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetParentSplitId() []byte {
|
||||
if x != nil {
|
||||
return x.ParentSplitId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetParentSplitParentId() *grpc.ObjectID {
|
||||
if x != nil {
|
||||
return x.ParentSplitParentId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Header_EC) GetParentAttributes() []*Header_Attribute {
|
||||
if x != nil {
|
||||
return x.ParentAttributes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ECInfo_Chunk struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Object ID of the chunk.
|
||||
Id *grpc.ObjectID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// Index of the chunk.
|
||||
Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
|
||||
// Total number of chunks in this split.
|
||||
Total uint32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ECInfo_Chunk) Reset() {
|
||||
*x = ECInfo_Chunk{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ECInfo_Chunk) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ECInfo_Chunk) ProtoMessage() {}
|
||||
|
||||
func (x *ECInfo_Chunk) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_object_grpc_types_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ECInfo_Chunk.ProtoReflect.Descriptor instead.
|
||||
func (*ECInfo_Chunk) Descriptor() ([]byte, []int) {
|
||||
return file_object_grpc_types_proto_rawDescGZIP(), []int{4, 0}
|
||||
}
|
||||
|
||||
func (x *ECInfo_Chunk) GetId() *grpc.ObjectID {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ECInfo_Chunk) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ECInfo_Chunk) GetTotal() uint32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_object_grpc_types_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_object_grpc_types_proto_rawDesc = []byte{
|
||||
|
@ -1022,7 +784,7 @@ var file_object_grpc_types_proto_rawDesc = []byte{
|
|||
0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75,
|
||||
0x6d, 0x52, 0x0f, 0x68, 0x6f, 0x6d, 0x6f, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x69, 0x63, 0x48, 0x61,
|
||||
0x73, 0x68, 0x22, 0x92, 0x0b, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a,
|
||||
0x73, 0x68, 0x22, 0xfb, 0x07, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a,
|
||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
|
@ -1062,105 +824,70 @@ var file_object_grpc_types_proto_rawDesc = []byte{
|
|||
0x05, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e,
|
||||
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e,
|
||||
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x52, 0x05, 0x73, 0x70,
|
||||
0x6c, 0x69, 0x74, 0x12, 0x2b, 0x0a, 0x02, 0x65, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x43, 0x52, 0x02, 0x65, 0x63,
|
||||
0x1a, 0x33, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xc5, 0x02, 0x0a, 0x05, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x12,
|
||||
0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73,
|
||||
0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x70,
|
||||
0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65,
|
||||
0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0f, 0x70, 0x61,
|
||||
0x72, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3d, 0x0a,
|
||||
0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0c,
|
||||
0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08,
|
||||
0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
|
||||
0x6c, 0x69, 0x74, 0x1a, 0x33, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xc5, 0x02, 0x0a, 0x05, 0x53, 0x70, 0x6c,
|
||||
0x69, 0x74, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72,
|
||||
0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x06, 0x70, 0x61,
|
||||
0x72, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44,
|
||||
0x52, 0x08, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x12, 0x44, 0x0a, 0x10, 0x70, 0x61,
|
||||
0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52,
|
||||
0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x12, 0x3d, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12,
|
||||
0x34, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65,
|
||||
0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x63, 0x68, 0x69,
|
||||
0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x44,
|
||||
0x22, 0xc4, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
|
||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
||||
0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72,
|
||||
0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x44, 0x1a, 0xe7, 0x02,
|
||||
0x0a, 0x02, 0x45, 0x43, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x06,
|
||||
0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x6e,
|
||||
0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12,
|
||||
0x26, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
||||
0x53, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x44, 0x12, 0x4d, 0x0a, 0x16, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49,
|
||||
0x44, 0x52, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61,
|
||||
0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x4f, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
||||
0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74,
|
||||
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x49, 0x44, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
|
||||
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x68,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65,
|
||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x70, 0x6c, 0x69,
|
||||
0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x64,
|
||||
0x12, 0x35, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52,
|
||||
0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e,
|
||||
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
|
||||
0x72, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65,
|
||||
0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8b,
|
||||
0x01, 0x0a, 0x09, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08,
|
||||
0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07,
|
||||
0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f,
|
||||
0x70, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x12, 0x2c,
|
||||
0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e,
|
||||
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x9f, 0x01, 0x0a,
|
||||
0x06, 0x45, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x43, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x1a,
|
||||
0x5d, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x28, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
|
||||
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2a, 0x32,
|
||||
0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d,
|
||||
0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x43, 0x4b,
|
||||
0x10, 0x03, 0x2a, 0x73, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53,
|
||||
0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41,
|
||||
0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45,
|
||||
0x4e, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x5f, 0x50,
|
||||
0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x04, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66,
|
||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65,
|
||||
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
|
||||
0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a,
|
||||
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x41, 0x50, 0x49, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x2a, 0x45, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12,
|
||||
0x11, 0x0a, 0x0d, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50,
|
||||
0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x73, 0x0a, 0x09,
|
||||
0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54,
|
||||
0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
|
||||
0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f,
|
||||
0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x52, 0x49, 0x4e,
|
||||
0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a,
|
||||
0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x11,
|
||||
0x0a, 0x0d, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x10,
|
||||
0x04, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
|
||||
0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c,
|
||||
0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67,
|
||||
0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63,
|
||||
0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69,
|
||||
0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x4f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1176,7 +903,7 @@ func file_object_grpc_types_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_object_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_object_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_object_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_object_grpc_types_proto_goTypes = []interface{}{
|
||||
(ObjectType)(0), // 0: neo.fs.v2.object.ObjectType
|
||||
(MatchType)(0), // 1: neo.fs.v2.object.MatchType
|
||||
|
@ -1184,55 +911,46 @@ var file_object_grpc_types_proto_goTypes = []interface{}{
|
|||
(*Header)(nil), // 3: neo.fs.v2.object.Header
|
||||
(*Object)(nil), // 4: neo.fs.v2.object.Object
|
||||
(*SplitInfo)(nil), // 5: neo.fs.v2.object.SplitInfo
|
||||
(*ECInfo)(nil), // 6: neo.fs.v2.object.ECInfo
|
||||
(*Header_Attribute)(nil), // 7: neo.fs.v2.object.Header.Attribute
|
||||
(*Header_Split)(nil), // 8: neo.fs.v2.object.Header.Split
|
||||
(*Header_EC)(nil), // 9: neo.fs.v2.object.Header.EC
|
||||
(*ECInfo_Chunk)(nil), // 10: neo.fs.v2.object.ECInfo.Chunk
|
||||
(*grpc.Version)(nil), // 11: neo.fs.v2.refs.Version
|
||||
(*grpc.OwnerID)(nil), // 12: neo.fs.v2.refs.OwnerID
|
||||
(*grpc.Checksum)(nil), // 13: neo.fs.v2.refs.Checksum
|
||||
(*grpc.ContainerID)(nil), // 14: neo.fs.v2.refs.ContainerID
|
||||
(*grpc1.SessionToken)(nil), // 15: neo.fs.v2.session.SessionToken
|
||||
(*grpc.ObjectID)(nil), // 16: neo.fs.v2.refs.ObjectID
|
||||
(*grpc.Signature)(nil), // 17: neo.fs.v2.refs.Signature
|
||||
(*Header_Attribute)(nil), // 6: neo.fs.v2.object.Header.Attribute
|
||||
(*Header_Split)(nil), // 7: neo.fs.v2.object.Header.Split
|
||||
(*grpc.Version)(nil), // 8: neo.fs.v2.refs.Version
|
||||
(*grpc.OwnerID)(nil), // 9: neo.fs.v2.refs.OwnerID
|
||||
(*grpc.Checksum)(nil), // 10: neo.fs.v2.refs.Checksum
|
||||
(*grpc.ContainerID)(nil), // 11: neo.fs.v2.refs.ContainerID
|
||||
(*grpc1.SessionToken)(nil), // 12: neo.fs.v2.session.SessionToken
|
||||
(*grpc.ObjectID)(nil), // 13: neo.fs.v2.refs.ObjectID
|
||||
(*grpc.Signature)(nil), // 14: neo.fs.v2.refs.Signature
|
||||
}
|
||||
var file_object_grpc_types_proto_depIdxs = []int32{
|
||||
11, // 0: neo.fs.v2.object.ShortHeader.version:type_name -> neo.fs.v2.refs.Version
|
||||
12, // 1: neo.fs.v2.object.ShortHeader.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
8, // 0: neo.fs.v2.object.ShortHeader.version:type_name -> neo.fs.v2.refs.Version
|
||||
9, // 1: neo.fs.v2.object.ShortHeader.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
0, // 2: neo.fs.v2.object.ShortHeader.object_type:type_name -> neo.fs.v2.object.ObjectType
|
||||
13, // 3: neo.fs.v2.object.ShortHeader.payload_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
13, // 4: neo.fs.v2.object.ShortHeader.homomorphic_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
11, // 5: neo.fs.v2.object.Header.version:type_name -> neo.fs.v2.refs.Version
|
||||
14, // 6: neo.fs.v2.object.Header.container_id:type_name -> neo.fs.v2.refs.ContainerID
|
||||
12, // 7: neo.fs.v2.object.Header.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
13, // 8: neo.fs.v2.object.Header.payload_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
10, // 3: neo.fs.v2.object.ShortHeader.payload_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
10, // 4: neo.fs.v2.object.ShortHeader.homomorphic_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
8, // 5: neo.fs.v2.object.Header.version:type_name -> neo.fs.v2.refs.Version
|
||||
11, // 6: neo.fs.v2.object.Header.container_id:type_name -> neo.fs.v2.refs.ContainerID
|
||||
9, // 7: neo.fs.v2.object.Header.owner_id:type_name -> neo.fs.v2.refs.OwnerID
|
||||
10, // 8: neo.fs.v2.object.Header.payload_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
0, // 9: neo.fs.v2.object.Header.object_type:type_name -> neo.fs.v2.object.ObjectType
|
||||
13, // 10: neo.fs.v2.object.Header.homomorphic_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
15, // 11: neo.fs.v2.object.Header.session_token:type_name -> neo.fs.v2.session.SessionToken
|
||||
7, // 12: neo.fs.v2.object.Header.attributes:type_name -> neo.fs.v2.object.Header.Attribute
|
||||
8, // 13: neo.fs.v2.object.Header.split:type_name -> neo.fs.v2.object.Header.Split
|
||||
9, // 14: neo.fs.v2.object.Header.ec:type_name -> neo.fs.v2.object.Header.EC
|
||||
16, // 15: neo.fs.v2.object.Object.object_id:type_name -> neo.fs.v2.refs.ObjectID
|
||||
17, // 16: neo.fs.v2.object.Object.signature:type_name -> neo.fs.v2.refs.Signature
|
||||
3, // 17: neo.fs.v2.object.Object.header:type_name -> neo.fs.v2.object.Header
|
||||
16, // 18: neo.fs.v2.object.SplitInfo.last_part:type_name -> neo.fs.v2.refs.ObjectID
|
||||
16, // 19: neo.fs.v2.object.SplitInfo.link:type_name -> neo.fs.v2.refs.ObjectID
|
||||
10, // 20: neo.fs.v2.object.ECInfo.chunks:type_name -> neo.fs.v2.object.ECInfo.Chunk
|
||||
16, // 21: neo.fs.v2.object.Header.Split.parent:type_name -> neo.fs.v2.refs.ObjectID
|
||||
16, // 22: neo.fs.v2.object.Header.Split.previous:type_name -> neo.fs.v2.refs.ObjectID
|
||||
17, // 23: neo.fs.v2.object.Header.Split.parent_signature:type_name -> neo.fs.v2.refs.Signature
|
||||
3, // 24: neo.fs.v2.object.Header.Split.parent_header:type_name -> neo.fs.v2.object.Header
|
||||
16, // 25: neo.fs.v2.object.Header.Split.children:type_name -> neo.fs.v2.refs.ObjectID
|
||||
16, // 26: neo.fs.v2.object.Header.EC.parent:type_name -> neo.fs.v2.refs.ObjectID
|
||||
16, // 27: neo.fs.v2.object.Header.EC.parent_split_parent_id:type_name -> neo.fs.v2.refs.ObjectID
|
||||
7, // 28: neo.fs.v2.object.Header.EC.parent_attributes:type_name -> neo.fs.v2.object.Header.Attribute
|
||||
16, // 29: neo.fs.v2.object.ECInfo.Chunk.id:type_name -> neo.fs.v2.refs.ObjectID
|
||||
30, // [30:30] is the sub-list for method output_type
|
||||
30, // [30:30] is the sub-list for method input_type
|
||||
30, // [30:30] is the sub-list for extension type_name
|
||||
30, // [30:30] is the sub-list for extension extendee
|
||||
0, // [0:30] is the sub-list for field type_name
|
||||
10, // 10: neo.fs.v2.object.Header.homomorphic_hash:type_name -> neo.fs.v2.refs.Checksum
|
||||
12, // 11: neo.fs.v2.object.Header.session_token:type_name -> neo.fs.v2.session.SessionToken
|
||||
6, // 12: neo.fs.v2.object.Header.attributes:type_name -> neo.fs.v2.object.Header.Attribute
|
||||
7, // 13: neo.fs.v2.object.Header.split:type_name -> neo.fs.v2.object.Header.Split
|
||||
13, // 14: neo.fs.v2.object.Object.object_id:type_name -> neo.fs.v2.refs.ObjectID
|
||||
14, // 15: neo.fs.v2.object.Object.signature:type_name -> neo.fs.v2.refs.Signature
|
||||
3, // 16: neo.fs.v2.object.Object.header:type_name -> neo.fs.v2.object.Header
|
||||
13, // 17: neo.fs.v2.object.SplitInfo.last_part:type_name -> neo.fs.v2.refs.ObjectID
|
||||
13, // 18: neo.fs.v2.object.SplitInfo.link:type_name -> neo.fs.v2.refs.ObjectID
|
||||
13, // 19: neo.fs.v2.object.Header.Split.parent:type_name -> neo.fs.v2.refs.ObjectID
|
||||
13, // 20: neo.fs.v2.object.Header.Split.previous:type_name -> neo.fs.v2.refs.ObjectID
|
||||
14, // 21: neo.fs.v2.object.Header.Split.parent_signature:type_name -> neo.fs.v2.refs.Signature
|
||||
3, // 22: neo.fs.v2.object.Header.Split.parent_header:type_name -> neo.fs.v2.object.Header
|
||||
13, // 23: neo.fs.v2.object.Header.Split.children:type_name -> neo.fs.v2.refs.ObjectID
|
||||
24, // [24:24] is the sub-list for method output_type
|
||||
24, // [24:24] is the sub-list for method input_type
|
||||
24, // [24:24] is the sub-list for extension type_name
|
||||
24, // [24:24] is the sub-list for extension extendee
|
||||
0, // [0:24] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_object_grpc_types_proto_init() }
|
||||
|
@ -1290,18 +1008,6 @@ func file_object_grpc_types_proto_init() {
|
|||
}
|
||||
}
|
||||
file_object_grpc_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ECInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_object_grpc_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Header_Attribute); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1313,7 +1019,7 @@ func file_object_grpc_types_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_object_grpc_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_object_grpc_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Header_Split); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -1325,30 +1031,6 @@ func file_object_grpc_types_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_object_grpc_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Header_EC); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_object_grpc_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ECInfo_Chunk); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -1356,7 +1038,7 @@ func file_object_grpc_types_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_object_grpc_types_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 9,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -61,22 +61,6 @@ func (s *SplitInfo) UnmarshalJSON(data []byte) error {
|
|||
return message.UnmarshalJSON(s, data, new(object.SplitInfo))
|
||||
}
|
||||
|
||||
func (e *ECInfo) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(e)
|
||||
}
|
||||
|
||||
func (e *ECInfo) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(e, data, new(object.ECInfo))
|
||||
}
|
||||
|
||||
func (e *ECChunk) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(e)
|
||||
}
|
||||
|
||||
func (e *ECChunk) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(e, data, new(object.ECInfo_Chunk))
|
||||
}
|
||||
|
||||
func (f *SearchFilter) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(f)
|
||||
}
|
||||
|
|
|
@ -26,15 +26,6 @@ const (
|
|||
splitHdrChildrenField = 5
|
||||
splitHdrSplitIDField = 6
|
||||
|
||||
ecHdrParentField = 1
|
||||
ecHdrIndexField = 2
|
||||
ecHdrTotalField = 3
|
||||
ecHdrHeaderLengthField = 4
|
||||
ecHdrHeaderField = 5
|
||||
ecHdrParentSplitID = 6
|
||||
ecHdrParentSplitParentID = 7
|
||||
ecHdrParentAttributes = 8
|
||||
|
||||
hdrVersionField = 1
|
||||
hdrContainerIDField = 2
|
||||
hdrOwnerIDField = 3
|
||||
|
@ -46,7 +37,6 @@ const (
|
|||
hdrSessionTokenField = 9
|
||||
hdrAttributesField = 10
|
||||
hdrSplitField = 11
|
||||
hdrECField = 12
|
||||
|
||||
hdrWithSigHeaderField = 1
|
||||
hdrWithSigSignatureField = 2
|
||||
|
@ -60,12 +50,6 @@ const (
|
|||
splitInfoLastPartField = 2
|
||||
splitInfoLinkField = 3
|
||||
|
||||
ecInfoChunksField = 1
|
||||
|
||||
ecChunkIDField = 1
|
||||
ecChunkIndexField = 2
|
||||
ecChunkTotalField = 3
|
||||
|
||||
getReqBodyAddressField = 1
|
||||
getReqBodyRawFlagField = 2
|
||||
|
||||
|
@ -76,7 +60,6 @@ const (
|
|||
getRespBodyInitField = 1
|
||||
getRespBodyChunkField = 2
|
||||
getRespBodySplitInfoField = 3
|
||||
getRespBodyECInfoField = 4
|
||||
|
||||
putReqInitObjectIDField = 1
|
||||
putReqInitSignatureField = 2
|
||||
|
@ -99,7 +82,6 @@ const (
|
|||
headRespBodyHeaderField = 1
|
||||
headRespBodyShortHeaderField = 2
|
||||
headRespBodySplitInfoField = 3
|
||||
headRespBodyECInfoField = 4
|
||||
|
||||
searchFilterMatchField = 1
|
||||
searchFilterNameField = 2
|
||||
|
@ -120,7 +102,6 @@ const (
|
|||
|
||||
getRangeRespChunkField = 1
|
||||
getRangeRespSplitInfoField = 2
|
||||
getRangeRespECInfoField = 3
|
||||
|
||||
getRangeHashReqBodyAddressField = 1
|
||||
getRangeHashReqBodyRangesField = 2
|
||||
|
@ -129,9 +110,6 @@ const (
|
|||
|
||||
getRangeHashRespBodyTypeField = 1
|
||||
getRangeHashRespBodyHashListField = 2
|
||||
|
||||
putSingleReqObjectField = 1
|
||||
putSingleReqCopiesNumberField = 2
|
||||
)
|
||||
|
||||
func (h *ShortHeader) StableMarshal(buf []byte) []byte {
|
||||
|
@ -248,53 +226,6 @@ func (h *SplitHeader) Unmarshal(data []byte) error {
|
|||
return message.Unmarshal(h, data, new(object.Header_Split))
|
||||
}
|
||||
|
||||
func (h *ECHeader) StableMarshal(buf []byte) []byte {
|
||||
if h == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, h.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.NestedStructureMarshal(ecHdrParentField, buf[offset:], h.Parent)
|
||||
offset += proto.UInt32Marshal(ecHdrIndexField, buf[offset:], h.Index)
|
||||
offset += proto.UInt32Marshal(ecHdrTotalField, buf[offset:], h.Total)
|
||||
offset += proto.UInt32Marshal(ecHdrHeaderLengthField, buf[offset:], h.HeaderLength)
|
||||
offset += proto.BytesMarshal(ecHdrHeaderField, buf[offset:], h.Header)
|
||||
offset += proto.BytesMarshal(ecHdrParentSplitID, buf[offset:], h.ParentSplitID)
|
||||
offset += proto.NestedStructureMarshal(ecHdrParentSplitParentID, buf[offset:], h.ParentSplitParentID)
|
||||
for i := range h.ParentAttributes {
|
||||
offset += proto.NestedStructureMarshal(ecHdrParentAttributes, buf[offset:], &h.ParentAttributes[i])
|
||||
}
|
||||
return buf
|
||||
}
|
||||
|
||||
func (h *ECHeader) StableSize() (size int) {
|
||||
if h == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(ecHdrParentField, h.Parent)
|
||||
size += proto.UInt32Size(ecHdrIndexField, h.Index)
|
||||
size += proto.UInt32Size(ecHdrTotalField, h.Total)
|
||||
size += proto.UInt32Size(ecHdrHeaderLengthField, h.HeaderLength)
|
||||
size += proto.BytesSize(ecHdrHeaderField, h.Header)
|
||||
size += proto.BytesSize(ecHdrParentSplitID, h.ParentSplitID)
|
||||
size += proto.NestedStructureSize(ecHdrParentSplitParentID, h.ParentSplitParentID)
|
||||
for i := range h.ParentAttributes {
|
||||
size += proto.NestedStructureSize(ecHdrParentAttributes, &h.ParentAttributes[i])
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (h *ECHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(h, data, new(object.Header_EC))
|
||||
}
|
||||
|
||||
func (h *Header) StableMarshal(buf []byte) []byte {
|
||||
if h == nil {
|
||||
return []byte{}
|
||||
|
@ -321,7 +252,6 @@ func (h *Header) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
proto.NestedStructureMarshal(hdrSplitField, buf[offset:], h.split)
|
||||
proto.NestedStructureMarshal(hdrECField, buf[offset:], h.ec)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
@ -344,7 +274,6 @@ func (h *Header) StableSize() (size int) {
|
|||
size += proto.NestedStructureSize(hdrAttributesField, &h.attr[i])
|
||||
}
|
||||
size += proto.NestedStructureSize(hdrSplitField, h.split)
|
||||
size += proto.NestedStructureSize(hdrECField, h.ec)
|
||||
|
||||
return size
|
||||
}
|
||||
|
@ -390,14 +319,6 @@ func (o *Object) StableMarshal(buf []byte) []byte {
|
|||
return []byte{}
|
||||
}
|
||||
|
||||
if o.marshalData != nil {
|
||||
if buf == nil {
|
||||
return o.marshalData
|
||||
}
|
||||
copy(buf, o.marshalData)
|
||||
return buf
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, o.StableSize())
|
||||
}
|
||||
|
@ -412,16 +333,6 @@ func (o *Object) StableMarshal(buf []byte) []byte {
|
|||
return buf
|
||||
}
|
||||
|
||||
// SetMarshalData sets marshal data to reduce memory allocations.
|
||||
//
|
||||
// It is unsafe to modify/copy object data after setting marshal data.
|
||||
func (o *Object) SetMarshalData(data []byte) {
|
||||
if o == nil {
|
||||
return
|
||||
}
|
||||
o.marshalData = data
|
||||
}
|
||||
|
||||
func (o *Object) StableSize() (size int) {
|
||||
if o == nil {
|
||||
return 0
|
||||
|
@ -473,74 +384,6 @@ func (s *SplitInfo) Unmarshal(data []byte) error {
|
|||
return message.Unmarshal(s, data, new(object.SplitInfo))
|
||||
}
|
||||
|
||||
func (e *ECInfo) StableMarshal(buf []byte) []byte {
|
||||
if e == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, e.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
for i := range e.Chunks {
|
||||
offset += proto.NestedStructureMarshal(ecInfoChunksField, buf[offset:], &e.Chunks[i])
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (e *ECInfo) StableSize() (size int) {
|
||||
if e == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
for i := range e.Chunks {
|
||||
size += proto.NestedStructureSize(ecInfoChunksField, &e.Chunks[i])
|
||||
}
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (e *ECInfo) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(e, data, new(object.ECInfo))
|
||||
}
|
||||
|
||||
func (c *ECChunk) StableMarshal(buf []byte) []byte {
|
||||
if c == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, c.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
|
||||
offset += proto.NestedStructureMarshal(ecChunkIDField, buf[offset:], &c.ID)
|
||||
offset += proto.UInt32Marshal(ecChunkIndexField, buf[offset:], c.Index)
|
||||
proto.UInt32Marshal(ecChunkTotalField, buf[offset:], c.Total)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (c *ECChunk) StableSize() (size int) {
|
||||
if c == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += proto.NestedStructureSize(ecChunkIDField, &c.ID)
|
||||
size += proto.UInt32Size(ecChunkIndexField, c.Index)
|
||||
size += proto.UInt32Size(ecChunkTotalField, c.Total)
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (c *ECChunk) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(c, data, new(object.ECInfo_Chunk))
|
||||
}
|
||||
|
||||
func (r *GetRequestBody) StableMarshal(buf []byte) []byte {
|
||||
if r == nil {
|
||||
return []byte{}
|
||||
|
@ -626,8 +469,6 @@ func (r *GetResponseBody) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
case *SplitInfo:
|
||||
proto.NestedStructureMarshal(getRespBodySplitInfoField, buf, v)
|
||||
case *ECInfo:
|
||||
proto.NestedStructureMarshal(getRespBodyECInfoField, buf, v)
|
||||
default:
|
||||
panic("unknown one of object get response body type")
|
||||
}
|
||||
|
@ -650,8 +491,6 @@ func (r *GetResponseBody) StableSize() (size int) {
|
|||
}
|
||||
case *SplitInfo:
|
||||
size += proto.NestedStructureSize(getRespBodySplitInfoField, v)
|
||||
case *ECInfo:
|
||||
size += proto.NestedStructureSize(getRespBodyECInfoField, v)
|
||||
default:
|
||||
panic("unknown one of object get response body type")
|
||||
}
|
||||
|
@ -890,10 +729,6 @@ func (r *HeadResponseBody) StableMarshal(buf []byte) []byte {
|
|||
if v != nil {
|
||||
proto.NestedStructureMarshal(headRespBodySplitInfoField, buf, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
proto.NestedStructureMarshal(headRespBodyECInfoField, buf, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object put request body type")
|
||||
}
|
||||
|
@ -920,10 +755,6 @@ func (r *HeadResponseBody) StableSize() (size int) {
|
|||
if v != nil {
|
||||
size += proto.NestedStructureSize(headRespBodySplitInfoField, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
size += proto.NestedStructureSize(headRespBodyECInfoField, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object put request body type")
|
||||
}
|
||||
|
@ -1124,10 +955,6 @@ func (r *GetRangeResponseBody) StableMarshal(buf []byte) []byte {
|
|||
if v != nil {
|
||||
proto.NestedStructureMarshal(getRangeRespSplitInfoField, buf, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
proto.NestedStructureMarshal(getRangeRespECInfoField, buf, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object get range request body type")
|
||||
}
|
||||
|
@ -1150,10 +977,6 @@ func (r *GetRangeResponseBody) StableSize() (size int) {
|
|||
if v != nil {
|
||||
size = proto.NestedStructureSize(getRangeRespSplitInfoField, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
size = proto.NestedStructureSize(getRangeRespECInfoField, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object get range request body type")
|
||||
}
|
||||
|
@ -1240,77 +1063,3 @@ func (r *GetRangeHashResponseBody) StableSize() (size int) {
|
|||
func (r *GetRangeHashResponseBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(object.GetRangeHashResponse_Body))
|
||||
}
|
||||
|
||||
func (r *PutSingleRequestBody) StableMarshal(buf []byte) []byte {
|
||||
if r == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if r.marshalData != nil {
|
||||
if buf == nil {
|
||||
return r.marshalData
|
||||
}
|
||||
copy(buf, r.marshalData)
|
||||
return buf
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, r.StableSize())
|
||||
}
|
||||
|
||||
var offset int
|
||||
offset += proto.NestedStructureMarshal(putSingleReqObjectField, buf[offset:], r.object)
|
||||
proto.RepeatedUInt32Marshal(putSingleReqCopiesNumberField, buf[offset:], r.copyNum)
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
// SetMarshalData sets marshal data to reduce memory allocations.
|
||||
//
|
||||
// It is unsafe to modify/copy request data after setting marshal data.
|
||||
func (r *PutSingleRequestBody) SetMarshalData(data []byte) {
|
||||
if r == nil {
|
||||
return
|
||||
}
|
||||
|
||||
r.marshalData = data
|
||||
|
||||
proto.NestedStructureSetMarshalData(putSingleReqObjectField, r.marshalData, r.object)
|
||||
}
|
||||
|
||||
func (r *PutSingleRequestBody) StableSize() int {
|
||||
if r == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
var size int
|
||||
size += proto.NestedStructureSize(putSingleReqObjectField, r.object)
|
||||
arrSize, _ := proto.RepeatedUInt32Size(putSingleReqCopiesNumberField, r.copyNum)
|
||||
size += arrSize
|
||||
|
||||
return size
|
||||
}
|
||||
|
||||
func (r *PutSingleRequestBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(object.PutSingleRequest_Body))
|
||||
}
|
||||
|
||||
func (r *PutSingleResponseBody) StableMarshal(buf []byte) []byte {
|
||||
if r == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
if buf == nil {
|
||||
buf = make([]byte, r.StableSize())
|
||||
}
|
||||
|
||||
return buf
|
||||
}
|
||||
|
||||
func (r *PutSingleResponseBody) StableSize() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (r *PutSingleResponseBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(object.PutSingleResponse_Body))
|
||||
}
|
||||
|
|
|
@ -13,12 +13,9 @@ func TestMessageConvert(t *testing.T) {
|
|||
func(empty bool) message.Message { return objecttest.GenerateShortHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateAttribute(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateSplitHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateHeaderWithSplitHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateHeaderWithECHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateECHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateHeader(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateObject(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateSplitInfo(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateECInfo(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateGetRequestBody(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateGetRequest(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateGetObjectPartInit(empty) },
|
||||
|
@ -54,7 +51,5 @@ func TestMessageConvert(t *testing.T) {
|
|||
func(empty bool) message.Message { return objecttest.GenerateGetRangeHashResponseBody(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateGetRangeHashResponse(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GenerateLock(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GeneratePutSingleRequest(empty) },
|
||||
func(empty bool) message.Message { return objecttest.GeneratePutSingleResponse(empty) },
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package objecttest
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"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"
|
||||
|
@ -68,42 +66,17 @@ func generateSplitHeader(empty, withPar bool) *object.SplitHeader {
|
|||
m.SetParentSignature(refstest.GenerateSignature(empty))
|
||||
|
||||
if withPar {
|
||||
m.SetParentHeader(GenerateHeaderWithSplitHeader(empty))
|
||||
m.SetParentHeader(generateHeader(empty, false))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateHeaderWithSplitHeader(empty bool) *object.Header {
|
||||
m := generateHeader(empty)
|
||||
m.SetSplit(generateSplitHeader(empty, false))
|
||||
return m
|
||||
func GenerateHeader(empty bool) *object.Header {
|
||||
return generateHeader(empty, true)
|
||||
}
|
||||
|
||||
func GenerateHeaderWithECHeader(empty bool) *object.Header {
|
||||
m := generateHeader(empty)
|
||||
m.SetEC(GenerateECHeader(empty))
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateECHeader(empty bool) *object.ECHeader {
|
||||
ech := new(object.ECHeader)
|
||||
|
||||
if !empty {
|
||||
ech.Parent = refstest.GenerateObjectID(empty)
|
||||
ech.ParentSplitID = []byte{1, 2, 3}
|
||||
ech.ParentSplitParentID = refstest.GenerateObjectID(empty)
|
||||
ech.ParentAttributes = GenerateAttributes(empty)
|
||||
ech.Index = 0
|
||||
ech.Total = 2
|
||||
ech.Header = []byte("chunk of ec-encoded parent header")
|
||||
ech.HeaderLength = uint32(2 * len(ech.Header))
|
||||
}
|
||||
|
||||
return ech
|
||||
}
|
||||
|
||||
func generateHeader(empty bool) *object.Header {
|
||||
func generateHeader(empty, withSplit bool) *object.Header {
|
||||
m := new(object.Header)
|
||||
|
||||
if !empty {
|
||||
|
@ -120,6 +93,10 @@ func generateHeader(empty bool) *object.Header {
|
|||
m.SetHomomorphicHash(refstest.GenerateChecksum(empty))
|
||||
m.SetSessionToken(sessiontest.GenerateSessionToken(empty))
|
||||
|
||||
if withSplit {
|
||||
m.SetSplit(generateSplitHeader(empty, false))
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
|
@ -127,7 +104,7 @@ func GenerateHeaderWithSignature(empty bool) *object.HeaderWithSignature {
|
|||
m := new(object.HeaderWithSignature)
|
||||
|
||||
m.SetSignature(refstest.GenerateSignature(empty))
|
||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
||||
m.SetHeader(GenerateHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
@ -141,7 +118,7 @@ func GenerateObject(empty bool) *object.Object {
|
|||
}
|
||||
|
||||
m.SetSignature(refstest.GenerateSignature(empty))
|
||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
||||
m.SetHeader(GenerateHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
@ -158,31 +135,6 @@ func GenerateSplitInfo(empty bool) *object.SplitInfo {
|
|||
return m
|
||||
}
|
||||
|
||||
func GenerateECInfo(empty bool) *object.ECInfo {
|
||||
m := new(object.ECInfo)
|
||||
|
||||
if !empty {
|
||||
m.Chunks = make([]object.ECChunk, 2)
|
||||
for i := range m.Chunks {
|
||||
m.Chunks[i] = *GenerateECChunk(false)
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateECChunk(empty bool) *object.ECChunk {
|
||||
m := new(object.ECChunk)
|
||||
|
||||
if !empty {
|
||||
m.ID = *refstest.GenerateObjectID(false)
|
||||
m.Index = 4
|
||||
m.Total = 7
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GenerateGetRequestBody(empty bool) *object.GetRequestBody {
|
||||
m := new(object.GetRequestBody)
|
||||
|
||||
|
@ -215,7 +167,7 @@ func GenerateGetObjectPartInit(empty bool) *object.GetObjectPartInit {
|
|||
}
|
||||
|
||||
m.SetSignature(refstest.GenerateSignature(empty))
|
||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
||||
m.SetHeader(GenerateHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
@ -234,7 +186,7 @@ func GenerateGetResponseBody(empty bool) *object.GetResponseBody {
|
|||
m := new(object.GetResponseBody)
|
||||
|
||||
if !empty {
|
||||
switch randomInt(3) {
|
||||
switch random.Uint32(3) {
|
||||
case 0:
|
||||
m.SetObjectPart(GenerateGetObjectPartInit(false))
|
||||
case 1:
|
||||
|
@ -269,7 +221,7 @@ func GeneratePutObjectPartInit(empty bool) *object.PutObjectPartInit {
|
|||
}
|
||||
|
||||
m.SetSignature(refstest.GenerateSignature(empty))
|
||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
||||
m.SetHeader(GenerateHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
@ -288,7 +240,7 @@ func GeneratePutRequestBody(empty bool) *object.PutRequestBody {
|
|||
m := new(object.PutRequestBody)
|
||||
|
||||
if !empty {
|
||||
switch randomInt(2) {
|
||||
switch random.Uint32(2) {
|
||||
case 0:
|
||||
m.SetObjectPart(GeneratePutObjectPartInit(false))
|
||||
case 1:
|
||||
|
@ -410,7 +362,7 @@ func GenerateHeadResponseBody(empty bool) *object.HeadResponseBody {
|
|||
m := new(object.HeadResponseBody)
|
||||
|
||||
if !empty {
|
||||
switch randomInt(3) {
|
||||
switch random.Uint32(3) {
|
||||
case 0:
|
||||
m.SetHeaderPart(GenerateHeaderWithSignature(false))
|
||||
case 1:
|
||||
|
@ -572,7 +524,7 @@ func GenerateGetRangeResponseBody(empty bool) *object.GetRangeResponseBody {
|
|||
m := new(object.GetRangeResponseBody)
|
||||
|
||||
if !empty {
|
||||
switch randomInt(2) {
|
||||
switch random.Uint32(2) {
|
||||
case 0:
|
||||
m.SetRangePart(GenerateGetRangePartChunk(false))
|
||||
case 1:
|
||||
|
@ -658,39 +610,3 @@ func GenerateLock(empty bool) *object.Lock {
|
|||
|
||||
return m
|
||||
}
|
||||
|
||||
func GeneratePutSingleRequest(empty bool) *object.PutSingleRequest {
|
||||
m := new(object.PutSingleRequest)
|
||||
|
||||
if !empty {
|
||||
m.SetBody(GeneratePutSingleRequestBody(false))
|
||||
}
|
||||
|
||||
m.SetMetaHeader(sessiontest.GenerateRequestMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateRequestVerificationHeader(empty))
|
||||
|
||||
return m
|
||||
}
|
||||
|
||||
func GeneratePutSingleRequestBody(empty bool) *object.PutSingleRequestBody {
|
||||
b := new(object.PutSingleRequestBody)
|
||||
if !empty {
|
||||
b.SetObject(GenerateObject(empty))
|
||||
b.SetCopiesNumber([]uint32{12345})
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func GeneratePutSingleResponse(empty bool) *object.PutSingleResponse {
|
||||
m := new(object.PutSingleResponse)
|
||||
if !empty {
|
||||
m.SetBody(new(object.PutSingleResponseBody))
|
||||
}
|
||||
m.SetMetaHeader(sessiontest.GenerateResponseMetaHeader(empty))
|
||||
m.SetVerificationHeader(sessiontest.GenerateResponseVerificationHeader(empty))
|
||||
return m
|
||||
}
|
||||
|
||||
func randomInt(n int) int {
|
||||
return rand.New(rand.NewSource(time.Now().UnixNano())).Intn(n)
|
||||
}
|
||||
|
|
113
object/types.go
113
object/types.go
|
@ -39,17 +39,6 @@ type SplitHeader struct {
|
|||
splitID []byte
|
||||
}
|
||||
|
||||
type ECHeader struct {
|
||||
Parent *refs.ObjectID
|
||||
ParentSplitID []byte
|
||||
ParentSplitParentID *refs.ObjectID
|
||||
ParentAttributes []Attribute
|
||||
Index uint32
|
||||
Total uint32
|
||||
Header []byte
|
||||
HeaderLength uint32
|
||||
}
|
||||
|
||||
type Header struct {
|
||||
version *refs.Version
|
||||
|
||||
|
@ -70,8 +59,6 @@ type Header struct {
|
|||
attr []Attribute
|
||||
|
||||
split *SplitHeader
|
||||
|
||||
ec *ECHeader
|
||||
}
|
||||
|
||||
type HeaderWithSignature struct {
|
||||
|
@ -88,9 +75,6 @@ type Object struct {
|
|||
header *Header
|
||||
|
||||
payload []byte
|
||||
|
||||
// marshalData holds marshaled data, must not be marshaled by StableMarshal
|
||||
marshalData []byte
|
||||
}
|
||||
|
||||
type SplitInfo struct {
|
||||
|
@ -101,16 +85,6 @@ type SplitInfo struct {
|
|||
link *refs.ObjectID
|
||||
}
|
||||
|
||||
type ECChunk struct {
|
||||
ID refs.ObjectID
|
||||
Index uint32
|
||||
Total uint32
|
||||
}
|
||||
|
||||
type ECInfo struct {
|
||||
Chunks []ECChunk
|
||||
}
|
||||
|
||||
type GetRequestBody struct {
|
||||
addr *refs.Address
|
||||
|
||||
|
@ -327,32 +301,10 @@ type GetRangeHashResponse struct {
|
|||
session.ResponseHeaders
|
||||
}
|
||||
|
||||
type PutSingleRequestBody struct {
|
||||
object *Object
|
||||
copyNum []uint32
|
||||
|
||||
// marshalData holds marshaled data, must not be marshaled by StableMarshal
|
||||
marshalData []byte
|
||||
}
|
||||
|
||||
type PutSingleRequest struct {
|
||||
body *PutSingleRequestBody
|
||||
|
||||
session.RequestHeaders
|
||||
}
|
||||
|
||||
type PutSingleResponseBody struct{}
|
||||
|
||||
type PutSingleResponse struct {
|
||||
body *PutSingleResponseBody
|
||||
|
||||
session.ResponseHeaders
|
||||
}
|
||||
|
||||
const (
|
||||
TypeRegular Type = iota
|
||||
TypeTombstone
|
||||
_
|
||||
TypeStorageGroup
|
||||
TypeLock
|
||||
)
|
||||
|
||||
|
@ -678,17 +630,6 @@ func (h *Header) SetSplit(v *SplitHeader) {
|
|||
h.split = v
|
||||
}
|
||||
|
||||
func (h *Header) GetEC() *ECHeader {
|
||||
if h != nil {
|
||||
return h.ec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *Header) SetEC(v *ECHeader) {
|
||||
h.ec = v
|
||||
}
|
||||
|
||||
func (h *HeaderWithSignature) GetHeader() *Header {
|
||||
if h != nil {
|
||||
return h.header
|
||||
|
@ -1464,55 +1405,3 @@ func (r *GetRangeHashResponse) GetBody() *GetRangeHashResponseBody {
|
|||
func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
|
||||
r.body = v
|
||||
}
|
||||
|
||||
func (r *PutSingleRequest) GetBody() *PutSingleRequestBody {
|
||||
if r != nil {
|
||||
return r.body
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *PutSingleRequest) SetBody(v *PutSingleRequestBody) {
|
||||
r.body = v
|
||||
}
|
||||
|
||||
func (b *PutSingleRequestBody) GetObject() *Object {
|
||||
if b == nil {
|
||||
return nil
|
||||
}
|
||||
return b.object
|
||||
}
|
||||
|
||||
func (b *PutSingleRequestBody) SetObject(o *Object) {
|
||||
b.object = o
|
||||
}
|
||||
|
||||
func (b *PutSingleRequestBody) GetCopiesNumber() []uint32 {
|
||||
if b == nil {
|
||||
return nil
|
||||
}
|
||||
return b.copyNum
|
||||
}
|
||||
|
||||
func (b *PutSingleRequestBody) SetCopiesNumber(v []uint32) {
|
||||
b.copyNum = v
|
||||
}
|
||||
|
||||
func (r *PutSingleResponse) GetBody() *PutSingleResponseBody {
|
||||
if r != nil {
|
||||
return r.body
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *PutSingleResponse) SetBody(v *PutSingleResponseBody) {
|
||||
r.body = v
|
||||
}
|
||||
|
||||
func (s *ECInfo) getObjectPart() {}
|
||||
|
||||
func (s *ECInfo) getHeaderPart() {}
|
||||
|
||||
func (s *ECInfo) getRangePart() {}
|
||||
|
|
74
pkg/tracing/config.go
Normal file
74
pkg/tracing/config.go
Normal file
|
@ -0,0 +1,74 @@
|
|||
package tracing
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Exporter is type of tracing target.
|
||||
type Exporter string
|
||||
|
||||
const (
|
||||
Stdout Exporter = "stdout"
|
||||
OTLPgRPC Exporter = "otlp_grpc"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
// Enabled is true, if tracing enabled.
|
||||
Enabled bool
|
||||
// Exporter is collector type.
|
||||
Exporter Exporter
|
||||
// Endpoint is collector endpoint for OTLP exporters.
|
||||
Endpoint string
|
||||
|
||||
// Service is service name that will be used in tracing.
|
||||
// Mandatory.
|
||||
Service string
|
||||
// InstanceID is identity of service instance.
|
||||
// Optional.
|
||||
InstanceID string
|
||||
// Version is version of service instance.
|
||||
// Optional.
|
||||
Version string
|
||||
}
|
||||
|
||||
func (c *Config) validate() error {
|
||||
if !c.Enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
if c.Exporter != Stdout && c.Exporter != OTLPgRPC {
|
||||
return fmt.Errorf("tracing config error: unknown exporter '%s', valid values are %v",
|
||||
c.Exporter, []string{string(Stdout), string(OTLPgRPC)})
|
||||
}
|
||||
|
||||
if len(c.Service) == 0 {
|
||||
return fmt.Errorf("tracing config error: service name must be specified")
|
||||
}
|
||||
|
||||
if c.Exporter == OTLPgRPC && len(c.Endpoint) == 0 {
|
||||
return fmt.Errorf("tracing config error: exporter '%s' requires endpoint", c.Exporter)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Config) hasChange(other *Config) bool {
|
||||
if !c.Enabled && !other.Enabled {
|
||||
return false
|
||||
}
|
||||
if c.Enabled != other.Enabled {
|
||||
return true
|
||||
}
|
||||
|
||||
if c.Exporter == Stdout && other.Exporter == Stdout {
|
||||
return !c.serviceInfoEqual(other)
|
||||
}
|
||||
|
||||
return c.Exporter != other.Exporter ||
|
||||
c.Endpoint != other.Endpoint ||
|
||||
!c.serviceInfoEqual(other)
|
||||
}
|
||||
|
||||
func (c *Config) serviceInfoEqual(other *Config) bool {
|
||||
return c.Service == other.Service &&
|
||||
c.InstanceID == other.InstanceID &&
|
||||
c.Version == other.Version
|
||||
}
|
212
pkg/tracing/config_test.go
Normal file
212
pkg/tracing/config_test.go
Normal file
|
@ -0,0 +1,212 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestConfig_validate(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config Config
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "disabled",
|
||||
wantErr: false,
|
||||
config: Config{
|
||||
Enabled: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "stdout",
|
||||
wantErr: false,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: Stdout,
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "OTLP gRPC",
|
||||
wantErr: false,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Service: "test",
|
||||
Endpoint: "localhost:4717",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "unknown exporter",
|
||||
wantErr: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: "unknown",
|
||||
Service: "test",
|
||||
Endpoint: "localhost:4717",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no exporter",
|
||||
wantErr: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Service: "test",
|
||||
Endpoint: "localhost:4717",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no service",
|
||||
wantErr: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no endpoint for grpc",
|
||||
wantErr: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v0.0.1",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if err := tt.config.validate(); (err != nil) != tt.wantErr {
|
||||
t.Errorf("Config.validate() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfig_hasChange(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config Config
|
||||
other Config
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "disabled configs always equal",
|
||||
want: false,
|
||||
config: Config{
|
||||
Enabled: false,
|
||||
Exporter: Stdout,
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
other: Config{
|
||||
Enabled: false,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "enabled",
|
||||
want: true,
|
||||
config: Config{
|
||||
Enabled: false,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
other: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "disabled",
|
||||
want: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
other: Config{
|
||||
Enabled: false,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "do not use endpoint for stdout",
|
||||
want: false,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: Stdout,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
other: Config{
|
||||
Enabled: true,
|
||||
Exporter: Stdout,
|
||||
Endpoint: "otherhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "use endpoint for grpc",
|
||||
want: true,
|
||||
config: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "localhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
other: Config{
|
||||
Enabled: true,
|
||||
Exporter: OTLPgRPC,
|
||||
Endpoint: "otherhost:4717",
|
||||
Service: "test",
|
||||
InstanceID: "s01",
|
||||
Version: "v1.0.0",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := tt.config.hasChange(&tt.other); got != tt.want {
|
||||
t.Errorf("Config.equal() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
135
pkg/tracing/grpc.go
Normal file
135
pkg/tracing/grpc.go
Normal file
|
@ -0,0 +1,135 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/codes"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"google.golang.org/grpc"
|
||||
grpc_codes "google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// NewGRPCUnaryClientInteceptor creates new gRPC unary interceptor to save gRPC client traces.
|
||||
func NewGRPCUnaryClientInteceptor() grpc.UnaryClientInterceptor {
|
||||
return func(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||
ctx, span := startClientSpan(ctx, cc, method)
|
||||
defer span.End()
|
||||
|
||||
err := invoker(ctx, method, req, reply, cc, opts...)
|
||||
if err != nil {
|
||||
grpcStatus, _ := status.FromError(err)
|
||||
span.SetStatus(codes.Error, grpcStatus.Message())
|
||||
span.SetAttributes(semconv.RPCGRPCStatusCodeKey.Int64(int64(grpcStatus.Code())))
|
||||
} else {
|
||||
span.SetStatus(codes.Ok, "")
|
||||
span.SetAttributes(semconv.RPCGRPCStatusCodeKey.Int64(int64(grpc_codes.OK)))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// NewGRPCStreamClientInterceptor creates new gRPC stream interceptor to save gRPC client traces.
|
||||
func NewGRPCStreamClientInterceptor() grpc.StreamClientInterceptor {
|
||||
return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) {
|
||||
ctx, span := startClientSpan(ctx, cc, method)
|
||||
str, err := streamer(ctx, desc, cc, method, opts...)
|
||||
if err != nil {
|
||||
grpcStatus, _ := status.FromError(err)
|
||||
span.SetStatus(codes.Error, grpcStatus.Message())
|
||||
span.SetAttributes(semconv.RPCGRPCStatusCodeKey.Int64(int64(grpcStatus.Code())))
|
||||
span.End()
|
||||
return str, err
|
||||
}
|
||||
|
||||
finished := make(chan error)
|
||||
done := make(chan struct{})
|
||||
strWrp := newgRPCClientStream(str, desc, finished, done)
|
||||
|
||||
go func() {
|
||||
defer close(done)
|
||||
defer span.End()
|
||||
|
||||
select {
|
||||
case err := <-finished:
|
||||
if err == nil || err == io.EOF {
|
||||
setGRPCSpanStatus(span, nil)
|
||||
} else {
|
||||
setGRPCSpanStatus(span, err)
|
||||
}
|
||||
return
|
||||
case <-ctx.Done():
|
||||
setGRPCSpanStatus(span, ctx.Err())
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
return strWrp, nil
|
||||
}
|
||||
}
|
||||
|
||||
// NewGRPCUnaryServerInterceptor creates new gRPC unary interceptor to save gRPC server traces.
|
||||
func NewGRPCUnaryServerInterceptor() grpc.UnaryServerInterceptor {
|
||||
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
ctx = extractGRPCTraceInfo(ctx)
|
||||
var span trace.Span
|
||||
ctx, span = StartSpanFromContext(ctx, info.FullMethod,
|
||||
trace.WithAttributes(
|
||||
semconv.RPCSystemGRPC,
|
||||
semconv.RPCMethod(info.FullMethod),
|
||||
),
|
||||
trace.WithSpanKind(trace.SpanKindServer))
|
||||
defer span.End()
|
||||
|
||||
resp, err = handler(ctx, req)
|
||||
|
||||
setGRPCSpanStatus(span, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// NewGRPCStreamServerInterceptor creates new gRPC stream interceptor to save gRPC server traces.
|
||||
func NewGRPCStreamServerInterceptor() grpc.StreamServerInterceptor {
|
||||
return func(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
|
||||
ctx := extractGRPCTraceInfo(ss.Context())
|
||||
var span trace.Span
|
||||
ctx, span = StartSpanFromContext(ctx, info.FullMethod,
|
||||
trace.WithAttributes(
|
||||
semconv.RPCSystemGRPC,
|
||||
semconv.RPCMethod(info.FullMethod),
|
||||
),
|
||||
trace.WithSpanKind(trace.SpanKindServer))
|
||||
defer span.End()
|
||||
|
||||
err := handler(srv, newgRPCServerStream(ctx, ss))
|
||||
|
||||
setGRPCSpanStatus(span, err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
func startClientSpan(ctx context.Context, cc *grpc.ClientConn, method string) (context.Context, trace.Span) {
|
||||
ctx, span := StartSpanFromContext(ctx, method, trace.WithAttributes(
|
||||
semconv.RPCSystemGRPC,
|
||||
semconv.RPCMethod(method),
|
||||
attribute.String("rpc.grpc.target", cc.Target())),
|
||||
trace.WithSpanKind(trace.SpanKindClient),
|
||||
)
|
||||
ctx = setGRPCTraceInfo(ctx)
|
||||
return ctx, span
|
||||
}
|
||||
|
||||
func setGRPCSpanStatus(span trace.Span, err error) {
|
||||
if err != nil {
|
||||
grpcStatus, _ := status.FromError(err)
|
||||
span.SetStatus(codes.Error, grpcStatus.Message())
|
||||
span.SetAttributes(semconv.RPCGRPCStatusCodeKey.Int64(int64(grpcStatus.Code())))
|
||||
} else {
|
||||
span.SetStatus(codes.Ok, "")
|
||||
span.SetAttributes(semconv.RPCGRPCStatusCodeKey.Int64(int64(grpc_codes.OK)))
|
||||
}
|
||||
}
|
159
pkg/tracing/grpc_internal.go
Normal file
159
pkg/tracing/grpc_internal.go
Normal file
|
@ -0,0 +1,159 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
)
|
||||
|
||||
type grpcMetadataCarrier struct {
|
||||
md *metadata.MD
|
||||
}
|
||||
|
||||
func (c *grpcMetadataCarrier) Get(key string) string {
|
||||
values := c.md.Get(key)
|
||||
if len(values) > 0 {
|
||||
return values[0]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (c *grpcMetadataCarrier) Set(key string, value string) {
|
||||
c.md.Set(key, value)
|
||||
}
|
||||
|
||||
func (c *grpcMetadataCarrier) Keys() []string {
|
||||
result := make([]string, 0, c.md.Len())
|
||||
for key := range *c.md {
|
||||
result = append(result, key)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func extractGRPCTraceInfo(ctx context.Context) context.Context {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return ctx
|
||||
}
|
||||
carrier := &grpcMetadataCarrier{
|
||||
md: &md,
|
||||
}
|
||||
return Propagator.Extract(ctx, carrier)
|
||||
}
|
||||
|
||||
func setGRPCTraceInfo(ctx context.Context) context.Context {
|
||||
md, ok := metadata.FromOutgoingContext(ctx)
|
||||
if !ok {
|
||||
md = metadata.MD{}
|
||||
}
|
||||
carrier := &grpcMetadataCarrier{
|
||||
md: &md,
|
||||
}
|
||||
Propagator.Inject(ctx, carrier)
|
||||
return metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
|
||||
type clientStream struct {
|
||||
originalStream grpc.ClientStream
|
||||
desc *grpc.StreamDesc
|
||||
finished chan<- error
|
||||
done <-chan struct{}
|
||||
}
|
||||
|
||||
func newgRPCClientStream(originalStream grpc.ClientStream, desc *grpc.StreamDesc, finished chan<- error, done <-chan struct{}) grpc.ClientStream {
|
||||
return &clientStream{
|
||||
originalStream: originalStream,
|
||||
desc: desc,
|
||||
finished: finished,
|
||||
done: done,
|
||||
}
|
||||
}
|
||||
|
||||
func (cs *clientStream) Header() (metadata.MD, error) {
|
||||
md, err := cs.originalStream.Header()
|
||||
if err != nil {
|
||||
select {
|
||||
case <-cs.done:
|
||||
case cs.finished <- err:
|
||||
}
|
||||
}
|
||||
return md, err
|
||||
}
|
||||
|
||||
func (cs *clientStream) Trailer() metadata.MD {
|
||||
return cs.originalStream.Trailer()
|
||||
}
|
||||
|
||||
func (cs *clientStream) CloseSend() error {
|
||||
err := cs.originalStream.CloseSend()
|
||||
if err != nil {
|
||||
select {
|
||||
case <-cs.done:
|
||||
case cs.finished <- err:
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (cs *clientStream) Context() context.Context {
|
||||
return cs.originalStream.Context()
|
||||
}
|
||||
|
||||
func (cs *clientStream) SendMsg(m any) error {
|
||||
err := cs.originalStream.SendMsg(m)
|
||||
if err != nil {
|
||||
select {
|
||||
case <-cs.done:
|
||||
case cs.finished <- err:
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (cs *clientStream) RecvMsg(m any) error {
|
||||
err := cs.originalStream.RecvMsg(m)
|
||||
if err != nil || !cs.desc.ServerStreams {
|
||||
select {
|
||||
case <-cs.done:
|
||||
case cs.finished <- err:
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
type serverStream struct {
|
||||
originalStream grpc.ServerStream
|
||||
ctx context.Context // nolint:containedctx
|
||||
}
|
||||
|
||||
func newgRPCServerStream(ctx context.Context, originalStream grpc.ServerStream) grpc.ServerStream {
|
||||
return &serverStream{
|
||||
originalStream: originalStream,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
func (ss *serverStream) SetHeader(md metadata.MD) error {
|
||||
return ss.originalStream.SendHeader(md)
|
||||
}
|
||||
|
||||
func (ss *serverStream) SendHeader(md metadata.MD) error {
|
||||
return ss.originalStream.SendHeader(md)
|
||||
}
|
||||
|
||||
func (ss *serverStream) SetTrailer(md metadata.MD) {
|
||||
ss.originalStream.SetTrailer(md)
|
||||
}
|
||||
|
||||
func (ss *serverStream) Context() context.Context {
|
||||
return ss.ctx
|
||||
}
|
||||
|
||||
func (ss *serverStream) SendMsg(m any) error {
|
||||
return ss.originalStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (ss *serverStream) RecvMsg(m any) error {
|
||||
return ss.originalStream.RecvMsg(m)
|
||||
}
|
96
pkg/tracing/propagator.go
Normal file
96
pkg/tracing/propagator.go
Normal file
|
@ -0,0 +1,96 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
const (
|
||||
traceIDHeader = "x-frostfs-trace-id"
|
||||
spanIDHeader = "x-frostfs-span-id"
|
||||
flagsHeader = "x-frostfs-trace-flags"
|
||||
)
|
||||
|
||||
const (
|
||||
flagsSampled = 1 << iota
|
||||
)
|
||||
|
||||
// propagator serializes SpanContext to/from headers.
|
||||
// x-frostfs-trace-id - TraceID, 16 bytes, hex-string (32 bytes).
|
||||
// x-frostfs-span-id - SpanID, 8 bytes, hexstring (16 bytes).
|
||||
// x-frostfs-trace-flags - trace flags (now sampled only).
|
||||
type propagator struct{}
|
||||
|
||||
// Propagator is propagation.TextMapPropagator instance, used to extract/inject trace info from/to remote context.
|
||||
var Propagator propagation.TextMapPropagator = &propagator{}
|
||||
|
||||
// Inject injects tracing info to carrier.
|
||||
func (p *propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) {
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
if !sc.TraceID().IsValid() || !sc.SpanID().IsValid() {
|
||||
return
|
||||
}
|
||||
|
||||
var flags int
|
||||
if sc.IsSampled() {
|
||||
flags = flags | flagsSampled
|
||||
}
|
||||
|
||||
carrier.Set(traceIDHeader, sc.TraceID().String())
|
||||
carrier.Set(spanIDHeader, sc.SpanID().String())
|
||||
carrier.Set(flagsHeader, fmt.Sprintf("%x", flags))
|
||||
}
|
||||
|
||||
// Extract extracts tracing info from carrier and returns context with tracing info.
|
||||
// In case of error returns ctx.
|
||||
func (p *propagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context {
|
||||
spanConfig := trace.SpanContextConfig{}
|
||||
var err error
|
||||
|
||||
traceIDStr := carrier.Get(traceIDHeader)
|
||||
traceIDDefined := false
|
||||
if traceIDStr != "" {
|
||||
traceIDDefined = true
|
||||
spanConfig.TraceID, err = trace.TraceIDFromHex(traceIDStr)
|
||||
if err != nil {
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
spanIDstr := carrier.Get(spanIDHeader)
|
||||
spanIDDefined := false
|
||||
if spanIDstr != "" {
|
||||
spanIDDefined = true
|
||||
spanConfig.SpanID, err = trace.SpanIDFromHex(spanIDstr)
|
||||
if err != nil {
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
if traceIDDefined != spanIDDefined {
|
||||
return ctx //traceID + spanID must be defined OR no traceID and no spanID
|
||||
}
|
||||
|
||||
flagsStr := carrier.Get(flagsHeader)
|
||||
if flagsStr != "" {
|
||||
var v int64
|
||||
v, err = strconv.ParseInt(flagsStr, 16, 32)
|
||||
if err != nil {
|
||||
return ctx
|
||||
}
|
||||
if v&flagsSampled == flagsSampled {
|
||||
spanConfig.TraceFlags = trace.FlagsSampled
|
||||
}
|
||||
}
|
||||
|
||||
return trace.ContextWithRemoteSpanContext(ctx, trace.NewSpanContext(spanConfig))
|
||||
}
|
||||
|
||||
// Fields returns the keys whose values are set with Inject.
|
||||
func (p *propagator) Fields() []string {
|
||||
return []string{traceIDHeader, spanIDHeader, flagsHeader}
|
||||
}
|
257
pkg/tracing/propagator_test.go
Normal file
257
pkg/tracing/propagator_test.go
Normal file
|
@ -0,0 +1,257 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
type testCarrier struct {
|
||||
Values map[string]string
|
||||
}
|
||||
|
||||
func (c *testCarrier) Get(key string) string {
|
||||
return c.Values[key]
|
||||
}
|
||||
|
||||
func (c *testCarrier) Set(key string, value string) {
|
||||
c.Values[key] = value
|
||||
}
|
||||
|
||||
func (c *testCarrier) Keys() []string {
|
||||
res := make([]string, 0, len(c.Values))
|
||||
for k := range c.Values {
|
||||
res = append(res, k)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
var p = &propagator{}
|
||||
|
||||
func TestPropagator_Inject(t *testing.T) {
|
||||
t.Run("injects trace_id and span_id if valid", func(t *testing.T) {
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
|
||||
spanConfig := trace.SpanContextConfig{}
|
||||
spanConfig.TraceID, _ = trace.TraceIDFromHex(traceIDHex)
|
||||
spanConfig.SpanID, _ = trace.SpanIDFromHex(spanIDHex)
|
||||
spanConfig.TraceFlags = trace.FlagsSampled
|
||||
|
||||
ctx := trace.ContextWithRemoteSpanContext(context.Background(), trace.NewSpanContext(spanConfig))
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
p.Inject(ctx, c)
|
||||
|
||||
require.Equal(t, 3, len(c.Values), "not all headers were saved")
|
||||
require.Equal(t, traceIDHex, c.Values[traceIDHeader], "unexpected trace id")
|
||||
require.Equal(t, spanIDHex, c.Values[spanIDHeader], "unexpected span id")
|
||||
require.Equal(t, "1", c.Values[flagsHeader], "unexpected flags")
|
||||
})
|
||||
t.Run("doesn't injects if trace_id is invalid", func(t *testing.T) {
|
||||
traceIDBytes := make([]byte, 16)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
|
||||
spanConfig := trace.SpanContextConfig{}
|
||||
spanConfig.TraceID, _ = trace.TraceIDFromHex(traceIDHex)
|
||||
spanConfig.SpanID, _ = trace.SpanIDFromHex(spanIDHex)
|
||||
spanConfig.TraceFlags = trace.FlagsSampled
|
||||
|
||||
ctx := trace.ContextWithRemoteSpanContext(context.Background(), trace.NewSpanContext(spanConfig))
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
p.Inject(ctx, c)
|
||||
|
||||
require.Equal(t, 0, len(c.Values), "some headers were saved")
|
||||
})
|
||||
t.Run("doesn't injects if span_id is invalid", func(t *testing.T) {
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
|
||||
spanConfig := trace.SpanContextConfig{}
|
||||
spanConfig.TraceID, _ = trace.TraceIDFromHex(traceIDHex)
|
||||
spanConfig.SpanID, _ = trace.SpanIDFromHex(spanIDHex)
|
||||
spanConfig.TraceFlags = trace.FlagsSampled
|
||||
|
||||
ctx := trace.ContextWithRemoteSpanContext(context.Background(), trace.NewSpanContext(spanConfig))
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
p.Inject(ctx, c)
|
||||
|
||||
require.Equal(t, 0, len(c.Values), "some headers were saved")
|
||||
})
|
||||
t.Run("injects flags if no flags specified", func(t *testing.T) {
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
|
||||
spanConfig := trace.SpanContextConfig{}
|
||||
spanConfig.TraceID, _ = trace.TraceIDFromHex(traceIDHex)
|
||||
spanConfig.SpanID, _ = trace.SpanIDFromHex(spanIDHex)
|
||||
|
||||
ctx := trace.ContextWithRemoteSpanContext(context.Background(), trace.NewSpanContext(spanConfig))
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
p.Inject(ctx, c)
|
||||
|
||||
require.Equal(t, 3, len(c.Values), "not all headers were saved")
|
||||
require.Equal(t, traceIDHex, c.Values[traceIDHeader], "unexpected trace id")
|
||||
require.Equal(t, spanIDHex, c.Values[spanIDHeader], "unexpected span id")
|
||||
require.Equal(t, "0", c.Values[flagsHeader], "unexpected flags")
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func TestPropagator_Extract(t *testing.T) {
|
||||
t.Run("extracts if set", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
c.Values[traceIDHeader] = traceIDHex
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
c.Values[spanIDHeader] = spanIDHex
|
||||
|
||||
c.Values[flagsHeader] = "1"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.True(t, sc.HasTraceID(), "trace_id was not set")
|
||||
require.Equal(t, traceIDHex, sc.TraceID().String(), "trace_id doesn't match")
|
||||
require.True(t, sc.HasSpanID(), "span_id was not set")
|
||||
require.Equal(t, spanIDHex, sc.SpanID().String(), "span_id doesn't match")
|
||||
require.True(t, sc.IsSampled(), "sampled was not set")
|
||||
})
|
||||
t.Run("not extracts if only trace_id defined", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
c.Values[traceIDHeader] = traceIDHex
|
||||
c.Values[flagsHeader] = "1"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.False(t, sc.HasTraceID(), "trace_id was set")
|
||||
require.False(t, sc.HasSpanID(), "span_id was set")
|
||||
require.False(t, sc.IsSampled(), "sampled was set")
|
||||
})
|
||||
t.Run("not extracts if only span_id defined", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
c.Values[spanIDHeader] = spanIDHex
|
||||
c.Values[flagsHeader] = "1"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.False(t, sc.HasTraceID(), "trace_id was set")
|
||||
require.False(t, sc.HasSpanID(), "span_id was set")
|
||||
require.False(t, sc.IsSampled(), "sampled was set")
|
||||
})
|
||||
t.Run("not extracts if trace_id is in invalid", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
c.Values[traceIDHeader] = "loren ipsum"
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
c.Values[spanIDHeader] = spanIDHex
|
||||
c.Values[flagsHeader] = "1"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.False(t, sc.HasTraceID(), "trace_id was set")
|
||||
require.False(t, sc.HasSpanID(), "span_id was set")
|
||||
require.False(t, sc.IsSampled(), "sampled was set")
|
||||
})
|
||||
t.Run("not extracts if span_id is invalid", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
c.Values[spanIDHeader] = "loren ipsum"
|
||||
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
c.Values[traceIDHeader] = traceIDHex
|
||||
c.Values[flagsHeader] = "1"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.False(t, sc.HasTraceID(), "trace_id was set")
|
||||
require.False(t, sc.HasSpanID(), "span_id was set")
|
||||
require.False(t, sc.IsSampled(), "sampled was set")
|
||||
})
|
||||
t.Run("not extracts if flags is invalid", func(t *testing.T) {
|
||||
c := &testCarrier{
|
||||
Values: make(map[string]string),
|
||||
}
|
||||
|
||||
traceIDBytes := make([]byte, 16)
|
||||
rand.Read(traceIDBytes)
|
||||
traceIDHex := hex.EncodeToString(traceIDBytes)
|
||||
c.Values[traceIDHeader] = traceIDHex
|
||||
|
||||
spanIDBytes := make([]byte, 8)
|
||||
rand.Read(spanIDBytes)
|
||||
spanIDHex := hex.EncodeToString(spanIDBytes)
|
||||
c.Values[spanIDHeader] = spanIDHex
|
||||
|
||||
c.Values[flagsHeader] = "loren ipsum"
|
||||
|
||||
ctx := p.Extract(context.Background(), c)
|
||||
|
||||
sc := trace.SpanFromContext(ctx).SpanContext()
|
||||
require.False(t, sc.HasTraceID(), "trace_id was set")
|
||||
require.False(t, sc.HasSpanID(), "span_id was set")
|
||||
require.False(t, sc.IsSampled(), "sampled was set")
|
||||
})
|
||||
}
|
156
pkg/tracing/setup.go
Normal file
156
pkg/tracing/setup.go
Normal file
|
@ -0,0 +1,156 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
|
||||
"go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
|
||||
"go.opentelemetry.io/otel/sdk/resource"
|
||||
sdktrace "go.opentelemetry.io/otel/sdk/trace"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
var (
|
||||
// tracingLock protects provider, done, config and tracer from concurrent update.
|
||||
// These fields change when the config is updated or the application is shutdown.
|
||||
tracingLock = &sync.Mutex{}
|
||||
|
||||
provider *sdktrace.TracerProvider
|
||||
done bool
|
||||
|
||||
config = Config{}
|
||||
tracer = getDefaultTracer()
|
||||
)
|
||||
|
||||
// Setup initializes global tracer.
|
||||
// Returns true if global tracer was updated.
|
||||
// Shutdown method must be called for graceful shutdown.
|
||||
func Setup(ctx context.Context, cfg Config) (bool, error) {
|
||||
if err := cfg.validate(); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
tracingLock.Lock()
|
||||
defer tracingLock.Unlock()
|
||||
|
||||
if done {
|
||||
return false, fmt.Errorf("failed to setup tracing: already shutdown")
|
||||
}
|
||||
|
||||
if !config.hasChange(&cfg) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
if !cfg.Enabled {
|
||||
config = cfg
|
||||
tracer.Store(&tracerHolder{Tracer: trace.NewNoopTracerProvider().Tracer("")})
|
||||
return true, flushAndShutdown(ctx)
|
||||
}
|
||||
|
||||
exp, err := getExporter(ctx, &cfg)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
prevProvider := provider
|
||||
|
||||
provider = sdktrace.NewTracerProvider(
|
||||
sdktrace.WithBatcher(exp),
|
||||
sdktrace.WithResource(newResource(&cfg)),
|
||||
)
|
||||
|
||||
config = cfg
|
||||
tracer.Store(&tracerHolder{Tracer: provider.Tracer(cfg.Service)})
|
||||
|
||||
var retErr error
|
||||
if prevProvider != nil {
|
||||
retErr = prevProvider.ForceFlush(ctx)
|
||||
if err := prevProvider.Shutdown(ctx); err != nil {
|
||||
if retErr == nil {
|
||||
retErr = err
|
||||
} else {
|
||||
retErr = fmt.Errorf("%v ; %v", retErr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true, retErr
|
||||
}
|
||||
|
||||
// Shutdown shutdowns tracing.
|
||||
func Shutdown(ctx context.Context) error {
|
||||
tracingLock.Lock()
|
||||
defer tracingLock.Unlock()
|
||||
|
||||
if done {
|
||||
return nil
|
||||
}
|
||||
|
||||
done = true
|
||||
|
||||
config = Config{}
|
||||
tracer.Store(&tracerHolder{Tracer: trace.NewNoopTracerProvider().Tracer("")})
|
||||
|
||||
return flushAndShutdown(ctx)
|
||||
}
|
||||
|
||||
func getDefaultTracer() *atomic.Value {
|
||||
v := &atomic.Value{}
|
||||
v.Store(&tracerHolder{Tracer: trace.NewNoopTracerProvider().Tracer("")})
|
||||
return v
|
||||
}
|
||||
|
||||
func flushAndShutdown(ctx context.Context) error {
|
||||
if provider == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
tmp := provider
|
||||
provider = nil
|
||||
var retErr error
|
||||
retErr = tmp.ForceFlush(ctx)
|
||||
if err := tmp.Shutdown(ctx); err != nil {
|
||||
if retErr == nil {
|
||||
retErr = err
|
||||
} else {
|
||||
retErr = fmt.Errorf("%v ; %v", retErr, err)
|
||||
}
|
||||
}
|
||||
return retErr
|
||||
}
|
||||
|
||||
func getExporter(ctx context.Context, cfg *Config) (sdktrace.SpanExporter, error) {
|
||||
switch cfg.Exporter {
|
||||
default:
|
||||
return nil, fmt.Errorf("failed to setup tracing: unknown tracing exporter (%s)", cfg.Exporter)
|
||||
case Stdout:
|
||||
return stdouttrace.New()
|
||||
case OTLPgRPC:
|
||||
return otlptracegrpc.New(ctx, otlptracegrpc.WithEndpoint(cfg.Endpoint), otlptracegrpc.WithInsecure())
|
||||
}
|
||||
}
|
||||
|
||||
func newResource(cfg *Config) *resource.Resource {
|
||||
attrs := []attribute.KeyValue{
|
||||
semconv.ServiceName(cfg.Service),
|
||||
}
|
||||
if len(cfg.Version) > 0 {
|
||||
attrs = append(attrs, semconv.ServiceVersion(cfg.Version))
|
||||
}
|
||||
if len(cfg.InstanceID) > 0 {
|
||||
attrs = append(attrs, semconv.ServiceInstanceID(cfg.InstanceID))
|
||||
}
|
||||
return resource.NewWithAttributes(
|
||||
semconv.SchemaURL,
|
||||
attrs...,
|
||||
)
|
||||
}
|
||||
|
||||
type tracerHolder struct {
|
||||
Tracer trace.Tracer
|
||||
}
|
12
pkg/tracing/span.go
Normal file
12
pkg/tracing/span.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
// StartSpanFromContext creates a span and a context.Context containing the newly-created span.
|
||||
func StartSpanFromContext(ctx context.Context, operationName string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
return tracer.Load().(*tracerHolder).Tracer.Start(ctx, operationName, opts...)
|
||||
}
|
|
@ -196,7 +196,7 @@ func (c *Checksum) ToGRPCMessage() grpc.Message {
|
|||
if c != nil {
|
||||
m = new(refs.Checksum)
|
||||
|
||||
m.SetType(ChecksumTypeToGRPC(c.typ))
|
||||
m.SetChecksumType(ChecksumTypeToGRPC(c.typ))
|
||||
m.SetSum(c.sum)
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ func (x *Address) SetObjectId(v *ObjectID) {
|
|||
x.ObjectId = v
|
||||
}
|
||||
|
||||
// SetType in generic checksum structure.
|
||||
func (x *Checksum) SetType(v ChecksumType) {
|
||||
// SetChecksumType in generic checksum structure.
|
||||
func (x *Checksum) SetChecksumType(v ChecksumType) {
|
||||
x.Type = v
|
||||
}
|
||||
|
||||
|
|
14
refs/grpc/types.pb.go
generated
14
refs/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: refs/grpc/types.proto
|
||||
|
||||
package refs
|
||||
|
@ -20,8 +20,7 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Signature scheme describes digital signing scheme used for (key, signature)
|
||||
// pair.
|
||||
// Signature scheme describes digital signing scheme used for (key, signature) pair.
|
||||
type SignatureScheme int32
|
||||
|
||||
const (
|
||||
|
@ -194,8 +193,8 @@ func (x *Address) GetObjectId() *ObjectID {
|
|||
//
|
||||
// `ObjectID` is a 32 byte long
|
||||
// [SHA256](https://csrc.nist.gov/publications/detail/fips/180/4/final) hash of
|
||||
// the object's `header` field, which, in it's turn, contains the hash of the
|
||||
// object's payload.
|
||||
// the object's `header` field, which, in it's turn, contains the hash of the object's
|
||||
// payload.
|
||||
//
|
||||
// String presentation is a
|
||||
// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
|
||||
|
@ -382,8 +381,7 @@ func (x *OwnerID) GetValue() []byte {
|
|||
// API version used by a node.
|
||||
//
|
||||
// String presentation is a Semantic Versioning 2.0.0 compatible version string
|
||||
// with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor
|
||||
// number.
|
||||
// with 'v' prefix. i.e. `vX.Y`, where `X` is the major number, `Y` is the minor number.
|
||||
type Version struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
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"
|
||||
"google.golang.org/protobuf/encoding/protowire"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -117,7 +116,7 @@ func (o *ObjectID) StableSize() int {
|
|||
// ObjectIDNestedListMarshal writes protobuf repeated ObjectID field
|
||||
// with fNum number to buf.
|
||||
func ObjectIDNestedListMarshal(fNum int64, buf []byte, ids []ObjectID) (off int) {
|
||||
prefix := protowire.EncodeTag(protowire.Number(fNum), protowire.BytesType)
|
||||
prefix, _ := proto.NestedStructurePrefix(fNum)
|
||||
for i := range ids {
|
||||
off += binary.PutUvarint(buf[off:], prefix)
|
||||
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/common"
|
||||
)
|
||||
|
||||
const serviceAPEManager = frostfsServiceNamePrefix + "apemanager.APEManagerService"
|
||||
|
||||
const (
|
||||
rpcAPEManagerAddChain = "AddChain"
|
||||
rpcAPEManagerRemoveChain = "RemoveChain"
|
||||
rpcAPEManagerListChains = "ListChains"
|
||||
)
|
||||
|
||||
func AddChain(
|
||||
cli *client.Client,
|
||||
req *apemanager.AddChainRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*apemanager.AddChainResponse, error) {
|
||||
resp := new(apemanager.AddChainResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceAPEManager, rpcAPEManagerAddChain), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func RemoveChain(
|
||||
cli *client.Client,
|
||||
req *apemanager.RemoveChainRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*apemanager.RemoveChainResponse, error) {
|
||||
resp := new(apemanager.RemoveChainResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceAPEManager, rpcAPEManagerRemoveChain), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func ListChains(
|
||||
cli *client.Client,
|
||||
req *apemanager.ListChainsRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*apemanager.ListChainsResponse, error) {
|
||||
resp := new(apemanager.ListChainsResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceAPEManager, rpcAPEManagerListChains), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/pkg/tracing"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
@ -24,5 +25,14 @@ func New(opts ...Option) *Client {
|
|||
c.grpcDialOpts = append(c.grpcDialOpts, grpc.WithTransportCredentials(credentials.NewTLS(c.tlsCfg)))
|
||||
}
|
||||
|
||||
c.grpcDialOpts = append(c.grpcDialOpts,
|
||||
grpc.WithChainUnaryInterceptor(
|
||||
tracing.NewGRPCUnaryClientInteceptor(),
|
||||
),
|
||||
grpc.WithChainStreamInterceptor(
|
||||
tracing.NewGRPCStreamClientInterceptor(),
|
||||
),
|
||||
)
|
||||
|
||||
return &c
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -29,8 +30,9 @@ type cfg struct {
|
|||
}
|
||||
|
||||
const (
|
||||
defaultDialTimeout = 5 * time.Second
|
||||
defaultRWTimeout = 1 * time.Minute
|
||||
defaultDialTimeout = 5 * time.Second
|
||||
defaultKeepAliveTimeout = 5 * time.Second
|
||||
defaultRWTimeout = 1 * time.Minute
|
||||
)
|
||||
|
||||
func (c *cfg) initDefault() {
|
||||
|
@ -39,6 +41,9 @@ func (c *cfg) initDefault() {
|
|||
c.grpcDialOpts = []grpc.DialOption{
|
||||
grpc.WithBlock(),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||
Timeout: defaultKeepAliveTimeout,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
package rpc
|
||||
|
||||
const (
|
||||
// serviceNamePrefix is still used in "old" services but should be
|
||||
// considered as deprecated. Since new services use "frostfs" root,
|
||||
// `frostfsServiceNamePrefix` must be used for their rpc interface.
|
||||
serviceNamePrefix = "neo.fs.v2."
|
||||
|
||||
frostfsServiceNamePrefix = "frostfs.v2."
|
||||
)
|
||||
const serviceNamePrefix = "neo.fs.v2."
|
||||
|
|
|
@ -17,7 +17,6 @@ type jsonMessage interface {
|
|||
|
||||
type binaryMessage interface {
|
||||
StableMarshal([]byte) []byte
|
||||
StableSize() int
|
||||
Unmarshal([]byte) error
|
||||
}
|
||||
|
||||
|
@ -54,11 +53,6 @@ func TestRPCMessage(t *testing.T, msgGens ...func(empty bool) message.Message) {
|
|||
}
|
||||
|
||||
if bm, ok := msg.(binaryMessage); ok {
|
||||
t.Run(fmt.Sprintf("%T.StableSize() does no allocations", bm), func(t *testing.T) {
|
||||
require.Zero(t, testing.AllocsPerRun(1000, func() {
|
||||
_ = bm.StableSize()
|
||||
}))
|
||||
})
|
||||
t.Run(fmt.Sprintf("Binary_%T", msg), func(t *testing.T) {
|
||||
data := bm.StableMarshal(nil)
|
||||
|
||||
|
|
|
@ -10,14 +10,13 @@ import (
|
|||
const serviceObject = serviceNamePrefix + "object.ObjectService"
|
||||
|
||||
const (
|
||||
rpcObjectPut = "Put"
|
||||
rpcObjectGet = "Get"
|
||||
rpcObjectSearch = "Search"
|
||||
rpcObjectRange = "GetRange"
|
||||
rpcObjectHash = "GetRangeHash"
|
||||
rpcObjectHead = "Head"
|
||||
rpcObjectDelete = "Delete"
|
||||
rpcObjectPutSingle = "PutSingle"
|
||||
rpcObjectPut = "Put"
|
||||
rpcObjectGet = "Get"
|
||||
rpcObjectSearch = "Search"
|
||||
rpcObjectRange = "GetRange"
|
||||
rpcObjectHash = "GetRangeHash"
|
||||
rpcObjectHead = "Head"
|
||||
rpcObjectDelete = "Delete"
|
||||
)
|
||||
|
||||
// PutRequestWriter is an object.PutRequest
|
||||
|
@ -189,19 +188,3 @@ func HashObjectRange(
|
|||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// PutSingleObject executes ObjectService.PutSingle RPC.
|
||||
func PutSingleObject(
|
||||
cli *client.Client,
|
||||
req *object.PutSingleRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*object.PutSingleResponse, error) {
|
||||
resp := new(object.PutSingleResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceObject, rpcObjectPutSingle), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -383,7 +383,7 @@ func (r *RequestMetaHeader) ToGRPCMessage() grpc.Message {
|
|||
m.SetEpoch(r.epoch)
|
||||
m.SetTtl(r.ttl)
|
||||
m.SetOrigin(r.origin.ToGRPCMessage().(*session.RequestMetaHeader))
|
||||
m.SetMagicNumber(r.netMagic)
|
||||
m.SetNetworkMagic(r.netMagic)
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -674,10 +674,7 @@ func (c *ObjectSessionContext) ToGRPCMessage() grpc.Message {
|
|||
m = new(session.ObjectSessionContext)
|
||||
|
||||
m.SetVerb(ObjectSessionVerbToGRPCField(c.verb))
|
||||
m.SetTarget(&session.ObjectSessionContext_Target{
|
||||
Container: c.cnr.ToGRPCMessage().(*refsGRPC.ContainerID),
|
||||
Objects: refs.ObjectIDListToGRPCMessage(c.objs),
|
||||
})
|
||||
m.SetTarget(c.cnr.ToGRPCMessage().(*refsGRPC.ContainerID), refs.ObjectIDListToGRPCMessage(c.objs))
|
||||
}
|
||||
|
||||
return m
|
||||
|
@ -727,9 +724,9 @@ func (t *TokenBody) ToGRPCMessage() grpc.Message {
|
|||
case nil:
|
||||
m.Context = nil
|
||||
case *ObjectSessionContext:
|
||||
m.SetObject(typ.ToGRPCMessage().(*session.ObjectSessionContext))
|
||||
m.SetObjectSessionContext(typ.ToGRPCMessage().(*session.ObjectSessionContext))
|
||||
case *ContainerSessionContext:
|
||||
m.SetContainer(typ.ToGRPCMessage().(*session.ContainerSessionContext))
|
||||
m.SetContainerSessionContext(typ.ToGRPCMessage().(*session.ContainerSessionContext))
|
||||
}
|
||||
|
||||
m.SetOwnerId(t.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
||||
|
|
4
session/grpc/service.pb.go
generated
4
session/grpc/service.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: session/grpc/service.proto
|
||||
|
||||
package session
|
||||
|
|
2
session/grpc/service_grpc.pb.go
generated
2
session/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.3
|
||||
// - protoc v3.21.9
|
||||
// source: session/grpc/service.proto
|
||||
|
||||
package session
|
||||
|
|
|
@ -52,22 +52,25 @@ func (m *SessionToken_Body) SetSessionKey(v []byte) {
|
|||
}
|
||||
|
||||
// SetObjectAddressContext sets object context of the session token.
|
||||
func (m *SessionToken_Body) SetObject(v *ObjectSessionContext) {
|
||||
func (m *SessionToken_Body) SetObjectSessionContext(v *ObjectSessionContext) {
|
||||
m.Context = &SessionToken_Body_Object{
|
||||
Object: v,
|
||||
}
|
||||
}
|
||||
|
||||
// SetContainer sets container context of the session token.
|
||||
func (m *SessionToken_Body) SetContainer(v *ContainerSessionContext) {
|
||||
// SetContainerSessionContext sets container context of the session token.
|
||||
func (m *SessionToken_Body) SetContainerSessionContext(v *ContainerSessionContext) {
|
||||
m.Context = &SessionToken_Body_Container{
|
||||
Container: v,
|
||||
}
|
||||
}
|
||||
|
||||
// SetTarget specifies objects involved in the object session.
|
||||
func (m *ObjectSessionContext) SetTarget(tgt *ObjectSessionContext_Target) {
|
||||
m.Target = tgt
|
||||
func (m *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs []*refs.ObjectID) {
|
||||
m.Target = &ObjectSessionContext_Target{
|
||||
Container: cnr,
|
||||
Objects: objs,
|
||||
}
|
||||
}
|
||||
|
||||
// SetVerb sets type of request for which the token is issued.
|
||||
|
@ -144,8 +147,8 @@ func (m *RequestMetaHeader) GetNetworkMagic() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// SetMagicNumber sets NeoFS network magic.
|
||||
func (m *RequestMetaHeader) SetMagicNumber(v uint64) {
|
||||
// SetNetworkMagic sets NeoFS network magic.
|
||||
func (m *RequestMetaHeader) SetNetworkMagic(v uint64) {
|
||||
m.MagicNumber = v
|
||||
}
|
||||
|
||||
|
|
22
session/grpc/types.pb.go
generated
22
session/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: session/grpc/types.proto
|
||||
|
||||
package session
|
||||
|
@ -342,15 +342,15 @@ func (x *SessionToken) GetSignature() *grpc.Signature {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Extended headers for Request/Response. They may contain any user-defined
|
||||
// headers to be interpreted on application level.
|
||||
// Extended headers for Request/Response. They may contain any user-defined headers
|
||||
// to be interpreted on application level.
|
||||
//
|
||||
// Key name must be a unique valid UTF-8 string. Value can't be empty. Requests
|
||||
// or Responses with duplicated header names or headers with empty values will
|
||||
// be considered invalid.
|
||||
// Key name must be a unique valid UTF-8 string. Value can't be empty. Requests or
|
||||
// Responses with duplicated header names or headers with empty values will be
|
||||
// considered invalid.
|
||||
//
|
||||
// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__`
|
||||
// is deprecated) prefix that affect system behaviour:
|
||||
// There are some "well-known" headers starting with `__SYSTEM__` (`__NEOFS__` is deprecated) prefix that
|
||||
// affect system behaviour:
|
||||
//
|
||||
// - [ __SYSTEM__NETMAP_EPOCH ] \
|
||||
// (`__NEOFS__NETMAP_EPOCH` is deprecated) \
|
||||
|
@ -361,8 +361,8 @@ func (x *SessionToken) GetSignature() *grpc.Signature {
|
|||
// (`__NEOFS__NETMAP_LOOKUP_DEPTH` is deprecated) \
|
||||
// If object can't be found using current epoch's netmap, this header limits
|
||||
// how many past epochs the node can look up through. The `value` is string
|
||||
// encoded `uint64` in decimal presentation. If set to '0' or not set, only
|
||||
// the current epoch will be used.
|
||||
// encoded `uint64` in decimal presentation. If set to '0' or not set, only the
|
||||
// current epoch will be used.
|
||||
type XHeader struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -3,6 +3,7 @@ package session
|
|||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
)
|
||||
|
||||
func (c *ObjectSessionContext) MarshalJSON() ([]byte, error) {
|
||||
|
@ -26,7 +27,13 @@ func (t *TokenBody) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (t *TokenBody) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(t, data, new(session.SessionToken_Body))
|
||||
msg := new(session.SessionToken_Body)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return t.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (t *Token) MarshalJSON() ([]byte, error) {
|
||||
|
@ -34,7 +41,13 @@ func (t *Token) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (t *Token) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(t, data, new(session.SessionToken))
|
||||
msg := new(session.SessionToken)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return t.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (x *XHeader) MarshalJSON() ([]byte, error) {
|
||||
|
@ -42,7 +55,13 @@ func (x *XHeader) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (x *XHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(x, data, new(session.XHeader))
|
||||
msg := new(session.XHeader)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return x.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (r *RequestMetaHeader) MarshalJSON() ([]byte, error) {
|
||||
|
@ -50,7 +69,13 @@ func (r *RequestMetaHeader) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (r *RequestMetaHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.RequestMetaHeader))
|
||||
msg := new(session.RequestMetaHeader)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (r *RequestVerificationHeader) MarshalJSON() ([]byte, error) {
|
||||
|
@ -58,7 +83,13 @@ func (r *RequestVerificationHeader) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (r *RequestVerificationHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.RequestVerificationHeader))
|
||||
msg := new(session.RequestVerificationHeader)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (r *ResponseMetaHeader) MarshalJSON() ([]byte, error) {
|
||||
|
@ -66,7 +97,13 @@ func (r *ResponseMetaHeader) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (r *ResponseMetaHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.ResponseMetaHeader))
|
||||
msg := new(session.ResponseMetaHeader)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) MarshalJSON() ([]byte, error) {
|
||||
|
@ -74,7 +111,13 @@ func (r *ResponseVerificationHeader) MarshalJSON() ([]byte, error) {
|
|||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.ResponseVerificationHeader))
|
||||
msg := new(session.ResponseVerificationHeader)
|
||||
|
||||
if err := protojson.Unmarshal(data, msg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(msg)
|
||||
}
|
||||
|
||||
func (x *ContainerSessionContext) MarshalJSON() ([]byte, error) {
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
session "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session/grpc"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
goproto "google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -153,7 +154,12 @@ func (x *XHeader) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (x *XHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(x, data, new(session.XHeader))
|
||||
m := new(session.XHeader)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return x.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (l *TokenLifetime) StableMarshal(buf []byte) []byte {
|
||||
|
@ -187,7 +193,12 @@ func (l *TokenLifetime) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (l *TokenLifetime) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(l, data, new(session.SessionToken_Body_TokenLifetime))
|
||||
m := new(session.SessionToken_Body_TokenLifetime)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return l.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (c *ObjectSessionContext) StableMarshal(buf []byte) []byte {
|
||||
|
@ -200,7 +211,7 @@ func (c *ObjectSessionContext) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
offset := proto.EnumMarshal(objectCtxVerbField, buf, int32(c.verb))
|
||||
proto.NestedStructureMarshalUnchecked(objectCtxTargetField, buf[offset:], objectSessionContextTarget{
|
||||
proto.NestedStructureMarshal(objectCtxTargetField, buf[offset:], &objectSessionContextTarget{
|
||||
cnr: c.cnr,
|
||||
objs: c.objs,
|
||||
})
|
||||
|
@ -214,7 +225,7 @@ func (c *ObjectSessionContext) StableSize() (size int) {
|
|||
}
|
||||
|
||||
size += proto.EnumSize(objectCtxVerbField, int32(c.verb))
|
||||
size += proto.NestedStructureSizeUnchecked(objectCtxTargetField, objectSessionContextTarget{
|
||||
size += proto.NestedStructureSize(objectCtxTargetField, &objectSessionContextTarget{
|
||||
cnr: c.cnr,
|
||||
objs: c.objs,
|
||||
})
|
||||
|
@ -223,7 +234,12 @@ func (c *ObjectSessionContext) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (c *ObjectSessionContext) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(c, data, new(session.ObjectSessionContext))
|
||||
m := new(session.ObjectSessionContext)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -322,7 +338,12 @@ func (t *TokenBody) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (t *TokenBody) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(t, data, new(session.SessionToken_Body))
|
||||
m := new(session.SessionToken_Body)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return t.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (t *Token) StableMarshal(buf []byte) []byte {
|
||||
|
@ -354,7 +375,12 @@ func (t *Token) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (t *Token) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(t, data, new(session.SessionToken))
|
||||
m := new(session.SessionToken)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return t.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (r *RequestMetaHeader) StableMarshal(buf []byte) []byte {
|
||||
|
@ -409,7 +435,12 @@ func (r *RequestMetaHeader) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (r *RequestMetaHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(session.RequestMetaHeader))
|
||||
m := new(session.RequestMetaHeader)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (r *RequestVerificationHeader) StableMarshal(buf []byte) []byte {
|
||||
|
@ -445,7 +476,12 @@ func (r *RequestVerificationHeader) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (r *RequestVerificationHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(session.RequestVerificationHeader))
|
||||
m := new(session.RequestVerificationHeader)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (r *ResponseMetaHeader) StableMarshal(buf []byte) []byte {
|
||||
|
@ -496,7 +532,12 @@ func (r *ResponseMetaHeader) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (r *ResponseMetaHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(session.ResponseMetaHeader))
|
||||
m := new(session.ResponseMetaHeader)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(m)
|
||||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) StableMarshal(buf []byte) []byte {
|
||||
|
@ -532,5 +573,10 @@ func (r *ResponseVerificationHeader) StableSize() (size int) {
|
|||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) Unmarshal(data []byte) error {
|
||||
return message.Unmarshal(r, data, new(session.ResponseVerificationHeader))
|
||||
m := new(session.ResponseVerificationHeader)
|
||||
if err := goproto.Unmarshal(data, m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.FromGRPCMessage(m)
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
package sessiontest
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
acltest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/test"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/internal/random"
|
||||
refstest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
statustest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/status/test"
|
||||
|
@ -169,7 +167,7 @@ func GenerateSessionTokenBody(empty bool) *session.TokenBody {
|
|||
m.SetOwnerID(refstest.GenerateOwnerID(false))
|
||||
m.SetLifetime(GenerateTokenLifetime(false))
|
||||
|
||||
switch randomInt(2) {
|
||||
switch random.Uint32(2) {
|
||||
case 0:
|
||||
m.SetContext(GenerateObjectSessionContext(false))
|
||||
case 1:
|
||||
|
@ -238,7 +236,3 @@ func GenerateXHeaders(empty bool) []session.XHeader {
|
|||
|
||||
return xs
|
||||
}
|
||||
|
||||
func randomInt(n int) int {
|
||||
return rand.New(rand.NewSource(time.Now().UnixNano())).Intn(n)
|
||||
}
|
||||
|
|
|
@ -632,8 +632,7 @@ func (r *ResponseMetaHeader) SetStatus(v *status.Status) {
|
|||
func SetStatus(msg interface {
|
||||
GetMetaHeader() *ResponseMetaHeader
|
||||
SetMetaHeader(*ResponseMetaHeader)
|
||||
}, st *status.Status,
|
||||
) {
|
||||
}, st *status.Status) {
|
||||
meta := msg.GetMetaHeader()
|
||||
if meta == nil {
|
||||
meta = new(ResponseMetaHeader)
|
||||
|
|
|
@ -43,8 +43,7 @@ func (c *RequestHeaders) SetVerificationHeader(v *RequestVerificationHeader) {
|
|||
func (c *RequestHeaders) ToMessage(m interface {
|
||||
SetMetaHeader(*session.RequestMetaHeader)
|
||||
SetVerifyHeader(*session.RequestVerificationHeader)
|
||||
},
|
||||
) {
|
||||
}) {
|
||||
m.SetMetaHeader(c.metaHeader.ToGRPCMessage().(*session.RequestMetaHeader))
|
||||
m.SetVerifyHeader(c.verifyHeader.ToGRPCMessage().(*session.RequestVerificationHeader))
|
||||
}
|
||||
|
@ -52,8 +51,7 @@ func (c *RequestHeaders) ToMessage(m interface {
|
|||
func (c *RequestHeaders) FromMessage(m interface {
|
||||
GetMetaHeader() *session.RequestMetaHeader
|
||||
GetVerifyHeader() *session.RequestVerificationHeader
|
||||
},
|
||||
) error {
|
||||
}) error {
|
||||
metaHdr := m.GetMetaHeader()
|
||||
if metaHdr == nil {
|
||||
c.metaHeader = nil
|
||||
|
@ -124,8 +122,7 @@ func (c *ResponseHeaders) SetVerificationHeader(v *ResponseVerificationHeader) {
|
|||
func (c *ResponseHeaders) ToMessage(m interface {
|
||||
SetMetaHeader(*session.ResponseMetaHeader)
|
||||
SetVerifyHeader(*session.ResponseVerificationHeader)
|
||||
},
|
||||
) {
|
||||
}) {
|
||||
m.SetMetaHeader(c.metaHeader.ToGRPCMessage().(*session.ResponseMetaHeader))
|
||||
m.SetVerifyHeader(c.verifyHeader.ToGRPCMessage().(*session.ResponseVerificationHeader))
|
||||
}
|
||||
|
@ -133,8 +130,7 @@ func (c *ResponseHeaders) ToMessage(m interface {
|
|||
func (c *ResponseHeaders) FromMessage(m interface {
|
||||
GetMetaHeader() *session.ResponseMetaHeader
|
||||
GetVerifyHeader() *session.ResponseVerificationHeader
|
||||
},
|
||||
) error {
|
||||
}) error {
|
||||
metaHdr := m.GetMetaHeader()
|
||||
if metaHdr == nil {
|
||||
c.metaHeader = nil
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
|
@ -88,10 +87,6 @@ func serviceMessageBody(req any) stableMarshaler {
|
|||
return v.GetBody()
|
||||
case *object.GetRangeHashResponse:
|
||||
return v.GetBody()
|
||||
case *object.PutSingleRequest:
|
||||
return v.GetBody()
|
||||
case *object.PutSingleResponse:
|
||||
return v.GetBody()
|
||||
|
||||
/* Netmap */
|
||||
case *netmap.LocalNodeInfoRequest:
|
||||
|
@ -106,19 +101,5 @@ func serviceMessageBody(req any) stableMarshaler {
|
|||
return v.GetBody()
|
||||
case *netmap.SnapshotResponse:
|
||||
return v.GetBody()
|
||||
|
||||
/* APEManager */
|
||||
case *apemanager.AddChainRequest:
|
||||
return v.GetBody()
|
||||
case *apemanager.AddChainResponse:
|
||||
return v.GetBody()
|
||||
case *apemanager.RemoveChainRequest:
|
||||
return v.GetBody()
|
||||
case *apemanager.RemoveChainResponse:
|
||||
return v.GetBody()
|
||||
case *apemanager.ListChainsRequest:
|
||||
return v.GetBody()
|
||||
case *apemanager.ListChainsResponse:
|
||||
return v.GetBody()
|
||||
}
|
||||
}
|
||||
|
|
162
status/grpc/types.pb.go
generated
162
status/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.9
|
||||
// source: status/grpc/types.proto
|
||||
|
||||
package status
|
||||
|
@ -34,8 +34,6 @@ const (
|
|||
Section_SECTION_CONTAINER Section = 3
|
||||
// Session service-specific errors.
|
||||
Section_SECTION_SESSION Section = 4
|
||||
// Session service-specific errors.
|
||||
Section_SECTION_APE_MANAGER Section = 5
|
||||
)
|
||||
|
||||
// Enum value maps for Section.
|
||||
|
@ -46,7 +44,6 @@ var (
|
|||
2: "SECTION_OBJECT",
|
||||
3: "SECTION_CONTAINER",
|
||||
4: "SECTION_SESSION",
|
||||
5: "SECTION_APE_MANAGER",
|
||||
}
|
||||
Section_value = map[string]int32{
|
||||
"SECTION_SUCCESS": 0,
|
||||
|
@ -54,7 +51,6 @@ var (
|
|||
"SECTION_OBJECT": 2,
|
||||
"SECTION_CONTAINER": 3,
|
||||
"SECTION_SESSION": 4,
|
||||
"SECTION_APE_MANAGER": 5,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -149,9 +145,6 @@ const (
|
|||
CommonFail_SIGNATURE_VERIFICATION_FAIL CommonFail = 2
|
||||
// [**1027**] Node is under maintenance.
|
||||
CommonFail_NODE_UNDER_MAINTENANCE CommonFail = 3
|
||||
// [**1028**] Invalid argument error. If the server fails on validation of a
|
||||
// request parameter as the client sent it incorrectly, then this code should be used.
|
||||
CommonFail_INVALID_ARGUMENT CommonFail = 4
|
||||
)
|
||||
|
||||
// Enum value maps for CommonFail.
|
||||
|
@ -161,14 +154,12 @@ var (
|
|||
1: "WRONG_MAGIC_NUMBER",
|
||||
2: "SIGNATURE_VERIFICATION_FAIL",
|
||||
3: "NODE_UNDER_MAINTENANCE",
|
||||
4: "INVALID_ARGUMENT",
|
||||
}
|
||||
CommonFail_value = map[string]int32{
|
||||
"INTERNAL": 0,
|
||||
"WRONG_MAGIC_NUMBER": 1,
|
||||
"SIGNATURE_VERIFICATION_FAIL": 2,
|
||||
"NODE_UNDER_MAINTENANCE": 3,
|
||||
"INVALID_ARGUMENT": 4,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -274,8 +265,6 @@ const (
|
|||
Container_CONTAINER_NOT_FOUND Container = 0
|
||||
// [**3073**] eACL table not found.
|
||||
Container_EACL_NOT_FOUND Container = 1
|
||||
// [**3074**] Container access denied.
|
||||
Container_CONTAINER_ACCESS_DENIED Container = 2
|
||||
)
|
||||
|
||||
// Enum value maps for Container.
|
||||
|
@ -283,12 +272,10 @@ var (
|
|||
Container_name = map[int32]string{
|
||||
0: "CONTAINER_NOT_FOUND",
|
||||
1: "EACL_NOT_FOUND",
|
||||
2: "CONTAINER_ACCESS_DENIED",
|
||||
}
|
||||
Container_value = map[string]int32{
|
||||
"CONTAINER_NOT_FOUND": 0,
|
||||
"EACL_NOT_FOUND": 1,
|
||||
"CONTAINER_ACCESS_DENIED": 2,
|
||||
"CONTAINER_NOT_FOUND": 0,
|
||||
"EACL_NOT_FOUND": 1,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -368,51 +355,6 @@ func (Session) EnumDescriptor() ([]byte, []int) {
|
|||
return file_status_grpc_types_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// Section of status for APE manager related operations.
|
||||
type APEManager int32
|
||||
|
||||
const (
|
||||
// [**5120**] The operation is denied by APE manager.
|
||||
APEManager_APE_MANAGER_ACCESS_DENIED APEManager = 0
|
||||
)
|
||||
|
||||
// Enum value maps for APEManager.
|
||||
var (
|
||||
APEManager_name = map[int32]string{
|
||||
0: "APE_MANAGER_ACCESS_DENIED",
|
||||
}
|
||||
APEManager_value = map[string]int32{
|
||||
"APE_MANAGER_ACCESS_DENIED": 0,
|
||||
}
|
||||
)
|
||||
|
||||
func (x APEManager) Enum() *APEManager {
|
||||
p := new(APEManager)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x APEManager) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (APEManager) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_status_grpc_types_proto_enumTypes[6].Descriptor()
|
||||
}
|
||||
|
||||
func (APEManager) Type() protoreflect.EnumType {
|
||||
return &file_status_grpc_types_proto_enumTypes[6]
|
||||
}
|
||||
|
||||
func (x APEManager) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use APEManager.Descriptor instead.
|
||||
func (APEManager) EnumDescriptor() ([]byte, []int) {
|
||||
return file_status_grpc_types_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
// Declares the general format of the status returns of the NeoFS RPC protocol.
|
||||
// Status is present in all response messages. Each RPC of NeoFS protocol
|
||||
// describes the possible outcomes and details of the operation.
|
||||
|
@ -585,52 +527,45 @@ var file_status_grpc_types_proto_rawDesc = []byte{
|
|||
0x2e, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a,
|
||||
0x93, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x53,
|
||||
0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00,
|
||||
0x12, 0x1a, 0x0a, 0x16, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c,
|
||||
0x55, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e,
|
||||
0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02,
|
||||
0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
|
||||
0x41, 0x49, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x43, 0x54, 0x49,
|
||||
0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13,
|
||||
0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41,
|
||||
0x47, 0x45, 0x52, 0x10, 0x05, 0x2a, 0x11, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
||||
0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x85, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52,
|
||||
0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x52, 0x4f, 0x4e, 0x47, 0x5f, 0x4d,
|
||||
0x41, 0x47, 0x49, 0x43, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1f, 0x0a,
|
||||
0x1b, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46,
|
||||
0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x1a,
|
||||
0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x49,
|
||||
0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e,
|
||||
0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x04,
|
||||
0x2a, 0x88, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x41,
|
||||
0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55,
|
||||
0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02,
|
||||
0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47,
|
||||
0x55, 0x4c, 0x41, 0x52, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1a, 0x0a,
|
||||
0x16, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f,
|
||||
0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54,
|
||||
0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x05, 0x2a, 0x55, 0x0a, 0x09, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x54,
|
||||
0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10,
|
||||
0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x41, 0x43, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f,
|
||||
0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e,
|
||||
0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44,
|
||||
0x10, 0x02, 0x2a, 0x31, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44,
|
||||
0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49,
|
||||
0x52, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x0a, 0x41, 0x50, 0x45, 0x4d, 0x61, 0x6e, 0x61,
|
||||
0x67, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47,
|
||||
0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44,
|
||||
0x10, 0x00, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d,
|
||||
0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x67, 0x72, 0x70,
|
||||
0x63, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f, 0x2e, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x7a, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45,
|
||||
0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12,
|
||||
0x1a, 0x0a, 0x16, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
|
||||
0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53,
|
||||
0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||
0x49, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0x11, 0x0a, 0x07, 0x53,
|
||||
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x6f,
|
||||
0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x52,
|
||||
0x4f, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x47, 0x49, 0x43, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52,
|
||||
0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f,
|
||||
0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49,
|
||||
0x4c, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45,
|
||||
0x52, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a,
|
||||
0x88, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43,
|
||||
0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a,
|
||||
0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e,
|
||||
0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x55,
|
||||
0x4c, 0x41, 0x52, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16,
|
||||
0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x52,
|
||||
0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54, 0x5f,
|
||||
0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x05, 0x2a, 0x38, 0x0a, 0x09, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||
0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00,
|
||||
0x12, 0x12, 0x0a, 0x0e, 0x45, 0x41, 0x43, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55,
|
||||
0x4e, 0x44, 0x10, 0x01, 0x2a, 0x31, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x13, 0x0a, 0x0f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55,
|
||||
0x4e, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x45, 0x58,
|
||||
0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x01, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66,
|
||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65,
|
||||
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
|
||||
0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xaa, 0x02, 0x1a,
|
||||
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x41, 0x50, 0x49, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -645,7 +580,7 @@ func file_status_grpc_types_proto_rawDescGZIP() []byte {
|
|||
return file_status_grpc_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_status_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
|
||||
var file_status_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
|
||||
var file_status_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_status_grpc_types_proto_goTypes = []interface{}{
|
||||
(Section)(0), // 0: neo.fs.v2.status.Section
|
||||
|
@ -654,12 +589,11 @@ var file_status_grpc_types_proto_goTypes = []interface{}{
|
|||
(Object)(0), // 3: neo.fs.v2.status.Object
|
||||
(Container)(0), // 4: neo.fs.v2.status.Container
|
||||
(Session)(0), // 5: neo.fs.v2.status.Session
|
||||
(APEManager)(0), // 6: neo.fs.v2.status.APEManager
|
||||
(*Status)(nil), // 7: neo.fs.v2.status.Status
|
||||
(*Status_Detail)(nil), // 8: neo.fs.v2.status.Status.Detail
|
||||
(*Status)(nil), // 6: neo.fs.v2.status.Status
|
||||
(*Status_Detail)(nil), // 7: neo.fs.v2.status.Status.Detail
|
||||
}
|
||||
var file_status_grpc_types_proto_depIdxs = []int32{
|
||||
8, // 0: neo.fs.v2.status.Status.details:type_name -> neo.fs.v2.status.Status.Detail
|
||||
7, // 0: neo.fs.v2.status.Status.details:type_name -> neo.fs.v2.status.Status.Detail
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
|
@ -703,7 +637,7 @@ func file_status_grpc_types_proto_init() {
|
|||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_status_grpc_types_proto_rawDesc,
|
||||
NumEnums: 7,
|
||||
NumEnums: 6,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
|
|
|
@ -30,10 +30,6 @@ func (x *Detail) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
func (x *Detail) StableSize() (size int) {
|
||||
if x == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.UInt32Size(detailIDFNum, x.id)
|
||||
size += protoutil.BytesSize(detailValueFNum, x.val)
|
||||
|
||||
|
@ -73,10 +69,6 @@ func (x *Status) StableMarshal(buf []byte) []byte {
|
|||
}
|
||||
|
||||
func (x *Status) StableSize() (size int) {
|
||||
if x == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size += protoutil.UInt32Size(statusCodeFNum, CodeToGRPC(x.code))
|
||||
size += protoutil.StringSize(statusMsgFNum, x.msg)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue