2020-08-13 12:43:47 +00:00
|
|
|
package refs
|
2020-08-12 19:06:10 +00:00
|
|
|
|
|
|
|
// SetValue sets container identifier in a binary format.
|
|
|
|
func (m *ContainerID) SetValue(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Value = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets object identifier in a binary format.
|
|
|
|
func (m *ObjectID) SetValue(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Value = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets owner identifier in a binary format.
|
|
|
|
func (m *OwnerID) SetValue(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Value = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetContainerId sets container identifier of the address.
|
|
|
|
func (m *Address) SetContainerId(v *ContainerID) {
|
|
|
|
if m != nil {
|
|
|
|
m.ContainerId = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetObjectId sets object identifier of the address.
|
|
|
|
func (m *Address) SetObjectId(v *ObjectID) {
|
|
|
|
if m != nil {
|
|
|
|
m.ObjectId = v
|
|
|
|
}
|
|
|
|
}
|
2020-08-20 07:59:45 +00:00
|
|
|
|
|
|
|
// SetChecksumType in generic checksum structure.
|
|
|
|
func (m *Checksum) SetChecksumType(v ChecksumType) {
|
|
|
|
if m != nil {
|
|
|
|
m.Type = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetChecksumSum in generic checksum structure.
|
|
|
|
func (m *Checksum) SetSum(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Sum = v
|
|
|
|
}
|
|
|
|
}
|
2020-08-20 09:43:47 +00:00
|
|
|
|
|
|
|
// SetMajor sets major version number.
|
|
|
|
func (m *Version) SetMajor(v uint32) {
|
|
|
|
if m != nil {
|
|
|
|
m.Major = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetMinor sets minor version number.
|
|
|
|
func (m *Version) SetMinor(v uint32) {
|
|
|
|
if m != nil {
|
|
|
|
m.Minor = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetKey sets public key in a binary format.
|
|
|
|
func (m *Signature) SetKey(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Key = v
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetSign sets signature.
|
|
|
|
func (m *Signature) SetSign(v []byte) {
|
|
|
|
if m != nil {
|
|
|
|
m.Sign = v
|
|
|
|
}
|
|
|
|
}
|
2021-06-18 12:27:01 +00:00
|
|
|
|
|
|
|
// FromString parses ChecksumType from a string representation,
|
|
|
|
// It is a reverse action to String().
|
|
|
|
//
|
|
|
|
// Returns true if s was parsed successfully.
|
|
|
|
func (x *ChecksumType) FromString(s string) bool {
|
|
|
|
i, ok := ChecksumType_value[s]
|
|
|
|
if ok {
|
|
|
|
*x = ChecksumType(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|