storage

package
v1.833.80 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 15 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

Index

Constants

This section is empty.

Variables

View Source
var FileCache = make(map[string]map[string]CachedFile)

Functions

This section is empty.

Types

type CachedFile

type CachedFile struct {
	FileId string
	Object Object
}

type IamProvider

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

func NewIamProvider

func NewIamProvider(providerName string, lang string) (*IamProvider, error)

func NewIamProviderWithOrg

func NewIamProviderWithOrg(providerName string, org string, lang string) (*IamProvider, error)

NewIamProviderWithOrg creates an IamProvider scoped to a specific organization.

func (*IamProvider) DeleteObject

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

func (*IamProvider) ListObjects

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

func (*IamProvider) PutObject

func (p *IamProvider) 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 OpenAIFileSystemStorageProvider

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

func NewOpenAIFileSystemStorageProvider

func NewOpenAIFileSystemStorageProvider(vectorStoreId string, clientSecret string) (*OpenAIFileSystemStorageProvider, error)

func (*OpenAIFileSystemStorageProvider) DeleteObject

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

func (*OpenAIFileSystemStorageProvider) ListObjects

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

func (*OpenAIFileSystemStorageProvider) PutObject

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

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, 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