Help us shape the future of Go! Take the 2026 Go Developer Survey

fileuploader

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUploadSessionDiscriminator

func CreateUploadSessionDiscriminator(serialization.ParseNode) (serialization.Parsable, error)

CreateUploadSessionDiscriminator creates a new instance of the appropriate class based on discriminator value

Types

type ByteStream

type ByteStream interface {
	io.ReaderAt
	Stat() (os.FileInfo, error)
}

ByteStream is an interface that represents a stream of bytes

type LargeFileUploadTask

type LargeFileUploadTask[T serialization.Parsable] interface {
	Upload(progress ProgressCallBack) UploadResult[T]
	Resume(progress ProgressCallBack) (UploadResult[T], error)
	RefreshUploadStatus() error
	Cancel() error
}

func NewLargeFileUploadTask

func NewLargeFileUploadTask[T serialization.Parsable](adapter abstractions.RequestAdapter, uploadSession UploadSession, byteStream ByteStream, maxSlice int64, parsableFactory serialization.ParsableFactory, errorMappings abstractions.ErrorMappings) LargeFileUploadTask[T]

type ProgressCallBack

type ProgressCallBack func(current int64, total int64)

type UploadResult

type UploadResult[T interface{}] interface {
	SetItemResponse(response T)
	GetItemResponse() T
	SetUploadSession(uploadSession UploadSession)
	GetUploadSession() UploadSession
	SetURI(uri *string)
	GetURI() *string
	SetUploadSucceeded(isSuccessful bool)
	GetUploadSucceeded() bool
	SetResponseErrors(errors []error)
	GetResponseErrors() []error
}

func NewUploadResult

func NewUploadResult[T interface{}]() UploadResult[T]

type UploadSession

type UploadSession interface {
	GetExpirationDateTime() *time.Time
	SetExpirationDateTime(expirationDateTime *time.Time)
	GetNextExpectedRanges() []string
	SetNextExpectedRanges(nextExpectedRanges []string)
	GetOdataType() *string
	GetUploadUrl() *string
}

type UploadSessionResponse

type UploadSessionResponse interface {
	serialization.Parsable
	GetExpirationDateTime() *time.Time
	SetExpirationDateTime(expirationDateTime *time.Time)
	GetNextExpectedRanges() []string
	SetNextExpectedRanges(nextExpectedRanges []string)
}

Jump to

Keyboard shortcuts

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