[#170] Updated docs and configuration of archive section
All checks were successful
/ DCO (pull_request) Successful in 1m17s
/ Vulncheck (pull_request) Successful in 1m51s
/ Builds (pull_request) Successful in 4m12s
/ Lint (pull_request) Successful in 5m24s
/ Tests (pull_request) Successful in 4m18s

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
Nikita Zinkevich 2024-12-06 15:01:16 +03:00
parent ab4131b377
commit a589a33a1b
Signed by: nzinkevich
GPG key ID: 748EA1D0B2E6420A
9 changed files with 40 additions and 39 deletions

View file

@ -109,7 +109,7 @@ func (h *Handler) getZipResponseWriter(ctx context.Context, log *zap.Logger, res
func (h *Handler) createZipFile(zw *zip.Writer, obj *object.Object) (io.Writer, error) {
method := zip.Store
if h.config.ZipCompression() {
if h.config.ArchiveCompression() {
method = zip.Deflate
}
@ -152,7 +152,7 @@ func (h *Handler) getTarResponseWriter(ctx context.Context, log *zap.Logger, res
defer resSearch.Close()
compressionLevel := gzip.NoCompression
if h.config.ZipCompression() {
if h.config.ArchiveCompression() {
compressionLevel = gzip.DefaultCompression
}

View file

@ -29,7 +29,7 @@ import (
type Config interface {
DefaultTimestamp() bool
ZipCompression() bool
ArchiveCompression() bool
ClientCut() bool
IndexPageEnabled() bool
IndexPageTemplate() string

View file

@ -51,7 +51,7 @@ func (c *configMock) DefaultTimestamp() bool {
return false
}
func (c *configMock) ZipCompression() bool {
func (c *configMock) ArchiveCompression() bool {
return false
}