aboutsummaryrefslogtreecommitdiff
path: root/objects/object_blob.go
blob: c35cb2a7dc17006256d43b39dcb53f0fb339c07a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package objects

type Blob []byte

func (b Blob) Type() ObjectType {
	return OTBlob
}

func (b Blob) Payload() []byte {
	return []byte(b)
}

func (b *Blob) FromPayload(bytes []byte) error {
	// TODO: perhaps it is better to copy the bytes?
	*b = bytes
	return nil
}