forked from TrueCloudLab/frostfs-api-go
Update to neofs-api v0.7.4
This commit is contained in:
parent
2abcfb7219
commit
d8cc00b54c
8 changed files with 448 additions and 532 deletions
|
@ -236,12 +236,10 @@ type Token_Info struct {
|
|||
Verb Token_Info_Verb `protobuf:"varint,3,opt,name=verb,proto3,enum=service.Token_Info_Verb" json:"verb,omitempty"`
|
||||
// Address is an object address for which token is issued
|
||||
Address Address `protobuf:"bytes,4,opt,name=Address,proto3,customtype=Address" json:"Address"`
|
||||
// Created is an initial epoch of token lifetime
|
||||
Created uint64 `protobuf:"varint,5,opt,name=Created,proto3" json:"Created,omitempty"`
|
||||
// ValidUntil is a last epoch of token lifetime
|
||||
ValidUntil uint64 `protobuf:"varint,6,opt,name=ValidUntil,proto3" json:"ValidUntil,omitempty"`
|
||||
// Lifetime is a lifetime of the session
|
||||
TokenLifetime `protobuf:"bytes,5,opt,name=Lifetime,proto3,embedded=Lifetime" json:"Lifetime"`
|
||||
// SessionKey is a public key of session key
|
||||
SessionKey []byte `protobuf:"bytes,7,opt,name=SessionKey,proto3" json:"SessionKey,omitempty"`
|
||||
SessionKey []byte `protobuf:"bytes,6,opt,name=SessionKey,proto3" json:"SessionKey,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -283,73 +281,116 @@ func (m *Token_Info) GetVerb() Token_Info_Verb {
|
|||
return Token_Info_Put
|
||||
}
|
||||
|
||||
func (m *Token_Info) GetCreated() uint64 {
|
||||
func (m *Token_Info) GetSessionKey() []byte {
|
||||
if m != nil {
|
||||
return m.SessionKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// TokenLifetime carries a group of lifetime parameters of the token
|
||||
type TokenLifetime struct {
|
||||
// Created carries an initial epoch of token lifetime
|
||||
Created uint64 `protobuf:"varint,1,opt,name=Created,proto3" json:"Created,omitempty"`
|
||||
// ValidUntil carries a last epoch of token lifetime
|
||||
ValidUntil uint64 `protobuf:"varint,2,opt,name=ValidUntil,proto3" json:"ValidUntil,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *TokenLifetime) Reset() { *m = TokenLifetime{} }
|
||||
func (m *TokenLifetime) String() string { return proto.CompactTextString(m) }
|
||||
func (*TokenLifetime) ProtoMessage() {}
|
||||
func (*TokenLifetime) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4bdd5bc50ec96238, []int{2}
|
||||
}
|
||||
func (m *TokenLifetime) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *TokenLifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
func (m *TokenLifetime) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_TokenLifetime.Merge(m, src)
|
||||
}
|
||||
func (m *TokenLifetime) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *TokenLifetime) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_TokenLifetime.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_TokenLifetime proto.InternalMessageInfo
|
||||
|
||||
func (m *TokenLifetime) GetCreated() uint64 {
|
||||
if m != nil {
|
||||
return m.Created
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Token_Info) GetValidUntil() uint64 {
|
||||
func (m *TokenLifetime) GetValidUntil() uint64 {
|
||||
if m != nil {
|
||||
return m.ValidUntil
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Token_Info) GetSessionKey() []byte {
|
||||
if m != nil {
|
||||
return m.SessionKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("service.Token_Info_Verb", Token_Info_Verb_name, Token_Info_Verb_value)
|
||||
proto.RegisterType((*RequestVerificationHeader)(nil), "service.RequestVerificationHeader")
|
||||
proto.RegisterType((*RequestVerificationHeader_Signature)(nil), "service.RequestVerificationHeader.Signature")
|
||||
proto.RegisterType((*Token)(nil), "service.Token")
|
||||
proto.RegisterType((*Token_Info)(nil), "service.Token.Info")
|
||||
proto.RegisterType((*TokenLifetime)(nil), "service.TokenLifetime")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("service/verify.proto", fileDescriptor_4bdd5bc50ec96238) }
|
||||
|
||||
var fileDescriptor_4bdd5bc50ec96238 = []byte{
|
||||
// 541 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x8e, 0xd3, 0x4c,
|
||||
0x10, 0x86, 0xa7, 0x1d, 0x27, 0x4e, 0x6a, 0x7e, 0x3e, 0x7f, 0x0d, 0x0b, 0x13, 0x21, 0x27, 0x8a,
|
||||
0x58, 0x64, 0x24, 0x62, 0x4b, 0x19, 0x09, 0x21, 0xb1, 0x9a, 0x10, 0xc1, 0x44, 0x20, 0x88, 0xda,
|
||||
0x43, 0x16, 0xec, 0x1c, 0xbb, 0xe2, 0x58, 0x04, 0x77, 0xe8, 0x76, 0x82, 0x72, 0x13, 0xce, 0xc0,
|
||||
0x39, 0x58, 0xcc, 0x72, 0x96, 0xc0, 0x22, 0x42, 0xe1, 0x0a, 0x1c, 0x00, 0xb9, 0xed, 0xfc, 0x20,
|
||||
0xc1, 0xee, 0xad, 0xa7, 0xaa, 0xde, 0xaa, 0x6e, 0x15, 0xdc, 0x95, 0x28, 0x96, 0x71, 0x80, 0xee,
|
||||
0x12, 0x45, 0x3c, 0x59, 0x39, 0x73, 0xc1, 0x53, 0x4e, 0x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9, 0x49, 0x84, 0x66, 0x99, 0x9e, 0x42, 0x4d, 0xc9, 0x2b, 0x5f, 0x4e,
|
||||
0xcd, 0x4a, 0xcf, 0xbb, 0xd9, 0xd8, 0xe4, 0x76, 0x63, 0x93, 0xaf, 0x1b, 0x9b, 0xfc, 0xd8, 0xd8,
|
||||
0xe4, 0xd3, 0x4f, 0xfb, 0xe8, 0xed, 0xf9, 0xc1, 0x9d, 0x27, 0x72, 0x1e, 0x04, 0x9d, 0x10, 0x97,
|
||||
0x6e, 0x82, 0x7c, 0x22, 0x3b, 0xfe, 0x3c, 0xee, 0x44, 0xdc, 0x2d, 0xbe, 0xf2, 0xb3, 0xf6, 0xff,
|
||||
0x2b, 0xe4, 0xcf, 0x3c, 0xe7, 0x72, 0x38, 0x70, 0xbc, 0x9c, 0x8d, 0x2b, 0xea, 0xfc, 0x2f, 0x7e,
|
||||
0x07, 0x00, 0x00, 0xff, 0xff, 0xea, 0xcf, 0xa5, 0xdd, 0x60, 0x03, 0x00, 0x00,
|
||||
// 567 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0xed, 0x26, 0xce, 0xd7, 0xf4, 0x03, 0xb3, 0x20, 0x64, 0x22, 0x94, 0x44, 0x11, 0x87, 0x54,
|
||||
0x22, 0x8e, 0x94, 0x4a, 0x08, 0x09, 0x2e, 0x0d, 0x11, 0x34, 0xa2, 0x82, 0x6a, 0x53, 0x7a, 0xe0,
|
||||
0xe6, 0xd8, 0x63, 0x77, 0x45, 0xeb, 0x0d, 0xbb, 0x9b, 0xa0, 0xfe, 0x13, 0x7e, 0x03, 0xbf, 0x83,
|
||||
0x43, 0x8f, 0x3d, 0x22, 0x24, 0x22, 0x14, 0xfe, 0x04, 0x47, 0xe4, 0xb5, 0x93, 0xb8, 0x12, 0xdc,
|
||||
0xde, 0xbc,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f, 0x6e,
|
||||
0x17, 0x13, 0x3c, 0xc4, 0x0b, 0xd4, 0x68, 0x5b, 0xb4, 0x06, 0x25, 0xe6, 0xc5, 0x11, 0xda, 0x25,
|
||||
0xba, 0x0b, 0x35, 0x03, 0x8f, 0x3c, 0x75, 0x6e, 0x97, 0xdb, 0x23, 0xd8, 0xbd, 0x15, 0x8d, 0x3a,
|
||||
0x50, 0x79, 0x29, 0xd1, 0xd3, 0x18, 0x98, 0xff, 0xc1, 0x62, 0xab, 0x32, 0x09, 0x78, 0xe6, 0x5d,
|
||||
0xf0, 0xe0, 0x7d, 0xac, 0xf9, 0x85, 0x39, 0xbf, 0xc5, 0x72, 0xcc, 0x60, 0x7c, 0xbd, 0x6c, 0x90,
|
||||
0x9b, 0x65, 0x83, 0x7c, 0x5f, 0x36, 0xc8, 0xaf, 0x65, 0x83, 0x7c, 0xf9, 0xdd, 0xd8, 0xfa, 0xb0,
|
||||
0x9f, 0x7b, 0x36, 0xb1, 0x9a, 0xfa, 0x7e, 0x37, 0xc0, 0x79, 0x2f, 0x46, 0x11, 0xaa, 0xae, 0x37,
|
||||
0xe5, 0xdd, 0x48, 0xf4, 0xb2, 0x1b, 0x7d, 0x2d, 0xdc, 0x7d, 0x8b, 0xe2, 0xd5, 0xd8, 0x3d, 0x3c,
|
||||
0x19, 0xb9, 0xe3, 0x94, 0x9b, 0x94, 0xcd, 0x6b, 0x3a, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x13,
|
||||
0xf0, 0xba, 0xcc, 0xaf, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *RequestVerificationHeader) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -519,18 +560,18 @@ func (m *Token_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
copy(dAtA[i:], m.SessionKey)
|
||||
i = encodeVarintVerify(dAtA, i, uint64(len(m.SessionKey)))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
dAtA[i] = 0x32
|
||||
}
|
||||
if m.ValidUntil != 0 {
|
||||
i = encodeVarintVerify(dAtA, i, uint64(m.ValidUntil))
|
||||
i--
|
||||
dAtA[i] = 0x30
|
||||
}
|
||||
if m.Created != 0 {
|
||||
i = encodeVarintVerify(dAtA, i, uint64(m.Created))
|
||||
i--
|
||||
dAtA[i] = 0x28
|
||||
{
|
||||
size, err := m.TokenLifetime.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintVerify(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
{
|
||||
size := m.Address.Size()
|
||||
i -= size
|
||||
|
@ -569,6 +610,43 @@ func (m *Token_Info) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *TokenLifetime) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *TokenLifetime) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *TokenLifetime) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if m.ValidUntil != 0 {
|
||||
i = encodeVarintVerify(dAtA, i, uint64(m.ValidUntil))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if m.Created != 0 {
|
||||
i = encodeVarintVerify(dAtA, i, uint64(m.Created))
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintVerify(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovVerify(v)
|
||||
base := offset
|
||||
|
@ -655,16 +733,30 @@ func (m *Token_Info) Size() (n int) {
|
|||
}
|
||||
l = m.Address.Size()
|
||||
n += 1 + l + sovVerify(uint64(l))
|
||||
l = m.TokenLifetime.Size()
|
||||
n += 1 + l + sovVerify(uint64(l))
|
||||
l = len(m.SessionKey)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovVerify(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *TokenLifetime) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Created != 0 {
|
||||
n += 1 + sovVerify(uint64(m.Created))
|
||||
}
|
||||
if m.ValidUntil != 0 {
|
||||
n += 1 + sovVerify(uint64(m.ValidUntil))
|
||||
}
|
||||
l = len(m.SessionKey)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovVerify(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
|
@ -1192,10 +1284,10 @@ func (m *Token_Info) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field TokenLifetime", wireType)
|
||||
}
|
||||
m.Created = 0
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVerify
|
||||
|
@ -1205,31 +1297,26 @@ func (m *Token_Info) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Created |= uint64(b&0x7F) << shift
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthVerify
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthVerify
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.TokenLifetime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 6:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType)
|
||||
}
|
||||
m.ValidUntil = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVerify
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ValidUntil |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 7:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field SessionKey", wireType)
|
||||
}
|
||||
|
@ -1288,6 +1375,98 @@ func (m *Token_Info) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *TokenLifetime) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVerify
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: TokenLifetime: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: TokenLifetime: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
|
||||
}
|
||||
m.Created = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVerify
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Created |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType)
|
||||
}
|
||||
m.ValidUntil = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowVerify
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.ValidUntil |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipVerify(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthVerify
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthVerify
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipVerify(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue