blob: 7e5c8d6b3ad6940d20ce7bf822c4aaa580574040 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package dual
import (
"io"
"lindenii.org/go/furgit/object/id"
"lindenii.org/go/furgit/object/typ"
)
// ReadBytesFull reads a full serialized object from the combined view.
func (dual *Dual) ReadBytesFull(id id.ObjectID) ([]byte, error) {
return dual.reader.ReadBytesFull(id) //nolint:wrapcheck
}
// ReadBytesContent reads an object's type and content bytes from the combined view.
func (dual *Dual) ReadBytesContent(id id.ObjectID) (typ.Type, []byte, error) {
return dual.reader.ReadBytesContent(id) //nolint:wrapcheck
}
// ReadReaderFull reads a full serialized object stream from the combined view.
func (dual *Dual) ReadReaderFull(id id.ObjectID) (io.ReadCloser, error) {
return dual.reader.ReadReaderFull(id) //nolint:wrapcheck
}
// ReadReaderContent reads an object's type, declared content length,
// and content stream from the combined view.
func (dual *Dual) ReadReaderContent(id id.ObjectID) (typ.Type, int, io.ReadCloser, error) {
return dual.reader.ReadReaderContent(id) //nolint:wrapcheck
}
// ReadSize reads an object's declared content length from the combined view.
func (dual *Dual) ReadSize(id id.ObjectID) (int, error) {
return dual.reader.ReadSize(id) //nolint:wrapcheck
}
// ReadHeader reads an object's type and declared content length from the combined view.
func (dual *Dual) ReadHeader(id id.ObjectID) (typ.Type, int, error) {
return dual.reader.ReadHeader(id) //nolint:wrapcheck
}
// Refresh refreshes both sides.
func (dual *Dual) Refresh() error {
return dual.reader.Refresh() //nolint:wrapcheck
}
|