provider

package
v0.0.0-...-f65cdbb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileExists = errors.New("file exists")
View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type FileRepo

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

func NewFileRepo

func NewFileRepo(baseDir string) *FileRepo

func (*FileRepo) Add

func (f *FileRepo) Add(tenant string, name string, fileType int32, bytes []byte) error

func (*FileRepo) File

func (f *FileRepo) File(tenant string, name string) ([]byte, error)

func (*FileRepo) Files

func (f *FileRepo) Files() ([]*pb.TenantFiles, error)

func (*FileRepo) GetMetadataForFile

func (f *FileRepo) GetMetadataForFile(tenant string, name string) (*Metadata, error)

func (*FileRepo) WriteMetadataForFile

func (f *FileRepo) WriteMetadataForFile(tenant string, name string, fileType int32) error

type MemRepo

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

func NewMemRepo

func NewMemRepo() *MemRepo

func (*MemRepo) Add

func (m *MemRepo) Add(tenant string, name string, fileType int32, bytes []byte) error

func (*MemRepo) File

func (m *MemRepo) File(tenant string, name string) ([]byte, error)

func (*MemRepo) Files

func (m *MemRepo) Files() ([]*pb.TenantFiles, error)

func (*MemRepo) GetMetadataForFile

func (m *MemRepo) GetMetadataForFile(tenant string, name string) (*Metadata, error)

type Metadata

type Metadata struct {
	FileType int32
}

Jump to

Keyboard shortcuts

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