Compare commits
No commits in common. "master" and "feature/ec-get-head" have entirely different histories.
master
...
feature/ec
50 changed files with 1138 additions and 4070 deletions
|
@ -2,8 +2,6 @@ package acl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
acl "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl/grpc"
|
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"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||||
refsGRPC "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
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/grpc"
|
||||||
|
@ -166,7 +164,7 @@ func (f *HeaderFilter) ToGRPCMessage() grpc.Message {
|
||||||
|
|
||||||
m.SetKey(f.key)
|
m.SetKey(f.key)
|
||||||
m.SetValue(f.value)
|
m.SetValue(f.value)
|
||||||
m.SetHeaderType(HeaderTypeToGRPCField(f.hdrType))
|
m.SetHeader(HeaderTypeToGRPCField(f.hdrType))
|
||||||
m.SetMatchType(MatchTypeToGRPCField(f.matchType))
|
m.SetMatchType(MatchTypeToGRPCField(f.matchType))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,54 +418,6 @@ func (l *TokenLifetime) FromGRPCMessage(m grpc.Message) error {
|
||||||
return nil
|
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 {
|
func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message {
|
||||||
var m *acl.BearerToken_Body
|
var m *acl.BearerToken_Body
|
||||||
|
|
||||||
|
@ -477,8 +427,7 @@ func (bt *BearerTokenBody) ToGRPCMessage() grpc.Message {
|
||||||
m.SetOwnerId(bt.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
m.SetOwnerId(bt.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
||||||
m.SetLifetime(bt.lifetime.ToGRPCMessage().(*acl.BearerToken_Body_TokenLifetime))
|
m.SetLifetime(bt.lifetime.ToGRPCMessage().(*acl.BearerToken_Body_TokenLifetime))
|
||||||
m.SetEaclTable(bt.eacl.ToGRPCMessage().(*acl.EACLTable))
|
m.SetEaclTable(bt.eacl.ToGRPCMessage().(*acl.EACLTable))
|
||||||
m.SetAllowImpersonate(bt.impersonate)
|
m.SetImpersonate(bt.impersonate)
|
||||||
m.SetAPEOverride(bt.apeOverride.ToGRPCMessage().(*acl.BearerToken_Body_APEOverride))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -528,19 +477,7 @@ func (bt *BearerTokenBody) FromGRPCMessage(m grpc.Message) error {
|
||||||
bt.eacl = new(Table)
|
bt.eacl = new(Table)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = bt.eacl.FromGRPCMessage(eacl); err != nil {
|
err = bt.eacl.FromGRPCMessage(eacl)
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bt.impersonate = v.GetAllowImpersonate()
|
bt.impersonate = v.GetAllowImpersonate()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package acl
|
package acl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
ape "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
|
||||||
refs "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/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
|
m.Targets = v
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHeaderType sets header type of the eACL filter.
|
// SetHeader sets header type of the eACL filter.
|
||||||
func (m *EACLRecord_Filter) SetHeaderType(v HeaderType) {
|
func (m *EACLRecord_Filter) SetHeader(v HeaderType) {
|
||||||
m.HeaderType = v
|
m.HeaderType = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,18 +74,6 @@ func (m *BearerToken_Body) SetEaclTable(v *EACLTable) {
|
||||||
m.EaclTable = v
|
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.
|
// SetOwnerId sets identifier of the bearer token owner.
|
||||||
func (m *BearerToken_Body) SetOwnerId(v *refs.OwnerID) {
|
func (m *BearerToken_Body) SetOwnerId(v *refs.OwnerID) {
|
||||||
m.OwnerId = v
|
m.OwnerId = v
|
||||||
|
@ -97,8 +84,8 @@ func (m *BearerToken_Body) SetLifetime(v *BearerToken_Body_TokenLifetime) {
|
||||||
m.Lifetime = v
|
m.Lifetime = v
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetAllowImpersonate allows impersonate.
|
// SetImpersonate allows impersonate.
|
||||||
func (m *BearerToken_Body) SetAllowImpersonate(v bool) {
|
func (m *BearerToken_Body) SetImpersonate(v bool) {
|
||||||
m.AllowImpersonate = v
|
m.AllowImpersonate = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
338
acl/grpc/types.pb.go
generated
338
acl/grpc/types.pb.go
generated
|
@ -7,7 +7,6 @@
|
||||||
package acl
|
package acl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
grpc1 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape/grpc"
|
|
||||||
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
grpc "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/grpc"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
@ -708,8 +707,6 @@ type BearerToken_Body struct {
|
||||||
// container. If it contains `container_id` field, bearer token is only
|
// container. If it contains `container_id` field, bearer token is only
|
||||||
// valid for this specific container. Otherwise, any container of the same
|
// valid for this specific container. Otherwise, any container of the same
|
||||||
// owner is allowed.
|
// owner is allowed.
|
||||||
//
|
|
||||||
// Deprecated: eACL tables are no longer relevant - `APEOverrides` should be used instead.
|
|
||||||
EaclTable *EACLTable `protobuf:"bytes,1,opt,name=eacl_table,json=eaclTable,proto3" json:"eacl_table,omitempty"`
|
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
|
// `OwnerID` defines to whom the token was issued. It must match the request
|
||||||
// originator's `OwnerID`. If empty, any token bearer will be accepted.
|
// originator's `OwnerID`. If empty, any token bearer will be accepted.
|
||||||
|
@ -719,8 +716,6 @@ type BearerToken_Body struct {
|
||||||
// AllowImpersonate flag to consider token signer as request owner.
|
// AllowImpersonate flag to consider token signer as request owner.
|
||||||
// If this field is true extended ACL table in token body isn't processed.
|
// 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"`
|
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() {
|
func (x *BearerToken_Body) Reset() {
|
||||||
|
@ -783,13 +778,6 @@ func (x *BearerToken_Body) GetAllowImpersonate() bool {
|
||||||
return false
|
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
|
// Lifetime parameters of the token. Field names taken from
|
||||||
// [rfc7519](https://tools.ietf.org/html/rfc7519).
|
// [rfc7519](https://tools.ietf.org/html/rfc7519).
|
||||||
type BearerToken_Body_TokenLifetime struct {
|
type BearerToken_Body_TokenLifetime struct {
|
||||||
|
@ -858,189 +846,113 @@ func (x *BearerToken_Body_TokenLifetime) GetIat() uint64 {
|
||||||
return 0
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_acl_grpc_types_proto_rawDesc = []byte{
|
var file_acl_grpc_types_proto_rawDesc = []byte{
|
||||||
0x0a, 0x14, 0x61, 0x63, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
|
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,
|
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,
|
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,
|
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a,
|
||||||
0x65, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
0x0a, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x6f,
|
||||||
0x74, 0x6f, 0x22, 0xda, 0x03, 0x0a, 0x0a, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18,
|
||||||
0x64, 0x12, 0x36, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01,
|
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4f,
|
||||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||||
0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09,
|
0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
|
||||||
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74,
|
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
|
0x61, 0x63, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
|
||||||
0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20,
|
||||||
0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74,
|
0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
||||||
0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e,
|
0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x46,
|
||||||
0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65,
|
0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3a,
|
||||||
0x63, 0x6f, 0x72, 0x64, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c,
|
0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
0x74, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18,
|
0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e,
|
||||||
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||||
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0xa5, 0x01, 0x0a, 0x06, 0x46,
|
||||||
0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f,
|
||||||
0x1a, 0xa5, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0b, 0x68,
|
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f,
|
||||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||||
0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70,
|
||||||
0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x68, 0x65, 0x61,
|
0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||||
0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6e, 0x65,
|
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52,
|
||||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x4d, 0x61, 0x74, 0x63,
|
0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||||
0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65,
|
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
|
||||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
0x75, 0x65, 0x1a, 0x45, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x27, 0x0a, 0x04,
|
||||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x45, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67,
|
0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6e, 0x65, 0x6f,
|
||||||
0x65, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
|
||||||
0x32, 0x13, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20,
|
||||||
0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b,
|
0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x41,
|
||||||
0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22,
|
0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
|
||||||
0xb3, 0x01, 0x0a, 0x09, 0x45, 0x41, 0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a,
|
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66,
|
||||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x6f,
|
||||||
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x12, 0x3e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64,
|
0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e,
|
0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0b, 0x63,
|
||||||
0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65,
|
||||||
0x72, 0x49, 0x44, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44,
|
0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65,
|
||||||
0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c,
|
||||||
0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63,
|
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22,
|
||||||
0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65,
|
0xb0, 0x03, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
|
||||||
0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xf3, 0x04, 0x0a, 0x0b, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72,
|
0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
|
||||||
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20,
|
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e,
|
0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04,
|
||||||
0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e,
|
0x62, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||||
0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
||||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
|
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
|
||||||
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53,
|
0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0xb2, 0x02,
|
||||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74,
|
0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x0a, 0x65, 0x61, 0x63, 0x6c, 0x5f, 0x74,
|
||||||
0x75, 0x72, 0x65, 0x1a, 0xf5, 0x03, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x37, 0x0a, 0x0a,
|
0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||||
0x65, 0x61, 0x63, 0x6c, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x45, 0x41, 0x43, 0x4c, 0x54,
|
||||||
0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c,
|
0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x65, 0x61, 0x63, 0x6c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12,
|
||||||
0x2e, 0x45, 0x41, 0x43, 0x4c, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x09, 0x65, 0x61, 0x63, 0x6c,
|
0x32, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69,
|
0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65,
|
||||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
0x66, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65,
|
||||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44,
|
0x72, 0x49, 0x44, 0x12, 0x49, 0x0a, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||||
0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x49, 0x0a, 0x08, 0x6c, 0x69, 0x66,
|
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
||||||
0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x65,
|
0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
|
||||||
0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72,
|
0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65,
|
||||||
0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x54, 0x6f, 0x6b,
|
0x74, 0x69, 0x6d, 0x65, 0x52, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b,
|
||||||
0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x08, 0x6c, 0x69, 0x66, 0x65,
|
0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
|
||||||
0x74, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x6d,
|
0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
|
||||||
0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
|
0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74, 0x65, 0x1a, 0x45, 0x0a, 0x0d, 0x54,
|
||||||
0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6d, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x74,
|
0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||||
0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x61, 0x70, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
|
0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x10,
|
||||||
0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
0x0a, 0x03, 0x6e, 0x62, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6e, 0x62, 0x66,
|
||||||
0x2e, 0x76, 0x32, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f,
|
0x12, 0x10, 0x0a, 0x03, 0x69, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x69,
|
||||||
0x6b, 0x65, 0x6e, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x2e, 0x41, 0x50, 0x45, 0x4f, 0x76, 0x65, 0x72,
|
0x61, 0x74, 0x2a, 0x3e, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f,
|
||||||
0x72, 0x69, 0x64, 0x65, 0x52, 0x0b, 0x61, 0x70, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
|
0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
|
||||||
0x65, 0x1a, 0x45, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x66, 0x65, 0x74, 0x69,
|
0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59,
|
||||||
0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
|
0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x53,
|
||||||
0x03, 0x65, 0x78, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x62, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||||
0x04, 0x52, 0x03, 0x6e, 0x62, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x61, 0x74, 0x18, 0x03, 0x20,
|
0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
||||||
0x01, 0x28, 0x04, 0x52, 0x03, 0x69, 0x61, 0x74, 0x1a, 0x71, 0x0a, 0x0b, 0x41, 0x50, 0x45, 0x4f,
|
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53,
|
||||||
0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
|
0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a,
|
||||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41,
|
||||||
0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61,
|
0x4c, 0x10, 0x02, 0x2a, 0x7a, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x06,
|
0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e,
|
||||||
0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x66,
|
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47,
|
||||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x2e, 0x43, 0x68,
|
0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x07,
|
||||||
0x61, 0x69, 0x6e, 0x52, 0x06, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2a, 0x3e, 0x0a, 0x04, 0x52,
|
0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54,
|
||||||
0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
|
0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x05, 0x12,
|
||||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45,
|
0x0c, 0x0a, 0x08, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a,
|
||||||
0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x02, 0x12,
|
0x0c, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x48, 0x41, 0x53, 0x48, 0x10, 0x07, 0x2a,
|
||||||
0x0a, 0x0a, 0x06, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x53, 0x10, 0x03, 0x2a, 0x4f, 0x0a, 0x09, 0x4d,
|
0x35, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54,
|
||||||
0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43,
|
0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||||
0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
|
||||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45,
|
0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x2a, 0x4a, 0x0a, 0x0a, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||||
0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x55,
|
||||||
0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x2a, 0x7a, 0x0a, 0x09,
|
0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
|
||||||
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45,
|
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a,
|
||||||
0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,
|
||||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a,
|
0x10, 0x03, 0x42, 0x58, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
||||||
0x04, 0x48, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x03,
|
0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||||
0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06,
|
0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2d,
|
||||||
0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x45, 0x54, 0x52,
|
0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x6c, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61,
|
||||||
0x41, 0x4e, 0x47, 0x45, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x45, 0x54, 0x52, 0x41, 0x4e,
|
0x63, 0x6c, 0xaa, 0x02, 0x17, 0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f,
|
||||||
0x47, 0x45, 0x48, 0x41, 0x53, 0x48, 0x10, 0x07, 0x2a, 0x35, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69,
|
0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x2e, 0x41, 0x63, 0x6c, 0x62, 0x06, 0x70, 0x72,
|
||||||
0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53,
|
0x6f, 0x74, 0x6f, 0x33,
|
||||||
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 (
|
var (
|
||||||
|
@ -1056,7 +968,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_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{}{
|
var file_acl_grpc_types_proto_goTypes = []interface{}{
|
||||||
(Role)(0), // 0: neo.fs.v2.acl.Role
|
(Role)(0), // 0: neo.fs.v2.acl.Role
|
||||||
(MatchType)(0), // 1: neo.fs.v2.acl.MatchType
|
(MatchType)(0), // 1: neo.fs.v2.acl.MatchType
|
||||||
|
@ -1070,38 +982,32 @@ var file_acl_grpc_types_proto_goTypes = []interface{}{
|
||||||
(*EACLRecord_Target)(nil), // 9: neo.fs.v2.acl.EACLRecord.Target
|
(*EACLRecord_Target)(nil), // 9: neo.fs.v2.acl.EACLRecord.Target
|
||||||
(*BearerToken_Body)(nil), // 10: neo.fs.v2.acl.BearerToken.Body
|
(*BearerToken_Body)(nil), // 10: neo.fs.v2.acl.BearerToken.Body
|
||||||
(*BearerToken_Body_TokenLifetime)(nil), // 11: neo.fs.v2.acl.BearerToken.Body.TokenLifetime
|
(*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), // 12: neo.fs.v2.refs.Version
|
||||||
(*grpc.Version)(nil), // 13: neo.fs.v2.refs.Version
|
(*grpc.ContainerID)(nil), // 13: neo.fs.v2.refs.ContainerID
|
||||||
(*grpc.ContainerID)(nil), // 14: neo.fs.v2.refs.ContainerID
|
(*grpc.Signature)(nil), // 14: neo.fs.v2.refs.Signature
|
||||||
(*grpc.Signature)(nil), // 15: neo.fs.v2.refs.Signature
|
(*grpc.OwnerID)(nil), // 15: neo.fs.v2.refs.OwnerID
|
||||||
(*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
|
|
||||||
}
|
}
|
||||||
var file_acl_grpc_types_proto_depIdxs = []int32{
|
var file_acl_grpc_types_proto_depIdxs = []int32{
|
||||||
2, // 0: neo.fs.v2.acl.EACLRecord.operation:type_name -> neo.fs.v2.acl.Operation
|
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
|
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
|
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
|
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
|
12, // 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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
15, // [15:15] is the sub-list for method output_type
|
||||||
17, // 16: neo.fs.v2.acl.BearerToken.Body.APEOverride.target:type_name -> frostfs.v2.ape.ChainTarget
|
15, // [15:15] is the sub-list for method input_type
|
||||||
18, // 17: neo.fs.v2.acl.BearerToken.Body.APEOverride.chains:type_name -> frostfs.v2.ape.Chain
|
15, // [15:15] is the sub-list for extension type_name
|
||||||
18, // [18:18] is the sub-list for method output_type
|
15, // [15:15] is the sub-list for extension extendee
|
||||||
18, // [18:18] is the sub-list for method input_type
|
0, // [0:15] is the sub-list for field type_name
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_acl_grpc_types_proto_init() }
|
func init() { file_acl_grpc_types_proto_init() }
|
||||||
|
@ -1194,18 +1100,6 @@ func file_acl_grpc_types_proto_init() {
|
||||||
return nil
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
|
@ -1213,7 +1107,7 @@ func file_acl_grpc_types_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_acl_grpc_types_proto_rawDesc,
|
RawDescriptor: file_acl_grpc_types_proto_rawDesc,
|
||||||
NumEnums: 5,
|
NumEnums: 5,
|
||||||
NumMessages: 8,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,14 +21,6 @@ func (t *Target) UnmarshalJSON(data []byte) error {
|
||||||
return message.UnmarshalJSON(t, data, new(acl.EACLRecord_Target))
|
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) {
|
func (r *Record) MarshalJSON() ([]byte, error) {
|
||||||
return message.MarshalJSON(r)
|
return message.MarshalJSON(r)
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,14 +28,10 @@ const (
|
||||||
lifetimeNotValidBeforeField = 2
|
lifetimeNotValidBeforeField = 2
|
||||||
lifetimeIssuedAtField = 3
|
lifetimeIssuedAtField = 3
|
||||||
|
|
||||||
tokenAPEChainsTargetField = 1
|
bearerTokenBodyACLField = 1
|
||||||
tokenAPEChainsChainsField = 2
|
bearerTokenBodyOwnerField = 2
|
||||||
|
bearerTokenBodyLifetimeField = 3
|
||||||
bearerTokenBodyACLField = 1
|
bearerTokenBodyImpersonate = 4
|
||||||
bearerTokenBodyOwnerField = 2
|
|
||||||
bearerTokenBodyLifetimeField = 3
|
|
||||||
bearerTokenBodyImpersonate = 4
|
|
||||||
bearerTokenTokenAPEChainsField = 5
|
|
||||||
|
|
||||||
bearerTokenBodyField = 1
|
bearerTokenBodyField = 1
|
||||||
bearerTokenSignatureField = 2
|
bearerTokenSignatureField = 2
|
||||||
|
@ -243,42 +239,6 @@ func (l *TokenLifetime) Unmarshal(data []byte) error {
|
||||||
return message.Unmarshal(l, data, new(acl.BearerToken_Body_TokenLifetime))
|
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 {
|
func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte {
|
||||||
if bt == nil {
|
if bt == nil {
|
||||||
return []byte{}
|
return []byte{}
|
||||||
|
@ -293,8 +253,7 @@ func (bt *BearerTokenBody) StableMarshal(buf []byte) []byte {
|
||||||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyACLField, buf[offset:], bt.eacl)
|
offset += protoutil.NestedStructureMarshal(bearerTokenBodyACLField, buf[offset:], bt.eacl)
|
||||||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyOwnerField, buf[offset:], bt.ownerID)
|
offset += protoutil.NestedStructureMarshal(bearerTokenBodyOwnerField, buf[offset:], bt.ownerID)
|
||||||
offset += protoutil.NestedStructureMarshal(bearerTokenBodyLifetimeField, buf[offset:], bt.lifetime)
|
offset += protoutil.NestedStructureMarshal(bearerTokenBodyLifetimeField, buf[offset:], bt.lifetime)
|
||||||
offset += protoutil.BoolMarshal(bearerTokenBodyImpersonate, buf[offset:], bt.impersonate)
|
protoutil.BoolMarshal(bearerTokenBodyImpersonate, buf[offset:], bt.impersonate)
|
||||||
protoutil.NestedStructureMarshal(bearerTokenTokenAPEChainsField, buf[offset:], bt.apeOverride)
|
|
||||||
|
|
||||||
return buf
|
return buf
|
||||||
}
|
}
|
||||||
|
@ -308,7 +267,6 @@ func (bt *BearerTokenBody) StableSize() (size int) {
|
||||||
size += protoutil.NestedStructureSize(bearerTokenBodyOwnerField, bt.ownerID)
|
size += protoutil.NestedStructureSize(bearerTokenBodyOwnerField, bt.ownerID)
|
||||||
size += protoutil.NestedStructureSize(bearerTokenBodyLifetimeField, bt.lifetime)
|
size += protoutil.NestedStructureSize(bearerTokenBodyLifetimeField, bt.lifetime)
|
||||||
size += protoutil.BoolSize(bearerTokenBodyImpersonate, bt.impersonate)
|
size += protoutil.BoolSize(bearerTokenBodyImpersonate, bt.impersonate)
|
||||||
size += protoutil.NestedStructureSize(bearerTokenTokenAPEChainsField, bt.apeOverride)
|
|
||||||
|
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package acltest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/acl"
|
"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"
|
accountingtest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,20 +22,8 @@ func GenerateBearerTokenBody(empty bool) *acl.BearerTokenBody {
|
||||||
|
|
||||||
if !empty {
|
if !empty {
|
||||||
m.SetOwnerID(accountingtest.GenerateOwnerID(false))
|
m.SetOwnerID(accountingtest.GenerateOwnerID(false))
|
||||||
|
m.SetEACL(GenerateTable(false))
|
||||||
m.SetLifetime(GenerateTokenLifetime(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
|
return m
|
||||||
|
|
41
acl/types.go
41
acl/types.go
|
@ -1,9 +1,6 @@
|
||||||
package acl
|
package acl
|
||||||
|
|
||||||
import (
|
import "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/ape"
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/refs"
|
|
||||||
)
|
|
||||||
|
|
||||||
// HeaderFilter is a unified structure of FilterInfo
|
// HeaderFilter is a unified structure of FilterInfo
|
||||||
// message from proto definition.
|
// message from proto definition.
|
||||||
|
@ -49,12 +46,6 @@ type TokenLifetime struct {
|
||||||
exp, nbf, iat uint64
|
exp, nbf, iat uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type APEOverride struct {
|
|
||||||
target *ape.ChainTarget
|
|
||||||
|
|
||||||
chains []*ape.Chain
|
|
||||||
}
|
|
||||||
|
|
||||||
type BearerTokenBody struct {
|
type BearerTokenBody struct {
|
||||||
eacl *Table
|
eacl *Table
|
||||||
|
|
||||||
|
@ -62,8 +53,6 @@ type BearerTokenBody struct {
|
||||||
|
|
||||||
lifetime *TokenLifetime
|
lifetime *TokenLifetime
|
||||||
|
|
||||||
apeOverride *APEOverride
|
|
||||||
|
|
||||||
impersonate bool
|
impersonate bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,34 +318,6 @@ func (bt *BearerTokenBody) SetEACL(v *Table) {
|
||||||
bt.eacl = v
|
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 {
|
func (bt *BearerTokenBody) GetOwnerID() *refs.OwnerID {
|
||||||
if bt != nil {
|
if bt != nil {
|
||||||
return bt.ownerID
|
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.33.0
|
||||||
|
// protoc v4.25.3
|
||||||
|
// 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 (
|
import (
|
||||||
"testing"
|
"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"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||||
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
|
messagetest "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/message/test"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMessageConvert(t *testing.T) {
|
func TestMessageConvert(t *testing.T) {
|
||||||
messagetest.TestRPCMessage(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
|
||||||
|
}
|
|
@ -269,9 +269,6 @@ func (h *ECHeader) ToGRPCMessage() grpc.Message {
|
||||||
m = new(object.Header_EC)
|
m = new(object.Header_EC)
|
||||||
|
|
||||||
m.Parent = h.Parent.ToGRPCMessage().(*refsGRPC.ObjectID)
|
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.Index = h.Index
|
||||||
m.Total = h.Total
|
m.Total = h.Total
|
||||||
m.Header = h.Header
|
m.Header = h.Header
|
||||||
|
@ -303,26 +300,6 @@ func (h *ECHeader) FromGRPCMessage(m grpc.Message) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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.Index = v.GetIndex()
|
||||||
h.Total = v.GetTotal()
|
h.Total = v.GetTotal()
|
||||||
h.Header = v.GetHeader()
|
h.Header = v.GetHeader()
|
||||||
|
@ -924,7 +901,7 @@ func (r *GetResponseBody) ToGRPCMessage() grpc.Message {
|
||||||
case *SplitInfo:
|
case *SplitInfo:
|
||||||
m.SetSplitInfo(t.ToGRPCMessage().(*object.SplitInfo))
|
m.SetSplitInfo(t.ToGRPCMessage().(*object.SplitInfo))
|
||||||
case *ECInfo:
|
case *ECInfo:
|
||||||
m.SetEcInfo(t.ToGRPCMessage().(*object.ECInfo))
|
m.SetECInfo(t.ToGRPCMessage().(*object.ECInfo))
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unknown get object part %T", t))
|
panic(fmt.Sprintf("unknown get object part %T", t))
|
||||||
}
|
}
|
||||||
|
@ -1509,7 +1486,7 @@ func (r *HeadResponseBody) ToGRPCMessage() grpc.Message {
|
||||||
case *SplitInfo:
|
case *SplitInfo:
|
||||||
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
||||||
case *ECInfo:
|
case *ECInfo:
|
||||||
m.SetEcInfo(v.ToGRPCMessage().(*object.ECInfo))
|
m.SetECInfo(v.ToGRPCMessage().(*object.ECInfo))
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unknown head part %T", v))
|
panic(fmt.Sprintf("unknown head part %T", v))
|
||||||
}
|
}
|
||||||
|
@ -1985,8 +1962,6 @@ func (r *GetRangeResponseBody) ToGRPCMessage() grpc.Message {
|
||||||
m.SetChunk(v.ToGRPCMessage().(*object.GetRangeResponse_Body_Chunk))
|
m.SetChunk(v.ToGRPCMessage().(*object.GetRangeResponse_Body_Chunk))
|
||||||
case *SplitInfo:
|
case *SplitInfo:
|
||||||
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
m.SetSplitInfo(v.ToGRPCMessage().(*object.SplitInfo))
|
||||||
case *ECInfo:
|
|
||||||
m.SetEcInfo(v.ToGRPCMessage().(*object.ECInfo))
|
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("unknown get range part %T", v))
|
panic(fmt.Sprintf("unknown get range part %T", v))
|
||||||
}
|
}
|
||||||
|
@ -2019,12 +1994,6 @@ func (r *GetRangeResponseBody) FromGRPCMessage(m grpc.Message) error {
|
||||||
r.rngPart = partSplit
|
r.rngPart = partSplit
|
||||||
err = partSplit.FromGRPCMessage(pt.SplitInfo)
|
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:
|
default:
|
||||||
err = fmt.Errorf("unknown get range part %T", pt)
|
err = fmt.Errorf("unknown get range part %T", pt)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,6 @@ const (
|
||||||
|
|
||||||
// FilterHeaderSplitID is a filter key to "split.splitID" field of the object header.
|
// FilterHeaderSplitID is a filter key to "split.splitID" field of the object header.
|
||||||
FilterHeaderSplitID = ReservedFilterPrefix + "split.splitID"
|
FilterHeaderSplitID = ReservedFilterPrefix + "split.splitID"
|
||||||
|
|
||||||
// FilterHeaderECParent is a filter key to "ec.parent" field of the object header.
|
|
||||||
FilterHeaderECParent = ReservedFilterPrefix + "ec.parent"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -78,8 +78,8 @@ func (m *GetResponse_Body) SetSplitInfo(v *SplitInfo) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEcInfo sets part of the object payload.
|
// SetECInfo sets part of the object payload.
|
||||||
func (m *GetResponse_Body) SetEcInfo(v *ECInfo) {
|
func (m *GetResponse_Body) SetECInfo(v *ECInfo) {
|
||||||
m.ObjectPart = &GetResponse_Body_EcInfo{
|
m.ObjectPart = &GetResponse_Body_EcInfo{
|
||||||
EcInfo: v,
|
EcInfo: v,
|
||||||
}
|
}
|
||||||
|
@ -282,8 +282,8 @@ func (m *HeadResponse_Body) SetSplitInfo(v *SplitInfo) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEcInfo sets meta info about the erasure coded object.
|
// SetECInfo sets meta info about the erasure coded object.
|
||||||
func (m *HeadResponse_Body) SetEcInfo(v *ECInfo) {
|
func (m *HeadResponse_Body) SetECInfo(v *ECInfo) {
|
||||||
m.Head = &HeadResponse_Body_EcInfo{
|
m.Head = &HeadResponse_Body_EcInfo{
|
||||||
EcInfo: v,
|
EcInfo: v,
|
||||||
}
|
}
|
||||||
|
@ -435,13 +435,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.
|
// SetBody sets body of the response.
|
||||||
func (m *GetRangeResponse) SetBody(v *GetRangeResponse_Body) {
|
func (m *GetRangeResponse) SetBody(v *GetRangeResponse_Body) {
|
||||||
m.Body = v
|
m.Body = v
|
||||||
|
|
3
object/grpc/service.pb.go
generated
3
object/grpc/service.pb.go
generated
|
@ -2113,9 +2113,6 @@ func (x *SearchRequest_Body) GetFilters() []*SearchRequest_Body_Filter {
|
||||||
// object_id of parent
|
// object_id of parent
|
||||||
// - $Object:split.splitID \
|
// - $Object:split.splitID \
|
||||||
// 16 byte UUIDv4 used to identify the split object hierarchy parts
|
// 16 byte UUIDv4 used to identify the split object hierarchy parts
|
||||||
// - $Object:ec.parent \
|
|
||||||
// If the object is stored according to EC policy, then ec_parent attribute
|
|
||||||
// is set to return an id list of all related EC chunks.
|
|
||||||
//
|
//
|
||||||
// There are some well-known filter aliases to match objects by certain
|
// There are some well-known filter aliases to match objects by certain
|
||||||
// properties:
|
// properties:
|
||||||
|
|
160
object/grpc/types.pb.go
generated
160
object/grpc/types.pb.go
generated
|
@ -823,16 +823,6 @@ type Header_EC struct {
|
||||||
HeaderLength uint32 `protobuf:"varint,4,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"`
|
HeaderLength uint32 `protobuf:"varint,4,opt,name=header_length,json=headerLength,proto3" json:"header_length,omitempty"`
|
||||||
// Chunk of a parent header.
|
// Chunk of a parent header.
|
||||||
Header []byte `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"`
|
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() {
|
func (x *Header_EC) Reset() {
|
||||||
|
@ -902,27 +892,6 @@ func (x *Header_EC) GetHeader() []byte {
|
||||||
return nil
|
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 {
|
type ECInfo_Chunk struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1022,7 +991,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,
|
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,
|
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,
|
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, 0xca, 0x09, 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,
|
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,
|
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,
|
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||||
|
@ -1088,7 +1057,7 @@ var file_object_grpc_types_proto_rawDesc = []byte{
|
||||||
0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e,
|
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,
|
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,
|
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,
|
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x44, 0x1a, 0x9f, 0x01,
|
||||||
0x0a, 0x02, 0x45, 0x43, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01,
|
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,
|
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,
|
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x06,
|
||||||
|
@ -1098,69 +1067,56 @@ var file_object_grpc_types_proto_rawDesc = []byte{
|
||||||
0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x6e,
|
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,
|
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, 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,
|
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22,
|
||||||
0x26, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f,
|
0xc4, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6f, 0x62,
|
||||||
0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||||
0x53, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x44, 0x12, 0x4d, 0x0a, 0x16, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f,
|
||||||
0x74, 0x5f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69,
|
0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49,
|
||||||
0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73,
|
0x44, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02,
|
||||||
0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32,
|
||||||
0x44, 0x52, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61,
|
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52,
|
||||||
0x72, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x4f, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
|
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x68, 0x65,
|
||||||
0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
|
0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f,
|
||||||
0x0b, 0x32, 0x22, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62,
|
0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65,
|
||||||
0x6a, 0x65, 0x63, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x74, 0x74, 0x72,
|
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07,
|
||||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74,
|
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70,
|
||||||
0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65,
|
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x09, 0x53, 0x70, 0x6c, 0x69, 0x74,
|
||||||
0x63, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x69, 0x64,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49, 0x64, 0x12,
|
||||||
0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52,
|
0x35, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x69, 0x67,
|
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72,
|
||||||
0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e,
|
0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x08, 0x6c, 0x61,
|
||||||
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x53, 0x69,
|
0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03,
|
||||||
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,
|
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,
|
0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x04,
|
||||||
0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x9f, 0x01, 0x0a, 0x06, 0x45, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||||
0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
|
0x36, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2a, 0x32,
|
0x1e, 0x2e, 0x6e, 0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x6f, 0x62, 0x6a, 0x65,
|
||||||
0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
|
0x63, 0x74, 0x2e, 0x45, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52,
|
||||||
0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d,
|
0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x1a, 0x5d, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b,
|
||||||
0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x43, 0x4b,
|
0x12, 0x28, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e,
|
||||||
0x10, 0x03, 0x2a, 0x73, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12,
|
0x65, 0x6f, 0x2e, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x65, 0x66, 0x73, 0x2e, 0x4f, 0x62,
|
||||||
0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
|
0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e,
|
||||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53,
|
0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a,
|
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||||
0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41,
|
0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2a, 0x32, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||||
0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45,
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10,
|
||||||
0x4e, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x5f, 0x50,
|
0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x4f, 0x4d, 0x42, 0x53, 0x54, 0x4f, 0x4e, 0x45, 0x10, 0x01,
|
||||||
0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x04, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66,
|
0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x73, 0x0a, 0x09, 0x4d, 0x61,
|
||||||
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65,
|
0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x54, 0x43, 0x48,
|
||||||
0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73,
|
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
|
||||||
0x2d, 0x61, 0x70, 0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x6f, 0x62, 0x6a, 0x65, 0x63,
|
0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x51,
|
||||||
0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0xaa, 0x02, 0x1a,
|
0x55, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f,
|
||||||
0x4e, 0x65, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4e,
|
||||||
0x41, 0x50, 0x49, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x4f, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d,
|
||||||
0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
@ -1225,14 +1181,12 @@ var file_object_grpc_types_proto_depIdxs = []int32{
|
||||||
3, // 24: neo.fs.v2.object.Header.Split.parent_header:type_name -> neo.fs.v2.object.Header
|
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, // 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, // 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
|
16, // 27: neo.fs.v2.object.ECInfo.Chunk.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
|
28, // [28:28] is the sub-list for method output_type
|
||||||
16, // 29: neo.fs.v2.object.ECInfo.Chunk.id:type_name -> neo.fs.v2.refs.ObjectID
|
28, // [28:28] is the sub-list for method input_type
|
||||||
30, // [30:30] is the sub-list for method output_type
|
28, // [28:28] is the sub-list for extension type_name
|
||||||
30, // [30:30] is the sub-list for method input_type
|
28, // [28:28] is the sub-list for extension extendee
|
||||||
30, // [30:30] is the sub-list for extension type_name
|
0, // [0:28] is the sub-list for field type_name
|
||||||
30, // [30:30] is the sub-list for extension extendee
|
|
||||||
0, // [0:30] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_object_grpc_types_proto_init() }
|
func init() { file_object_grpc_types_proto_init() }
|
||||||
|
|
|
@ -26,14 +26,11 @@ const (
|
||||||
splitHdrChildrenField = 5
|
splitHdrChildrenField = 5
|
||||||
splitHdrSplitIDField = 6
|
splitHdrSplitIDField = 6
|
||||||
|
|
||||||
ecHdrParentField = 1
|
ecHdrParentField = 1
|
||||||
ecHdrIndexField = 2
|
ecHdrIndexField = 2
|
||||||
ecHdrTotalField = 3
|
ecHdrTotalField = 3
|
||||||
ecHdrHeaderLengthField = 4
|
ecHdrHeaderLengthField = 4
|
||||||
ecHdrHeaderField = 5
|
ecHdrHeaderField = 5
|
||||||
ecHdrParentSplitID = 6
|
|
||||||
ecHdrParentSplitParentID = 7
|
|
||||||
ecHdrParentAttributes = 8
|
|
||||||
|
|
||||||
hdrVersionField = 1
|
hdrVersionField = 1
|
||||||
hdrContainerIDField = 2
|
hdrContainerIDField = 2
|
||||||
|
@ -120,7 +117,6 @@ const (
|
||||||
|
|
||||||
getRangeRespChunkField = 1
|
getRangeRespChunkField = 1
|
||||||
getRangeRespSplitInfoField = 2
|
getRangeRespSplitInfoField = 2
|
||||||
getRangeRespECInfoField = 3
|
|
||||||
|
|
||||||
getRangeHashReqBodyAddressField = 1
|
getRangeHashReqBodyAddressField = 1
|
||||||
getRangeHashReqBodyRangesField = 2
|
getRangeHashReqBodyRangesField = 2
|
||||||
|
@ -263,12 +259,7 @@ func (h *ECHeader) StableMarshal(buf []byte) []byte {
|
||||||
offset += proto.UInt32Marshal(ecHdrIndexField, buf[offset:], h.Index)
|
offset += proto.UInt32Marshal(ecHdrIndexField, buf[offset:], h.Index)
|
||||||
offset += proto.UInt32Marshal(ecHdrTotalField, buf[offset:], h.Total)
|
offset += proto.UInt32Marshal(ecHdrTotalField, buf[offset:], h.Total)
|
||||||
offset += proto.UInt32Marshal(ecHdrHeaderLengthField, buf[offset:], h.HeaderLength)
|
offset += proto.UInt32Marshal(ecHdrHeaderLengthField, buf[offset:], h.HeaderLength)
|
||||||
offset += proto.BytesMarshal(ecHdrHeaderField, buf[offset:], h.Header)
|
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
|
return buf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,11 +273,6 @@ func (h *ECHeader) StableSize() (size int) {
|
||||||
size += proto.UInt32Size(ecHdrTotalField, h.Total)
|
size += proto.UInt32Size(ecHdrTotalField, h.Total)
|
||||||
size += proto.UInt32Size(ecHdrHeaderLengthField, h.HeaderLength)
|
size += proto.UInt32Size(ecHdrHeaderLengthField, h.HeaderLength)
|
||||||
size += proto.BytesSize(ecHdrHeaderField, h.Header)
|
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
|
return size
|
||||||
}
|
}
|
||||||
|
@ -1124,10 +1110,6 @@ func (r *GetRangeResponseBody) StableMarshal(buf []byte) []byte {
|
||||||
if v != nil {
|
if v != nil {
|
||||||
proto.NestedStructureMarshal(getRangeRespSplitInfoField, buf, v)
|
proto.NestedStructureMarshal(getRangeRespSplitInfoField, buf, v)
|
||||||
}
|
}
|
||||||
case *ECInfo:
|
|
||||||
if v != nil {
|
|
||||||
proto.NestedStructureMarshal(getRangeRespECInfoField, buf, v)
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
panic("unknown one of object get range request body type")
|
panic("unknown one of object get range request body type")
|
||||||
}
|
}
|
||||||
|
@ -1150,10 +1132,6 @@ func (r *GetRangeResponseBody) StableSize() (size int) {
|
||||||
if v != nil {
|
if v != nil {
|
||||||
size = proto.NestedStructureSize(getRangeRespSplitInfoField, v)
|
size = proto.NestedStructureSize(getRangeRespSplitInfoField, v)
|
||||||
}
|
}
|
||||||
case *ECInfo:
|
|
||||||
if v != nil {
|
|
||||||
size = proto.NestedStructureSize(getRangeRespECInfoField, v)
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
panic("unknown one of object get range request body type")
|
panic("unknown one of object get range request body type")
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,7 @@ func TestMessageConvert(t *testing.T) {
|
||||||
func(empty bool) message.Message { return objecttest.GenerateShortHeader(empty) },
|
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.GenerateAttribute(empty) },
|
||||||
func(empty bool) message.Message { return objecttest.GenerateSplitHeader(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.GenerateHeader(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.GenerateObject(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.GenerateSplitInfo(empty) },
|
||||||
func(empty bool) message.Message { return objecttest.GenerateECInfo(empty) },
|
func(empty bool) message.Message { return objecttest.GenerateECInfo(empty) },
|
||||||
|
|
|
@ -68,42 +68,17 @@ func generateSplitHeader(empty, withPar bool) *object.SplitHeader {
|
||||||
m.SetParentSignature(refstest.GenerateSignature(empty))
|
m.SetParentSignature(refstest.GenerateSignature(empty))
|
||||||
|
|
||||||
if withPar {
|
if withPar {
|
||||||
m.SetParentHeader(GenerateHeaderWithSplitHeader(empty))
|
m.SetParentHeader(generateHeader(empty, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateHeaderWithSplitHeader(empty bool) *object.Header {
|
func GenerateHeader(empty bool) *object.Header {
|
||||||
m := generateHeader(empty)
|
return generateHeader(empty, true)
|
||||||
m.SetSplit(generateSplitHeader(empty, false))
|
|
||||||
return m
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateHeaderWithECHeader(empty bool) *object.Header {
|
func generateHeader(empty, withSplit 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 {
|
|
||||||
m := new(object.Header)
|
m := new(object.Header)
|
||||||
|
|
||||||
if !empty {
|
if !empty {
|
||||||
|
@ -120,6 +95,10 @@ func generateHeader(empty bool) *object.Header {
|
||||||
m.SetHomomorphicHash(refstest.GenerateChecksum(empty))
|
m.SetHomomorphicHash(refstest.GenerateChecksum(empty))
|
||||||
m.SetSessionToken(sessiontest.GenerateSessionToken(empty))
|
m.SetSessionToken(sessiontest.GenerateSessionToken(empty))
|
||||||
|
|
||||||
|
if withSplit {
|
||||||
|
m.SetSplit(generateSplitHeader(empty, false))
|
||||||
|
}
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +106,7 @@ func GenerateHeaderWithSignature(empty bool) *object.HeaderWithSignature {
|
||||||
m := new(object.HeaderWithSignature)
|
m := new(object.HeaderWithSignature)
|
||||||
|
|
||||||
m.SetSignature(refstest.GenerateSignature(empty))
|
m.SetSignature(refstest.GenerateSignature(empty))
|
||||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
m.SetHeader(GenerateHeader(empty))
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
@ -141,7 +120,7 @@ func GenerateObject(empty bool) *object.Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SetSignature(refstest.GenerateSignature(empty))
|
m.SetSignature(refstest.GenerateSignature(empty))
|
||||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
m.SetHeader(GenerateHeader(empty))
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
@ -215,7 +194,7 @@ func GenerateGetObjectPartInit(empty bool) *object.GetObjectPartInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SetSignature(refstest.GenerateSignature(empty))
|
m.SetSignature(refstest.GenerateSignature(empty))
|
||||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
m.SetHeader(GenerateHeader(empty))
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
@ -269,7 +248,7 @@ func GeneratePutObjectPartInit(empty bool) *object.PutObjectPartInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SetSignature(refstest.GenerateSignature(empty))
|
m.SetSignature(refstest.GenerateSignature(empty))
|
||||||
m.SetHeader(GenerateHeaderWithSplitHeader(empty))
|
m.SetHeader(GenerateHeader(empty))
|
||||||
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,14 +40,12 @@ type SplitHeader struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ECHeader struct {
|
type ECHeader struct {
|
||||||
Parent *refs.ObjectID
|
Parent *refs.ObjectID
|
||||||
ParentSplitID []byte
|
Index uint32
|
||||||
ParentSplitParentID *refs.ObjectID
|
Total uint32
|
||||||
ParentAttributes []Attribute
|
Header []byte
|
||||||
Index uint32
|
HeaderLength uint32
|
||||||
Total uint32
|
Signature []byte
|
||||||
Header []byte
|
|
||||||
HeaderLength uint32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Header struct {
|
type Header struct {
|
||||||
|
|
|
@ -196,7 +196,7 @@ func (c *Checksum) ToGRPCMessage() grpc.Message {
|
||||||
if c != nil {
|
if c != nil {
|
||||||
m = new(refs.Checksum)
|
m = new(refs.Checksum)
|
||||||
|
|
||||||
m.SetType(ChecksumTypeToGRPC(c.typ))
|
m.SetChecksumType(ChecksumTypeToGRPC(c.typ))
|
||||||
m.SetSum(c.sum)
|
m.SetSum(c.sum)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ func (x *Address) SetObjectId(v *ObjectID) {
|
||||||
x.ObjectId = v
|
x.ObjectId = v
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetType in generic checksum structure.
|
// SetChecksumType in generic checksum structure.
|
||||||
func (x *Checksum) SetType(v ChecksumType) {
|
func (x *Checksum) SetChecksumType(v ChecksumType) {
|
||||||
x.Type = v
|
x.Type = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,10 +1,3 @@
|
||||||
package rpc
|
package rpc
|
||||||
|
|
||||||
const (
|
const serviceNamePrefix = "neo.fs.v2."
|
||||||
// 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."
|
|
||||||
)
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ func (r *RequestMetaHeader) ToGRPCMessage() grpc.Message {
|
||||||
m.SetEpoch(r.epoch)
|
m.SetEpoch(r.epoch)
|
||||||
m.SetTtl(r.ttl)
|
m.SetTtl(r.ttl)
|
||||||
m.SetOrigin(r.origin.ToGRPCMessage().(*session.RequestMetaHeader))
|
m.SetOrigin(r.origin.ToGRPCMessage().(*session.RequestMetaHeader))
|
||||||
m.SetMagicNumber(r.netMagic)
|
m.SetNetworkMagic(r.netMagic)
|
||||||
}
|
}
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -674,10 +674,7 @@ func (c *ObjectSessionContext) ToGRPCMessage() grpc.Message {
|
||||||
m = new(session.ObjectSessionContext)
|
m = new(session.ObjectSessionContext)
|
||||||
|
|
||||||
m.SetVerb(ObjectSessionVerbToGRPCField(c.verb))
|
m.SetVerb(ObjectSessionVerbToGRPCField(c.verb))
|
||||||
m.SetTarget(&session.ObjectSessionContext_Target{
|
m.SetTarget(c.cnr.ToGRPCMessage().(*refsGRPC.ContainerID), refs.ObjectIDListToGRPCMessage(c.objs))
|
||||||
Container: c.cnr.ToGRPCMessage().(*refsGRPC.ContainerID),
|
|
||||||
Objects: refs.ObjectIDListToGRPCMessage(c.objs),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
@ -727,9 +724,9 @@ func (t *TokenBody) ToGRPCMessage() grpc.Message {
|
||||||
case nil:
|
case nil:
|
||||||
m.Context = nil
|
m.Context = nil
|
||||||
case *ObjectSessionContext:
|
case *ObjectSessionContext:
|
||||||
m.SetObject(typ.ToGRPCMessage().(*session.ObjectSessionContext))
|
m.SetObjectSessionContext(typ.ToGRPCMessage().(*session.ObjectSessionContext))
|
||||||
case *ContainerSessionContext:
|
case *ContainerSessionContext:
|
||||||
m.SetContainer(typ.ToGRPCMessage().(*session.ContainerSessionContext))
|
m.SetContainerSessionContext(typ.ToGRPCMessage().(*session.ContainerSessionContext))
|
||||||
}
|
}
|
||||||
|
|
||||||
m.SetOwnerId(t.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
m.SetOwnerId(t.ownerID.ToGRPCMessage().(*refsGRPC.OwnerID))
|
||||||
|
|
|
@ -52,22 +52,25 @@ func (m *SessionToken_Body) SetSessionKey(v []byte) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetObjectAddressContext sets object context of the session token.
|
// 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{
|
m.Context = &SessionToken_Body_Object{
|
||||||
Object: v,
|
Object: v,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetContainer sets container context of the session token.
|
// SetContainerSessionContext sets container context of the session token.
|
||||||
func (m *SessionToken_Body) SetContainer(v *ContainerSessionContext) {
|
func (m *SessionToken_Body) SetContainerSessionContext(v *ContainerSessionContext) {
|
||||||
m.Context = &SessionToken_Body_Container{
|
m.Context = &SessionToken_Body_Container{
|
||||||
Container: v,
|
Container: v,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetTarget specifies objects involved in the object session.
|
// SetTarget specifies objects involved in the object session.
|
||||||
func (m *ObjectSessionContext) SetTarget(tgt *ObjectSessionContext_Target) {
|
func (m *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs []*refs.ObjectID) {
|
||||||
m.Target = tgt
|
m.Target = &ObjectSessionContext_Target{
|
||||||
|
Container: cnr,
|
||||||
|
Objects: objs,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetVerb sets type of request for which the token is issued.
|
// SetVerb sets type of request for which the token is issued.
|
||||||
|
@ -144,8 +147,8 @@ func (m *RequestMetaHeader) GetNetworkMagic() uint64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetMagicNumber sets NeoFS network magic.
|
// SetNetworkMagic sets NeoFS network magic.
|
||||||
func (m *RequestMetaHeader) SetMagicNumber(v uint64) {
|
func (m *RequestMetaHeader) SetNetworkMagic(v uint64) {
|
||||||
m.MagicNumber = v
|
m.MagicNumber = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting"
|
"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/container"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
||||||
|
@ -106,19 +105,5 @@ func serviceMessageBody(req any) stableMarshaler {
|
||||||
return v.GetBody()
|
return v.GetBody()
|
||||||
case *netmap.SnapshotResponse:
|
case *netmap.SnapshotResponse:
|
||||||
return v.GetBody()
|
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
151
status/grpc/types.pb.go
generated
151
status/grpc/types.pb.go
generated
|
@ -34,8 +34,6 @@ const (
|
||||||
Section_SECTION_CONTAINER Section = 3
|
Section_SECTION_CONTAINER Section = 3
|
||||||
// Session service-specific errors.
|
// Session service-specific errors.
|
||||||
Section_SECTION_SESSION Section = 4
|
Section_SECTION_SESSION Section = 4
|
||||||
// Session service-specific errors.
|
|
||||||
Section_SECTION_APE_MANAGER Section = 5
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for Section.
|
// Enum value maps for Section.
|
||||||
|
@ -46,7 +44,6 @@ var (
|
||||||
2: "SECTION_OBJECT",
|
2: "SECTION_OBJECT",
|
||||||
3: "SECTION_CONTAINER",
|
3: "SECTION_CONTAINER",
|
||||||
4: "SECTION_SESSION",
|
4: "SECTION_SESSION",
|
||||||
5: "SECTION_APE_MANAGER",
|
|
||||||
}
|
}
|
||||||
Section_value = map[string]int32{
|
Section_value = map[string]int32{
|
||||||
"SECTION_SUCCESS": 0,
|
"SECTION_SUCCESS": 0,
|
||||||
|
@ -54,7 +51,6 @@ var (
|
||||||
"SECTION_OBJECT": 2,
|
"SECTION_OBJECT": 2,
|
||||||
"SECTION_CONTAINER": 3,
|
"SECTION_CONTAINER": 3,
|
||||||
"SECTION_SESSION": 4,
|
"SECTION_SESSION": 4,
|
||||||
"SECTION_APE_MANAGER": 5,
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -149,9 +145,6 @@ const (
|
||||||
CommonFail_SIGNATURE_VERIFICATION_FAIL CommonFail = 2
|
CommonFail_SIGNATURE_VERIFICATION_FAIL CommonFail = 2
|
||||||
// [**1027**] Node is under maintenance.
|
// [**1027**] Node is under maintenance.
|
||||||
CommonFail_NODE_UNDER_MAINTENANCE CommonFail = 3
|
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.
|
// Enum value maps for CommonFail.
|
||||||
|
@ -161,14 +154,12 @@ var (
|
||||||
1: "WRONG_MAGIC_NUMBER",
|
1: "WRONG_MAGIC_NUMBER",
|
||||||
2: "SIGNATURE_VERIFICATION_FAIL",
|
2: "SIGNATURE_VERIFICATION_FAIL",
|
||||||
3: "NODE_UNDER_MAINTENANCE",
|
3: "NODE_UNDER_MAINTENANCE",
|
||||||
4: "INVALID_ARGUMENT",
|
|
||||||
}
|
}
|
||||||
CommonFail_value = map[string]int32{
|
CommonFail_value = map[string]int32{
|
||||||
"INTERNAL": 0,
|
"INTERNAL": 0,
|
||||||
"WRONG_MAGIC_NUMBER": 1,
|
"WRONG_MAGIC_NUMBER": 1,
|
||||||
"SIGNATURE_VERIFICATION_FAIL": 2,
|
"SIGNATURE_VERIFICATION_FAIL": 2,
|
||||||
"NODE_UNDER_MAINTENANCE": 3,
|
"NODE_UNDER_MAINTENANCE": 3,
|
||||||
"INVALID_ARGUMENT": 4,
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -368,51 +359,6 @@ func (Session) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_status_grpc_types_proto_rawDescGZIP(), []int{5}
|
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.
|
// 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
|
// Status is present in all response messages. Each RPC of NeoFS protocol
|
||||||
// describes the possible outcomes and details of the operation.
|
// describes the possible outcomes and details of the operation.
|
||||||
|
@ -585,52 +531,46 @@ var file_status_grpc_types_proto_rawDesc = []byte{
|
||||||
0x2e, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
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,
|
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,
|
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,
|
0x7a, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45,
|
||||||
0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00,
|
0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12,
|
||||||
0x12, 0x1a, 0x0a, 0x16, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c,
|
0x1a, 0x0a, 0x16, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
|
||||||
0x55, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e,
|
0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53,
|
||||||
0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02,
|
0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12,
|
||||||
0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
|
0x15, 0x0a, 0x11, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||||
0x41, 0x49, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x43, 0x54, 0x49,
|
0x49, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f,
|
||||||
0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13,
|
0x4e, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0x11, 0x0a, 0x07, 0x53,
|
||||||
0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41,
|
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x6f,
|
||||||
0x47, 0x45, 0x52, 0x10, 0x05, 0x2a, 0x11, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73,
|
0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x0a, 0x08,
|
||||||
0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x85, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6d,
|
0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x52,
|
||||||
0x6d, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52,
|
0x4f, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x47, 0x49, 0x43, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52,
|
||||||
0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x52, 0x4f, 0x4e, 0x47, 0x5f, 0x4d,
|
0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f,
|
||||||
0x41, 0x47, 0x49, 0x43, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1f, 0x0a,
|
0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49,
|
||||||
0x1b, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46,
|
0x4c, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45,
|
||||||
0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x1a,
|
0x52, 0x5f, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x2a,
|
||||||
0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x49,
|
0x88, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43,
|
||||||
0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x4e,
|
0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a,
|
||||||
0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x04,
|
0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e,
|
||||||
0x2a, 0x88, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x41,
|
0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12,
|
||||||
0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14,
|
0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x55,
|
||||||
0x0a, 0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55,
|
0x4c, 0x41, 0x52, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16,
|
||||||
0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x02,
|
0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x52,
|
||||||
0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47,
|
0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54, 0x5f,
|
||||||
0x55, 0x4c, 0x41, 0x52, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1a, 0x0a,
|
0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x05, 0x2a, 0x55, 0x0a, 0x09, 0x43, 0x6f,
|
||||||
0x16, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f,
|
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||||
0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x55, 0x54,
|
0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00,
|
||||||
0x5f, 0x4f, 0x46, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x05, 0x2a, 0x55, 0x0a, 0x09, 0x43,
|
0x12, 0x12, 0x0a, 0x0e, 0x45, 0x41, 0x43, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55,
|
||||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x54,
|
0x4e, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45,
|
||||||
0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10,
|
0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10,
|
||||||
0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x41, 0x43, 0x4c, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f,
|
0x02, 0x2a, 0x31, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f,
|
||||||
0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e,
|
0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10,
|
||||||
0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44,
|
0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52,
|
||||||
0x10, 0x02, 0x2a, 0x31, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a,
|
0x45, 0x44, 0x10, 0x01, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73,
|
||||||
0x0f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44,
|
0x74, 0x66, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x54, 0x72, 0x75, 0x65, 0x43, 0x6c, 0x6f,
|
||||||
0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49,
|
0x75, 0x64, 0x4c, 0x61, 0x62, 0x2f, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2d, 0x61, 0x70,
|
||||||
0x52, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x0a, 0x41, 0x50, 0x45, 0x4d, 0x61, 0x6e, 0x61,
|
0x69, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x67,
|
||||||
0x67, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47,
|
0x72, 0x70, 0x63, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0xaa, 0x02, 0x1a, 0x4e, 0x65, 0x6f,
|
||||||
0x45, 0x52, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44,
|
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x41, 0x50, 0x49,
|
||||||
0x10, 0x00, 0x42, 0x61, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66,
|
0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
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 (
|
var (
|
||||||
|
@ -645,7 +585,7 @@ func file_status_grpc_types_proto_rawDescGZIP() []byte {
|
||||||
return file_status_grpc_types_proto_rawDescData
|
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_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_status_grpc_types_proto_goTypes = []interface{}{
|
var file_status_grpc_types_proto_goTypes = []interface{}{
|
||||||
(Section)(0), // 0: neo.fs.v2.status.Section
|
(Section)(0), // 0: neo.fs.v2.status.Section
|
||||||
|
@ -654,12 +594,11 @@ var file_status_grpc_types_proto_goTypes = []interface{}{
|
||||||
(Object)(0), // 3: neo.fs.v2.status.Object
|
(Object)(0), // 3: neo.fs.v2.status.Object
|
||||||
(Container)(0), // 4: neo.fs.v2.status.Container
|
(Container)(0), // 4: neo.fs.v2.status.Container
|
||||||
(Session)(0), // 5: neo.fs.v2.status.Session
|
(Session)(0), // 5: neo.fs.v2.status.Session
|
||||||
(APEManager)(0), // 6: neo.fs.v2.status.APEManager
|
(*Status)(nil), // 6: neo.fs.v2.status.Status
|
||||||
(*Status)(nil), // 7: neo.fs.v2.status.Status
|
(*Status_Detail)(nil), // 7: neo.fs.v2.status.Status.Detail
|
||||||
(*Status_Detail)(nil), // 8: neo.fs.v2.status.Status.Detail
|
|
||||||
}
|
}
|
||||||
var file_status_grpc_types_proto_depIdxs = []int32{
|
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 output_type
|
||||||
1, // [1:1] is the sub-list for method input_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 type_name
|
||||||
|
@ -703,7 +642,7 @@ func file_status_grpc_types_proto_init() {
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_status_grpc_types_proto_rawDesc,
|
RawDescriptor: file_status_grpc_types_proto_rawDesc,
|
||||||
NumEnums: 7,
|
NumEnums: 6,
|
||||||
NumMessages: 2,
|
NumMessages: 2,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue