s3

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store keeps uploaded files in an S3-compatible bucket. Plug it in with neui.WithUploadStorage or neui.OptionUploadStorage. The service must support conditional writes (If-None-Match), as AWS S3 and MinIO do.

func New

func New(client *minio.Client, bucket, prefix string) *Store

func (*Store) FileCommit

func (s *Store) FileCommit(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error

func (*Store) FileDelete

func (s *Store) FileDelete(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) error

func (*Store) FileDeleteAll

func (s *Store) FileDeleteAll(ctx context.Context, threadID api.ThreadID) error

func (*Store) FileDiscardDrafts

func (s *Store) FileDiscardDrafts(ctx context.Context, threadID api.ThreadID, origin api.Origin, keep []string) error

func (*Store) FileList

func (s *Store) FileList(ctx context.Context, threadID api.ThreadID, origin api.Origin) iter.Seq2[api.File, error]

func (*Store) FilePut

func (s *Store) FilePut(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, mime string, r io.Reader, draft bool) (api.File, error)

func (*Store) FileRead

func (s *Store) FileRead(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string, off int64, n int64) (io.ReadCloser, error)

func (*Store) FileStat

func (s *Store) FileStat(ctx context.Context, threadID api.ThreadID, origin api.Origin, name string) (api.File, error)

Jump to

Keyboard shortcuts

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