Documentation ¶
Index ¶
- type File
- type FileHeader
- type FileInfo
- type FileWriter
- type Pack
- func (p *Pack) AsFS(ctx context.Context) fs.FS
- func (p *Pack) FileInfo(ctx context.Context, name string) (*FileInfo, error)
- func (p *Pack) IsPackagePack() bool
- func (p *Pack) List() []string
- func (p *Pack) Open(ctx context.Context, name string) (*File, error)
- func (p *Pack) PackInfo() *uplink.Object
- type PendingPack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { *FileInfo io.ReadCloser }
type FileInfo ¶
type FileInfo struct { FileHeader Size int64 // contains filtered or unexported fields }
func (*FileInfo) OpenAsGzipOrUncompressed ¶
func (fi *FileInfo) OpenAsGzipOrUncompressed(ctx context.Context, allowGzip bool) (*File, bool, int64, error)
OpenAsGzipOrUncompressed returns the optimal file content based on how it is stored within the zip archive. If the compression method is "store" or the client doesn't support gzip, an uncompressed stream is returned. If the compression method is "deflate" and the client supports gzip, the contents is returned without being decompressed, but wrapped as a gzip format. Other methods return an error.
type FileWriter ¶
func (*FileWriter) ContentOffset ¶
func (fw *FileWriter) ContentOffset() int64
ContentOffset is the offset relative to the start of the ZIP archive. FileWriter will start writing at this position. Clients can keep track of this offset if they want to efficiently download the file without reading the central directory entry.
type Pack ¶
type Pack struct {
// contains filtered or unexported fields
}
func (*Pack) IsPackagePack ¶
type PendingPack ¶
type PendingPack struct {
// contains filtered or unexported fields
}
func CreatePack ¶
func CreatePack(ctx context.Context, proj *uplink.Project, bucket, key string, options *uplink.UploadOptions) (*PendingPack, error)
func (*PendingPack) Abort ¶
func (p *PendingPack) Abort() error
func (*PendingPack) Add ¶
func (p *PendingPack) Add(ctx context.Context, name string, options *FileHeader) (*FileWriter, error)
func (*PendingPack) SetCustomMetadata ¶
func (p *PendingPack) SetCustomMetadata(custom uplink.CustomMetadata)