attachmentclient

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package attachmentclient keeps file bytes outside model-facing messages.

Index

Constants

View Source
const MaxFileBytes int64 = 100 << 20

Variables

View Source
var ErrUnsupported = errors.New("unsupported")

Functions

func Receive

func Receive(ctx context.Context, cache, key string, ref protocol.Attachment, fetch Fetch) *protocol.Attachment

Receive resolves transient downloads before exposing a sequence to ACK state.

func SanitizeName

func SanitizeName(name string) string

func ValidID

func ValidID(id string) bool

Types

type Fetch

type Fetch func(context.Context) (io.ReadCloser, int64, string, string)

type Source

type Source struct {
	*os.File
	Size int64
	Name string
	// contains filtered or unexported fields
}

func OpenSource

func OpenSource(cwd, relative, state string) (*Source, error)

OpenSource anchors every traversal step to the preceding directory handle.

func (*Source) Close

func (s *Source) Close() error

Jump to

Keyboard shortcuts

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