storage

package
v1.800.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunOssStorageProvider added in v1.800.0

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

func NewAliyunOssStorageProvider added in v1.800.0

func NewAliyunOssStorageProvider(accessKeyId string, accessKeySecret string, region string, bucket string, endpoint string) (*AliyunOssStorageProvider, error)

func (*AliyunOssStorageProvider) DeleteObject added in v1.800.0

func (p *AliyunOssStorageProvider) DeleteObject(key string) error

func (*AliyunOssStorageProvider) ListObjects added in v1.800.0

func (p *AliyunOssStorageProvider) ListObjects(prefix string) ([]*Object, error)

func (*AliyunOssStorageProvider) PutObject added in v1.800.0

func (p *AliyunOssStorageProvider) PutObject(user string, parent string, key string, fileBuffer *bytes.Buffer) (string, error)

type CasdoorProvider

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

func NewCasdoorProvider

func NewCasdoorProvider(providerName string, lang string) (*CasdoorProvider, error)

func (*CasdoorProvider) DeleteObject

func (p *CasdoorProvider) DeleteObject(key string) error

func (*CasdoorProvider) ListObjects

func (p *CasdoorProvider) ListObjects(prefix string) ([]*Object, error)

func (*CasdoorProvider) PutObject

func (p *CasdoorProvider) PutObject(user string, parent string, key string, fileBuffer *bytes.Buffer) (string, error)

type LocalFileSystemStorageProvider

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

func NewLocalFileSystemStorageProvider

func NewLocalFileSystemStorageProvider(path string) (*LocalFileSystemStorageProvider, error)

func (*LocalFileSystemStorageProvider) DeleteObject

func (p *LocalFileSystemStorageProvider) DeleteObject(key string) error

func (*LocalFileSystemStorageProvider) ListObjects

func (p *LocalFileSystemStorageProvider) ListObjects(prefix string) ([]*Object, error)

func (*LocalFileSystemStorageProvider) PutObject

func (p *LocalFileSystemStorageProvider) PutObject(user string, parent string, key string, fileBuffer *bytes.Buffer) (string, error)

type Object

type Object struct {
	Key          string
	LastModified string
	Size         int64
	Url          string
}

type StorageProvider

type StorageProvider interface {
	ListObjects(prefix string) ([]*Object, error)
	PutObject(user string, parent string, key string, fileBuffer *bytes.Buffer) (string, error)
	DeleteObject(key string) error
}

func GetStorageProvider

func GetStorageProvider(typ string, clientId string, clientSecret string, region string, bucket string, endpoint string, providerName string, vectorStoreId string, lang string) (StorageProvider, error)

Jump to

Keyboard shortcuts

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