forked from TrueCloudLab/frostfs-api-go
Use expanded field naming in AccessGroup structure
This commit is contained in:
parent
7e6e30b850
commit
6ad23612c9
2 changed files with 46 additions and 46 deletions
|
@ -93,9 +93,9 @@ func (m *Container) GetList() AccessControlList {
|
|||
|
||||
type AccessGroup struct {
|
||||
// Group access mode.
|
||||
M uint32 `protobuf:"varint,1,opt,name=M,proto3" json:"M,omitempty"`
|
||||
AccessMode uint32 `protobuf:"varint,1,opt,name=AccessMode,proto3" json:"AccessMode,omitempty"`
|
||||
// Group members.
|
||||
G []OwnerID `protobuf:"bytes,2,rep,name=G,proto3,customtype=OwnerID" json:"G"`
|
||||
UserGroup []OwnerID `protobuf:"bytes,2,rep,name=UserGroup,proto3,customtype=OwnerID" json:"UserGroup"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -130,9 +130,9 @@ func (m *AccessGroup) XXX_DiscardUnknown() {
|
|||
|
||||
var xxx_messageInfo_AccessGroup proto.InternalMessageInfo
|
||||
|
||||
func (m *AccessGroup) GetM() uint32 {
|
||||
func (m *AccessGroup) GetAccessMode() uint32 {
|
||||
if m != nil {
|
||||
return m.M
|
||||
return m.AccessMode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -190,30 +190,30 @@ func init() {
|
|||
func init() { proto.RegisterFile("container/types.proto", fileDescriptor_1432e52ab0b53e3e) }
|
||||
|
||||
var fileDescriptor_1432e52ab0b53e3e = []byte{
|
||||
// 361 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x4e, 0xc2, 0x40,
|
||||
0x10, 0xc6, 0x19, 0x28, 0x2a, 0x0b, 0xc6, 0xb8, 0x09, 0xa6, 0x21, 0x5a, 0x1a, 0x4e, 0xd5, 0x84,
|
||||
0x56, 0x31, 0xf1, 0xe0, 0x49, 0x01, 0x43, 0x48, 0x24, 0x9a, 0x1a, 0x2e, 0xde, 0xca, 0xba, 0x60,
|
||||
0x93, 0xd2, 0x6d, 0xba, 0x5b, 0x0d, 0x6f, 0xe2, 0x23, 0x71, 0xf4, 0x68, 0x3c, 0xa0, 0xa9, 0x2f,
|
||||
0x62, 0xba, 0x85, 0x86, 0x04, 0xbd, 0xed, 0x7c, 0xf3, 0x9b, 0x3f, 0xdf, 0x0e, 0xaa, 0x12, 0xe6,
|
||||
0x0b, 0xc7, 0xf5, 0x69, 0x68, 0x89, 0x59, 0x40, 0xb9, 0x19, 0x84, 0x4c, 0x30, 0x5c, 0xca, 0xe4,
|
||||
0xda, 0xc9, 0xc4, 0x15, 0xcf, 0xd1, 0xc8, 0x24, 0x6c, 0x6a, 0xf9, 0x3c, 0x20, 0xa4, 0xf9, 0x44,
|
||||
0x5f, 0x2c, 0x9f, 0x8a, 0xa9, 0x13, 0x58, 0x9c, 0x7a, 0x94, 0x08, 0x16, 0xa6, 0x65, 0xb5, 0xe6,
|
||||
0x1a, 0x3b, 0x61, 0x13, 0x66, 0x49, 0x79, 0x14, 0x8d, 0x65, 0x24, 0x03, 0xf9, 0x4a, 0xf1, 0xc6,
|
||||
0x17, 0xa0, 0x52, 0x67, 0x35, 0x08, 0x1f, 0xa3, 0xed, 0xbb, 0x57, 0x9f, 0x86, 0xfd, 0xae, 0x0a,
|
||||
0x3a, 0x18, 0x95, 0xf6, 0xde, 0x7c, 0x51, 0xcf, 0x7d, 0x2e, 0xea, 0x2b, 0xd9, 0x5e, 0x3d, 0xb0,
|
||||
0x8e, 0x94, 0x07, 0xc7, 0x13, 0x6a, 0x5e, 0x72, 0x95, 0x25, 0xa7, 0x0c, 0x87, 0xfd, 0xae, 0x2d,
|
||||
0x33, 0xb8, 0x86, 0x76, 0x3a, 0x4e, 0xe0, 0x10, 0x57, 0xcc, 0xd4, 0x82, 0x0e, 0x86, 0x62, 0x67,
|
||||
0x31, 0x3e, 0x43, 0x45, 0x3b, 0xf2, 0x28, 0x57, 0x15, 0x1d, 0x8c, 0x72, 0xab, 0x6a, 0xa6, 0x66,
|
||||
0xcc, 0x7b, 0xcf, 0x21, 0x74, 0x4a, 0x7d, 0x91, 0x64, 0xdb, 0x4a, 0xd2, 0xd5, 0x4e, 0x49, 0x7c,
|
||||
0x81, 0x94, 0x5b, 0x97, 0x0b, 0xb5, 0x28, 0x2b, 0x0e, 0xcd, 0xec, 0x7b, 0xcc, 0x6b, 0x42, 0x28,
|
||||
0xe7, 0x89, 0x8b, 0x90, 0x79, 0x09, 0xb3, 0x2c, 0x94, 0x7c, 0xe3, 0x12, 0x95, 0x53, 0xa0, 0x17,
|
||||
0xb2, 0x28, 0xc0, 0x15, 0x04, 0x03, 0x69, 0x6e, 0xd7, 0x86, 0x01, 0x3e, 0x42, 0xd0, 0x53, 0xf3,
|
||||
0x7a, 0xe1, 0x2f, 0xab, 0xd0, 0x6b, 0xdc, 0xa0, 0xfd, 0x8d, 0xe6, 0xf8, 0x74, 0xb9, 0x08, 0xe8,
|
||||
0x05, 0xa3, 0xdc, 0x3a, 0xd8, 0x58, 0x44, 0xce, 0x59, 0x5f, 0xa1, 0x7d, 0x35, 0x8f, 0x35, 0x78,
|
||||
0x8f, 0x35, 0xf8, 0x88, 0x35, 0xf8, 0x8e, 0x35, 0x78, 0xfb, 0xd1, 0x72, 0x8f, 0xff, 0x5d, 0x95,
|
||||
0x8d, 0x79, 0x33, 0xbd, 0x53, 0xd6, 0x79, 0xb4, 0x25, 0x85, 0xf3, 0xdf, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0xb4, 0x12, 0x2d, 0xb0, 0x2c, 0x02, 0x00, 0x00,
|
||||
// 368 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4f, 0x4b, 0xfb, 0x30,
|
||||
0x1c, 0xc6, 0x97, 0xad, 0xfb, 0xfd, 0x5c, 0x36, 0x11, 0x03, 0x93, 0x32, 0xa4, 0x2b, 0x3b, 0x55,
|
||||
0xa1, 0xad, 0x4e, 0xf0, 0xac, 0xdb, 0x44, 0x06, 0x8a, 0x52, 0xd9, 0x45, 0xbc, 0x74, 0x59, 0x36,
|
||||
0x0b, 0x5d, 0x53, 0x92, 0x54, 0xd9, 0x3b, 0xf1, 0x25, 0xed, 0xe8, 0x51, 0x3c, 0x4c, 0xa9, 0x6f,
|
||||
0x44, 0x9a, 0x6c, 0x75, 0x30, 0xbd, 0xe5, 0x79, 0xf2, 0x79, 0x92, 0xef, 0x1f, 0x58, 0xc7, 0x34,
|
||||
0x12, 0x7e, 0x10, 0x11, 0xe6, 0x8a, 0x59, 0x4c, 0xb8, 0x13, 0x33, 0x2a, 0x28, 0xaa, 0xe4, 0x76,
|
||||
0xe3, 0x70, 0x12, 0x88, 0xc7, 0x64, 0xe8, 0x60, 0x3a, 0x75, 0x23, 0x1e, 0x63, 0x6c, 0x8f, 0xc8,
|
||||
0x93, 0x1b, 0x11, 0x31, 0xf5, 0x63, 0x97, 0x93, 0x90, 0x60, 0x41, 0x99, 0x8a, 0x35, 0xec, 0x35,
|
||||
0x76, 0x42, 0x27, 0xd4, 0x95, 0xf6, 0x30, 0x19, 0x4b, 0x25, 0x85, 0x3c, 0x29, 0xbc, 0xf5, 0x01,
|
||||
0x60, 0xa5, 0xbb, 0xfa, 0x08, 0x1d, 0xc0, 0xff, 0x37, 0xcf, 0x11, 0x61, 0xfd, 0x9e, 0x0e, 0x4c,
|
||||
0x60, 0xd5, 0x3a, 0x3b, 0xf3, 0x45, 0xb3, 0xf0, 0xbe, 0x68, 0xae, 0x6c, 0x6f, 0x75, 0x40, 0x26,
|
||||
0xd4, 0xee, 0xfc, 0x50, 0xe8, 0x45, 0xc9, 0xd5, 0x96, 0x9c, 0x36, 0x18, 0xf4, 0x7b, 0x9e, 0xbc,
|
||||
0x41, 0x0d, 0xb8, 0xd5, 0xf5, 0x63, 0x1f, 0x07, 0x62, 0xa6, 0x97, 0x4c, 0x60, 0x69, 0x5e, 0xae,
|
||||
0xd1, 0x31, 0x2c, 0x7b, 0x49, 0x48, 0xb8, 0xae, 0x99, 0xc0, 0xaa, 0xb6, 0xeb, 0x8e, 0x6a, 0xc6,
|
||||
0xb9, 0x0d, 0x7d, 0x4c, 0xa6, 0x24, 0x12, 0xd9, 0x6d, 0x47, 0xcb, 0x5e, 0xf5, 0x14, 0x89, 0x4e,
|
||||
0xa1, 0x76, 0x15, 0x70, 0xa1, 0x97, 0x65, 0x62, 0xdf, 0xc9, 0xc7, 0xe3, 0x9c, 0x63, 0x4c, 0x38,
|
||||
0xcf, 0xba, 0x60, 0x34, 0xcc, 0x98, 0x65, 0x50, 0xf2, 0xad, 0x07, 0x58, 0x55, 0xc0, 0x25, 0xa3,
|
||||
0x49, 0x8c, 0x0c, 0x08, 0x95, 0xbc, 0xa6, 0x23, 0x22, 0xbb, 0xdc, 0xf6, 0xd6, 0x1c, 0x64, 0xc3,
|
||||
0xca, 0x80, 0x13, 0x26, 0x61, 0xbd, 0x68, 0x96, 0x7e, 0x1b, 0xc2, 0x0f, 0xd1, 0xba, 0x80, 0xbb,
|
||||
0x1b, 0xdf, 0xa3, 0xa3, 0x65, 0xa9, 0xc0, 0x2c, 0x59, 0xd5, 0xf6, 0xde, 0x46, 0xa9, 0x32, 0xba,
|
||||
0x5e, 0x64, 0xe7, 0x6c, 0x9e, 0x1a, 0xe0, 0x35, 0x35, 0xc0, 0x5b, 0x6a, 0x80, 0xcf, 0xd4, 0x00,
|
||||
0x2f, 0x5f, 0x46, 0xe1, 0xfe, 0xaf, 0xbd, 0xd3, 0x31, 0xb7, 0xd5, 0x26, 0xf3, 0x97, 0x87, 0xff,
|
||||
0xa4, 0x71, 0xf2, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x13, 0x1b, 0x01, 0x24, 0x4e, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Container) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -312,12 +312,12 @@ func (m *AccessGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if len(m.G) > 0 {
|
||||
for iNdEx := len(m.G) - 1; iNdEx >= 0; iNdEx-- {
|
||||
if len(m.UserGroup) > 0 {
|
||||
for iNdEx := len(m.UserGroup) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size := m.G[iNdEx].Size()
|
||||
size := m.UserGroup[iNdEx].Size()
|
||||
i -= size
|
||||
if _, err := m.G[iNdEx].MarshalTo(dAtA[i:]); err != nil {
|
||||
if _, err := m.UserGroup[iNdEx].MarshalTo(dAtA[i:]); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i = encodeVarintTypes(dAtA, i, uint64(size))
|
||||
|
@ -326,8 +326,8 @@ func (m *AccessGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
}
|
||||
}
|
||||
if m.M != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.M))
|
||||
if m.AccessMode != 0 {
|
||||
i = encodeVarintTypes(dAtA, i, uint64(m.AccessMode))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
|
@ -415,11 +415,11 @@ func (m *AccessGroup) Size() (n int) {
|
|||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.M != 0 {
|
||||
n += 1 + sovTypes(uint64(m.M))
|
||||
if m.AccessMode != 0 {
|
||||
n += 1 + sovTypes(uint64(m.AccessMode))
|
||||
}
|
||||
if len(m.G) > 0 {
|
||||
for _, e := range m.G {
|
||||
if len(m.UserGroup) > 0 {
|
||||
for _, e := range m.UserGroup {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
|
@ -690,9 +690,9 @@ func (m *AccessGroup) Unmarshal(dAtA []byte) error {
|
|||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field M", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AccessMode", wireType)
|
||||
}
|
||||
m.M = 0
|
||||
m.AccessMode = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTypes
|
||||
|
@ -702,14 +702,14 @@ func (m *AccessGroup) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.M |= uint32(b&0x7F) << shift
|
||||
m.AccessMode |= uint32(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field G", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field UserGroup", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
|
@ -737,8 +737,8 @@ func (m *AccessGroup) Unmarshal(dAtA []byte) error {
|
|||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var v OwnerID
|
||||
m.G = append(m.G, v)
|
||||
if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
m.UserGroup = append(m.UserGroup, v)
|
||||
if err := m.UserGroup[len(m.UserGroup)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
|
|
@ -23,9 +23,9 @@ message Container {
|
|||
|
||||
message AccessGroup {
|
||||
// Group access mode.
|
||||
uint32 M = 1;
|
||||
uint32 AccessMode = 1;
|
||||
// Group members.
|
||||
repeated bytes G = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
||||
repeated bytes UserGroup = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message AccessControlList {
|
||||
|
|
Loading…
Add table
Reference in a new issue