Documentation ¶
Overview ¶
Package file provides helpers that are used during video file upload.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Part ¶
type Part struct { Checksum string `json:"checksum"` Num uint `json:"num"` Size uint `json:"size"` }
func MakePartsFromFile ¶
MakePartsFromFile splits file to parts. It returns slice of parts with fixed size (but last part most probably will have less size) and calculated sha256 checksums.
[]Part actually just represent points in file, and later actual bytes are anyway read from source file using offsets.
Main purpose of []Part is that it goes directly into Video object (which is sent to videoapi).
Click to show internal directories.
Click to hide internal directories.