forked from TrueCloudLab/frostfs-api-go
[#371] Support recent changes in NeoFS API protocol
Support: * new status codes (object, container, session); * object `Lock` message; * different signature schemes. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a4349f6692
commit
99370889d1
41 changed files with 1139 additions and 129 deletions
219
status/grpc/types.pb.go
generated
219
status/grpc/types.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.1
|
||||
// protoc v3.19.4
|
||||
// source: status/grpc/types.proto
|
||||
|
||||
package status
|
||||
|
@ -28,6 +28,12 @@ const (
|
|||
Section_SECTION_SUCCESS Section = 0
|
||||
// Failure codes regardless of the operation.
|
||||
Section_SECTION_FAILURE_COMMON Section = 1
|
||||
// Object service-specific errors.
|
||||
Section_SECTION_OBJECT Section = 2
|
||||
// Container service-specific errors.
|
||||
Section_SECTION_CONTAINER Section = 3
|
||||
// Session service-specific errors.
|
||||
Section_SECTION_SESSION Section = 4
|
||||
)
|
||||
|
||||
// Enum value maps for Section.
|
||||
|
@ -35,10 +41,16 @@ var (
|
|||
Section_name = map[int32]string{
|
||||
0: "SECTION_SUCCESS",
|
||||
1: "SECTION_FAILURE_COMMON",
|
||||
2: "SECTION_OBJECT",
|
||||
3: "SECTION_CONTAINER",
|
||||
4: "SECTION_SESSION",
|
||||
}
|
||||
Section_value = map[string]int32{
|
||||
"SECTION_SUCCESS": 0,
|
||||
"SECTION_FAILURE_COMMON": 1,
|
||||
"SECTION_OBJECT": 2,
|
||||
"SECTION_CONTAINER": 3,
|
||||
"SECTION_SESSION": 4,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -170,6 +182,163 @@ func (CommonFail) EnumDescriptor() ([]byte, []int) {
|
|||
return file_status_grpc_types_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// Section of statuses for object-related operations.
|
||||
type Object int32
|
||||
|
||||
const (
|
||||
// [**2048**] Access denied by ACL.
|
||||
// Details:
|
||||
// - [**0**] Human-readable description (UTF-8 encoded string).
|
||||
Object_ACCESS_DENIED Object = 0
|
||||
// [**2049**] Object not found.
|
||||
Object_OBJECT_NOT_FOUND Object = 1
|
||||
// [**2050**] Operation rejected by the object lock.
|
||||
Object_LOCKED Object = 2
|
||||
// [**2051**] Locking an object with a non-REGULAR type rejected.
|
||||
Object_LOCK_NON_REGULAR_OBJECT Object = 3
|
||||
// [**2052**] Object has been marked deleted.
|
||||
Object_OBJECT_ALREADY_REMOVED Object = 4
|
||||
)
|
||||
|
||||
// Enum value maps for Object.
|
||||
var (
|
||||
Object_name = map[int32]string{
|
||||
0: "ACCESS_DENIED",
|
||||
1: "OBJECT_NOT_FOUND",
|
||||
2: "LOCKED",
|
||||
3: "LOCK_NON_REGULAR_OBJECT",
|
||||
4: "OBJECT_ALREADY_REMOVED",
|
||||
}
|
||||
Object_value = map[string]int32{
|
||||
"ACCESS_DENIED": 0,
|
||||
"OBJECT_NOT_FOUND": 1,
|
||||
"LOCKED": 2,
|
||||
"LOCK_NON_REGULAR_OBJECT": 3,
|
||||
"OBJECT_ALREADY_REMOVED": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Object) Enum() *Object {
|
||||
p := new(Object)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Object) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Object) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_status_grpc_types_proto_enumTypes[3].Descriptor()
|
||||
}
|
||||
|
||||
func (Object) Type() protoreflect.EnumType {
|
||||
return &file_status_grpc_types_proto_enumTypes[3]
|
||||
}
|
||||
|
||||
func (x Object) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Object.Descriptor instead.
|
||||
func (Object) EnumDescriptor() ([]byte, []int) {
|
||||
return file_status_grpc_types_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
// Section of statuses for container-related operations.
|
||||
type Container int32
|
||||
|
||||
const (
|
||||
// [**3072**] Container not found.
|
||||
Container_CONTAINER_NOT_FOUND Container = 0
|
||||
)
|
||||
|
||||
// Enum value maps for Container.
|
||||
var (
|
||||
Container_name = map[int32]string{
|
||||
0: "CONTAINER_NOT_FOUND",
|
||||
}
|
||||
Container_value = map[string]int32{
|
||||
"CONTAINER_NOT_FOUND": 0,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Container) Enum() *Container {
|
||||
p := new(Container)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Container) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Container) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_status_grpc_types_proto_enumTypes[4].Descriptor()
|
||||
}
|
||||
|
||||
func (Container) Type() protoreflect.EnumType {
|
||||
return &file_status_grpc_types_proto_enumTypes[4]
|
||||
}
|
||||
|
||||
func (x Container) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Container.Descriptor instead.
|
||||
func (Container) EnumDescriptor() ([]byte, []int) {
|
||||
return file_status_grpc_types_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
// Section of statuses for session-related operations.
|
||||
type Session int32
|
||||
|
||||
const (
|
||||
// [**4096**] Token not found.
|
||||
Session_TOKEN_NOT_FOUND Session = 0
|
||||
// [**4097**] Token has expired.
|
||||
Session_TOKEN_EXPIRED Session = 1
|
||||
)
|
||||
|
||||
// Enum value maps for Session.
|
||||
var (
|
||||
Session_name = map[int32]string{
|
||||
0: "TOKEN_NOT_FOUND",
|
||||
1: "TOKEN_EXPIRED",
|
||||
}
|
||||
Session_value = map[string]int32{
|
||||
"TOKEN_NOT_FOUND": 0,
|
||||
"TOKEN_EXPIRED": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Session) Enum() *Session {
|
||||
p := new(Session)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Session) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Session) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_status_grpc_types_proto_enumTypes[5].Descriptor()
|
||||
}
|
||||
|
||||
func (Session) Type() protoreflect.EnumType {
|
||||
return &file_status_grpc_types_proto_enumTypes[5]
|
||||
}
|
||||
|
||||
func (x Session) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Session.Descriptor instead.
|
||||
func (Session) EnumDescriptor() ([]byte, []int) {
|
||||
return file_status_grpc_types_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
// Declares the general format of the status returns of the NeoFS RPC protocol.
|
||||
// Status is present in all response messages. Each RPC of NeoFS protocol
|
||||
// describes the possible outcomes and details of the operation.
|
||||
|
@ -342,21 +511,38 @@ var file_status_grpc_types_proto_rawDesc = []byte{
|
|||
0x2e, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a,
|
||||
0x3a, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45,
|
||||
0x7a, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45,
|
||||
0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12,
|
||||
0x1a, 0x0a, 0x16, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55,
|
||||
0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x2a, 0x11, 0x0a, 0x07, 0x53,
|
||||
0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53,
|
||||
0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||
0x49, 0x4e, 0x45, 0x52, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0x11, 0x0a, 0x07, 0x53,
|
||||
0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, 0x2a, 0x32,
|
||||
0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x0a, 0x08,
|
||||
0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x57, 0x52,
|
||||
0x4f, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x47, 0x49, 0x43, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52,
|
||||
0x10, 0x01, 0x42, 0x56, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 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,
|
||||
0x10, 0x01, 0x2a, 0x76, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f,
|
||||
0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f, 0x43, 0x4b, 0x45, 0x44, 0x10,
|
||||
0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x4e, 0x4f, 0x4e, 0x5f, 0x52, 0x45,
|
||||
0x47, 0x55, 0x4c, 0x41, 0x52, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1a,
|
||||
0x0a, 0x16, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4c, 0x52, 0x45, 0x41, 0x44, 0x59,
|
||||
0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x04, 0x2a, 0x24, 0x0a, 0x09, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x54, 0x41,
|
||||
0x49, 0x4e, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00,
|
||||
0x2a, 0x31, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x54,
|
||||
0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00,
|
||||
0x12, 0x11, 0x0a, 0x0d, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45,
|
||||
0x44, 0x10, 0x01, 0x42, 0x56, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6e, 0x73, 0x70, 0x63, 0x63, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x6e, 0x65, 0x6f, 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 (
|
||||
|
@ -371,17 +557,20 @@ func file_status_grpc_types_proto_rawDescGZIP() []byte {
|
|||
return file_status_grpc_types_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_status_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_status_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
|
||||
var file_status_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_status_grpc_types_proto_goTypes = []interface{}{
|
||||
(Section)(0), // 0: neo.fs.v2.status.Section
|
||||
(Success)(0), // 1: neo.fs.v2.status.Success
|
||||
(CommonFail)(0), // 2: neo.fs.v2.status.CommonFail
|
||||
(*Status)(nil), // 3: neo.fs.v2.status.Status
|
||||
(*Status_Detail)(nil), // 4: neo.fs.v2.status.Status.Detail
|
||||
(Object)(0), // 3: neo.fs.v2.status.Object
|
||||
(Container)(0), // 4: neo.fs.v2.status.Container
|
||||
(Session)(0), // 5: neo.fs.v2.status.Session
|
||||
(*Status)(nil), // 6: neo.fs.v2.status.Status
|
||||
(*Status_Detail)(nil), // 7: neo.fs.v2.status.Status.Detail
|
||||
}
|
||||
var file_status_grpc_types_proto_depIdxs = []int32{
|
||||
4, // 0: neo.fs.v2.status.Status.details:type_name -> neo.fs.v2.status.Status.Detail
|
||||
7, // 0: neo.fs.v2.status.Status.details:type_name -> neo.fs.v2.status.Status.Detail
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
|
@ -425,7 +614,7 @@ func file_status_grpc_types_proto_init() {
|
|||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_status_grpc_types_proto_rawDesc,
|
||||
NumEnums: 3,
|
||||
NumEnums: 6,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue