uploader

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	File  ReadSeekCloser
	Thumb ReadSeekCloser
	Name  string
	MIME  string
	Size  int64
}

type Iter

type Iter interface {
	Next(ctx context.Context) bool
	Value(ctx context.Context) (*Item, error)
	Total(ctx context.Context) int
}

type Options

type Options struct {
	Client   *tg.Client
	KV       kv.KV
	PartSize int
	Threads  int
	Iter     Iter
}

type ReadSeekCloser

type ReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
}

type Uploader

type Uploader struct {
	// contains filtered or unexported fields
}

func New

func New(o *Options) *Uploader

func (*Uploader) Upload

func (u *Uploader) Upload(ctx context.Context, chat string, limit int) error

Jump to

Keyboard shortcuts

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