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.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *ContainerID) SetValue(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Value = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets object identifier in a binary format.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *ObjectID) SetValue(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Value = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetValue sets owner identifier in a binary format.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *OwnerID) SetValue(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Value = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetContainerId sets container identifier of the address.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Address) SetContainerId(v *ContainerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.ContainerId = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetObjectId sets object identifier of the address.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Address) SetObjectId(v *ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.ObjectId = v
|
2020-08-12 19:06:10 +00:00
|
|
|
}
|
2020-08-20 07:59:45 +00:00
|
|
|
|
2024-04-26 08:54:35 +00:00
|
|
|
// SetType in generic checksum structure.
|
|
|
|
func (x *Checksum) SetType(v ChecksumType) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Type = v
|
2020-08-20 07:59:45 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 11:14:33 +00:00
|
|
|
// SetSum in generic checksum structure.
|
|
|
|
func (x *Checksum) SetSum(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Sum = v
|
2020-08-20 07:59:45 +00:00
|
|
|
}
|
2020-08-20 09:43:47 +00:00
|
|
|
|
|
|
|
// SetMajor sets major version number.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Version) SetMajor(v uint32) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Major = v
|
2020-08-20 09:43:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetMinor sets minor version number.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Version) SetMinor(v uint32) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Minor = v
|
2020-08-20 09:43:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetKey sets public key in a binary format.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Signature) SetKey(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Key = v
|
2020-08-20 09:43:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetSign sets signature.
|
2022-02-22 11:14:33 +00:00
|
|
|
func (x *Signature) SetSign(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Sign = v
|
2020-08-20 09:43:47 +00:00
|
|
|
}
|
2021-06-18 12:27:01 +00:00
|
|
|
|
2022-02-22 11:25:43 +00:00
|
|
|
// SetScheme sets signature scheme.
|
|
|
|
func (x *Signature) SetScheme(s SignatureScheme) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Scheme = s
|
2022-02-22 11:25:43 +00:00
|
|
|
}
|
|
|
|
|
2022-03-02 10:15:36 +00:00
|
|
|
// SetKey sets public key in a binary format.
|
|
|
|
func (x *SignatureRFC6979) SetKey(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Key = v
|
2022-03-02 10:15:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SetSign sets signature.
|
|
|
|
func (x *SignatureRFC6979) SetSign(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
x.Sign = v
|
2022-03-02 10:15:36 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 11:25:43 +00:00
|
|
|
// FromString parses SignatureScheme from a string representation,
|
|
|
|
// It is a reverse action to String().
|
|
|
|
//
|
|
|
|
// Returns true if s was parsed successfully.
|
|
|
|
func (x *SignatureScheme) FromString(s string) bool {
|
|
|
|
i, ok := SignatureScheme_value[s]
|
|
|
|
if ok {
|
|
|
|
*x = SignatureScheme(i)
|
|
|
|
}
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|