types

package
v1.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 9 Imported by: 2 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRange = errors.New("invalid range: End must be greater than Start")
)

Functions

This section is empty.

Types

type BearerToken

type BearerToken struct {
	Token string
}

func (*BearerToken) FromRequestHeader

func (b *BearerToken) FromRequestHeader(r *http.Request) error

type FileData

type FileData struct {
	PartialDataInfo *PartialDataInfo
	PrettyName      string
	ContentType     string
	TotalFileSize   int64
	ContentReader   io.ReadSeekCloser
}

func (*FileData) Write

func (file *FileData) Write(w http.ResponseWriter) error

Write отправляет содержимое файла в ResponseWriter, поддерживая частичные загрузки.

type PartialDataInfo

type PartialDataInfo struct {
	RangeStartByte int64
	RangeEndByte   int64
}

type RangeOption

type RangeOption struct {
	Start int64
	End   int64
}

func (*RangeOption) FromHeader

func (o *RangeOption) FromHeader(header string) error

nolint:cyclop,mnd

func (*RangeOption) Length

func (o *RangeOption) Length(objSize int64) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL