uploads

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(
	ctx context.Context,
	client *http.Client,
	url string,
	upload *ResolvedUpload,
) error

Types

type CreateInput

type CreateInput struct {
	FileName       string
	MimeType       string
	CustomMetadata map[string]any
	HashSHA256     string
	IdempotencyKey string
	Purpose        string
}

type Input

type Input struct {
	File          any
	FileName      string
	MimeType      string
	ContentLength int64
}

type ReaderAtSeeker

type ReaderAtSeeker interface {
	io.Reader
	io.Seeker
}

type ResolvedUpload

type ResolvedUpload struct {
	Body          []byte
	ContentLength int64
	FileName      string
	MimeType      string
}

func Resolve

func Resolve(input Input) (*ResolvedUpload, error)

func (*ResolvedUpload) Reader

func (u *ResolvedUpload) Reader() io.Reader

Jump to

Keyboard shortcuts

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