forked from TrueCloudLab/frostfs-sdk-go
[#139] object: Deprecate RawObject
type and everything related
From now `Object` type should be used directly. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
529c4d1c2a
commit
70c3644e2b
8 changed files with 559 additions and 681 deletions
|
@ -42,8 +42,8 @@ func SplitID() *object.SplitID {
|
|||
return x
|
||||
}
|
||||
|
||||
func generateRaw(withParent bool) *object.RawObject {
|
||||
x := object.NewRaw()
|
||||
func generate(withParent bool) *object.Object {
|
||||
x := object.New()
|
||||
|
||||
x.SetID(oidtest.ID())
|
||||
x.SetSessionToken(sessiontest.Token())
|
||||
|
@ -64,20 +64,21 @@ func generateRaw(withParent bool) *object.RawObject {
|
|||
x.SetSignature(sigtest.Signature())
|
||||
|
||||
if withParent {
|
||||
x.SetParent(generateRaw(false).Object())
|
||||
x.SetParent(generate(false))
|
||||
}
|
||||
|
||||
return x
|
||||
}
|
||||
|
||||
// Raw returns random object.RawObject.
|
||||
func Raw() *object.RawObject {
|
||||
return generateRaw(true)
|
||||
// Raw returns random object.Object.
|
||||
// Deprecated: (v1.0.0) use Object instead.
|
||||
func Raw() *object.Object {
|
||||
return Object()
|
||||
}
|
||||
|
||||
// Object returns random object.Object.
|
||||
func Object() *object.Object {
|
||||
return Raw().Object()
|
||||
return generate(true)
|
||||
}
|
||||
|
||||
// Tombstone returns random object.Tombstone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue