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: 3

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