Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRangeHeaderNotFound = errors.New("header Range not found") ErrInvalidRange = errors.New("invalid Range header") )
View Source
var (
ErrInvalidContentRange = errors.New("invalid Content-Range")
)
Functions ¶
func SortRanges ¶
func SortRanges(ranges []ByteRange)
Types ¶
type ByteRange ¶
func MergeRanges ¶
func (ByteRange) ContentRange ¶
func (ByteRange) MimeHeader ¶
func (r ByteRange) MimeHeader(contentType string, size uint64) textproto.MIMEHeader
type ContentRange ¶
type ContentRange struct {
Start int64 // >=0, undefined if Unsatisfied
End int64 // >=Start
Size int64 // total size, -1 if unknown
Unsatisfied bool // true for "*/size"
}
func ParseContentRange ¶
func ParseContentRange(header string) (*ContentRange, error)
Click to show internal directories.
Click to hide internal directories.