-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
48 lines (35 loc) · 2.03 KB
/
Copy patherrors.go
File metadata and controls
48 lines (35 loc) · 2.03 KB
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
45
46
47
48
package unwarc
import "errors"
var (
// ErrInvalidWARCHeader reports an invalid WARC record header, which consists
// of a version line followed by WARC named fields.
ErrInvalidWARCHeader = errors.New("invalid WARC record header")
// ErrInvalidWARCFields reports malformed application/warc-fields content.
ErrInvalidWARCFields = errors.New("invalid application/warc-fields block")
// ErrInvalidWARCField reports malformed WARC named-field syntax. It may be
// wrapped by ErrInvalidWARCHeader or ErrInvalidWARCFields depending on where
// the field appeared.
ErrInvalidWARCField = errors.New("invalid WARC named field")
// ErrMissingContentLength reports a WARC record without Content-Length.
ErrMissingContentLength = errors.New("missing Content-Length")
// ErrInvalidContentLength reports a negative or unparsable Content-Length.
ErrInvalidContentLength = errors.New("invalid Content-Length")
// ErrDuplicateContentLength reports multiple Content-Length fields in a WARC
// record.
ErrDuplicateContentLength = errors.New("duplicate Content-Length")
// ErrFoldedWARCField reports a folded WARC named field when the configured
// folded-field policy rejects continuations.
ErrFoldedWARCField = errors.New("folded WARC field")
// ErrMissingRecordTrailer reports a missing or invalid record trailer.
ErrMissingRecordTrailer = errors.New("missing record trailer")
// ErrUnsupportedCompression reports an unknown compression enum value.
ErrUnsupportedCompression = errors.New("unsupported compression")
// ErrInvalidWARCZstd reports a required WARC-zstd validation failure.
ErrInvalidWARCZstd = errors.New("invalid WARC-zstd")
// ErrRecordLocationPending reports an attempt to lazily reopen a record
// before the scanner has finalized its compressed and uncompressed ranges.
ErrRecordLocationPending = errors.New("record location is pending")
// ErrNotSeekIndexed reports input that does not fully match the
// record-local WARC-zstd seek index profile.
ErrNotSeekIndexed = errors.New("not a record-local WARC-zstd seek-indexed stream")
)