forked from TrueCloudLab/frostfs-api-go
Airat Arifullin
387b850e5e
* Generate protobufs. * Make marshallers, unmarshallers, json-encoders etc. * Create message encoding/decoding unit-tests. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
312 lines
9.7 KiB
Go
Generated
312 lines
9.7 KiB
Go
Generated
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.33.0
|
|
// protoc v4.25.3
|
|
// source: apemanager/grpc/types.proto
|
|
|
|
package apemanager
|
|
|
|
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_apemanager_grpc_types_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (TargetType) Type() protoreflect.EnumType {
|
|
return &file_apemanager_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_apemanager_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.apemanager.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_apemanager_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_apemanager_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_apemanager_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_apemanager_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_apemanager_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_apemanager_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_apemanager_grpc_types_proto protoreflect.FileDescriptor
|
|
|
|
var file_apemanager_grpc_types_proto_rawDesc = []byte{
|
|
0x0a, 0x1b, 0x61, 0x70, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x67, 0x72, 0x70,
|
|
0x63, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x66,
|
|
0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x70, 0x65, 0x6d, 0x61, 0x6e,
|
|
0x61, 0x67, 0x65, 0x72, 0x22, 0x58, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x61, 0x72,
|
|
0x67, 0x65, 0x74, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
0x0e, 0x32, 0x21, 0x2e, 0x66, 0x72, 0x6f, 0x73, 0x74, 0x66, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x61,
|
|
0x70, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 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, 0x4c, 0x5a, 0x4a, 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, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
|
0x72, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3b, 0x61, 0x70, 0x65, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
|
|
0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_apemanager_grpc_types_proto_rawDescOnce sync.Once
|
|
file_apemanager_grpc_types_proto_rawDescData = file_apemanager_grpc_types_proto_rawDesc
|
|
)
|
|
|
|
func file_apemanager_grpc_types_proto_rawDescGZIP() []byte {
|
|
file_apemanager_grpc_types_proto_rawDescOnce.Do(func() {
|
|
file_apemanager_grpc_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_apemanager_grpc_types_proto_rawDescData)
|
|
})
|
|
return file_apemanager_grpc_types_proto_rawDescData
|
|
}
|
|
|
|
var file_apemanager_grpc_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_apemanager_grpc_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_apemanager_grpc_types_proto_goTypes = []interface{}{
|
|
(TargetType)(0), // 0: frostfs.v2.apemanager.TargetType
|
|
(*ChainTarget)(nil), // 1: frostfs.v2.apemanager.ChainTarget
|
|
(*Chain)(nil), // 2: frostfs.v2.apemanager.Chain
|
|
}
|
|
var file_apemanager_grpc_types_proto_depIdxs = []int32{
|
|
0, // 0: frostfs.v2.apemanager.ChainTarget.type:type_name -> frostfs.v2.apemanager.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_apemanager_grpc_types_proto_init() }
|
|
func file_apemanager_grpc_types_proto_init() {
|
|
if File_apemanager_grpc_types_proto != nil {
|
|
return
|
|
}
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_apemanager_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_apemanager_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_apemanager_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_apemanager_grpc_types_proto_rawDesc,
|
|
NumEnums: 1,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_apemanager_grpc_types_proto_goTypes,
|
|
DependencyIndexes: file_apemanager_grpc_types_proto_depIdxs,
|
|
EnumInfos: file_apemanager_grpc_types_proto_enumTypes,
|
|
MessageInfos: file_apemanager_grpc_types_proto_msgTypes,
|
|
}.Build()
|
|
File_apemanager_grpc_types_proto = out.File
|
|
file_apemanager_grpc_types_proto_rawDesc = nil
|
|
file_apemanager_grpc_types_proto_goTypes = nil
|
|
file_apemanager_grpc_types_proto_depIdxs = nil
|
|
}
|