uploader

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEndpoint = "https://photoslibrary.googleapis.com/v1/uploads"

DefaultEndpoint is the Google Photos endpoint for uploads.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileUploadItem

type FileUploadItem string

FileUploadItem represents a local file.

func NewFileUploadItem

func NewFileUploadItem(filePath string) (FileUploadItem, error)

NewFileUploadItem returns a FileUploadItem from the specified file path. The file path must exist, and it must be a file (not a folder).

func (FileUploadItem) Name

func (m FileUploadItem) Name() string

Name returns the filename.

func (FileUploadItem) Open

func (m FileUploadItem) Open() (io.ReadSeeker, int64, error)

Open returns a stream. Caller should close it finally.

func (FileUploadItem) Size

func (m FileUploadItem) Size() int64

Size returns size of the file.

type UploadItem

type UploadItem interface {
	// Open returns a stream.
	// Caller should close it finally.
	Open() (io.ReadSeeker, int64, error)
	// Name returns the filename.
	Name() string
	// Size returns the size (in bytes).
	Size() int64
}

UploadItem represents an uploadable item.

type UploadToken

type UploadToken string

UploadToken represents a pointer to the uploaded item.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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