forked from TrueCloudLab/frostfs-api-go
[#355] v2/refs: add subnetwork ID
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
ad6a7999cd
commit
68f28a1918
2 changed files with 26 additions and 0 deletions
|
@ -30,6 +30,10 @@ type Signature struct {
|
|||
key, sign []byte
|
||||
}
|
||||
|
||||
type SubnetID struct {
|
||||
value uint32
|
||||
}
|
||||
|
||||
type Version struct {
|
||||
major, minor uint32
|
||||
}
|
||||
|
@ -166,6 +170,19 @@ func (s *Signature) SetSign(v []byte) {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *SubnetID) SetValue(id uint32) {
|
||||
if s != nil {
|
||||
s.value = id
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SubnetID) GetValue() uint32 {
|
||||
if s != nil {
|
||||
return s.value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (v *Version) GetMajor() uint32 {
|
||||
if v != nil {
|
||||
return v.major
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue