store

package
v0.0.0-...-3b012d0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateContent

func GenerateContent(entities []*uda.Entity, config conf.StorageBackend, logger *zap.SugaredLogger) ([]byte, error)

Types

type AzureStorage

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

func NewAzureStorage

func NewAzureStorage(logger *zap.SugaredLogger, env *conf.Env, config conf.StorageBackend, statsd statsd.ClientInterface, dataset string) *AzureStorage

func (*AzureStorage) GetChanges

func (azStorage *AzureStorage) GetChanges(since string) (io.Reader, error)

func (*AzureStorage) GetConfig

func (azStorage *AzureStorage) GetConfig() conf.StorageBackend

func (*AzureStorage) GetEntities

func (azStorage *AzureStorage) GetEntities() (io.Reader, error)

func (*AzureStorage) StoreEntities

func (azStorage *AzureStorage) StoreEntities(entities []*uda.Entity) error

func (*AzureStorage) StoreEntitiesFullSync

func (azStorage *AzureStorage) StoreEntitiesFullSync(state FullSyncState, entities []*uda.Entity) error

type ConsoleStorage

type ConsoleStorage struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func (*ConsoleStorage) GetChanges

func (consoleStorage *ConsoleStorage) GetChanges(since string) (io.Reader, error)

func (*ConsoleStorage) GetConfig

func (consoleStorage *ConsoleStorage) GetConfig() conf.StorageBackend

func (*ConsoleStorage) GetEntities

func (consoleStorage *ConsoleStorage) GetEntities() (io.Reader, error)

func (*ConsoleStorage) StoreEntities

func (consoleStorage *ConsoleStorage) StoreEntities(entities []*uda.Entity) error

func (*ConsoleStorage) StoreEntitiesFullSync

func (consoleStorage *ConsoleStorage) StoreEntitiesFullSync(state FullSyncState, entities []*uda.Entity) error

type FileInfo

type FileInfo struct {
	FilePath     string
	FileSize     int64
	LastModified time.Time
}

func GetAllFiles

func GetAllFiles(path string) []FileInfo

type FileObject

type FileObject struct {
	SortKey      string
	FilePath     string
	LastModified string
}

type FullSyncState

type FullSyncState struct {
	Id    string
	Start bool
	End   bool
}

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage(logger *zap.SugaredLogger, env *conf.Env, statsd statsd.ClientInterface, config conf.StorageBackend, dataset string) *LocalStorage

func (*LocalStorage) GetChanges

func (ls *LocalStorage) GetChanges(since string) (io.Reader, error)

func (*LocalStorage) GetConfig

func (ls *LocalStorage) GetConfig() conf.StorageBackend

func (*LocalStorage) GetEntities

func (ls *LocalStorage) GetEntities() (io.Reader, error)

func (*LocalStorage) StoreEntities

func (ls *LocalStorage) StoreEntities(entities []*uda.Entity) error

func (*LocalStorage) StoreEntitiesFullSync

func (ls *LocalStorage) StoreEntitiesFullSync(state FullSyncState, entities []*uda.Entity) error

type S3Storage

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

func NewS3Storage

func NewS3Storage(logger *zap.SugaredLogger, env *conf.Env, config conf.StorageBackend, statsd statsd.ClientInterface, dataset string) (*S3Storage, error)

func (*S3Storage) CreateBucketIfNotExist

func (s3s *S3Storage) CreateBucketIfNotExist() (bool, error)

func (*S3Storage) ExportSchema

func (s3s *S3Storage) ExportSchema() error

func (*S3Storage) GetChanges

func (s3s *S3Storage) GetChanges(since string) (io.Reader, error)

func (*S3Storage) GetConfig

func (s3s *S3Storage) GetConfig() conf.StorageBackend

func (*S3Storage) GetEntities

func (s3s *S3Storage) GetEntities() (io.Reader, error)

func (*S3Storage) StoreEntities

func (s3s *S3Storage) StoreEntities(entities []*uda.Entity) error

func (*S3Storage) StoreEntitiesFullSync

func (s3s *S3Storage) StoreEntitiesFullSync(state FullSyncState, entities []*uda.Entity) error

type StorageEngine

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

func NewStorageEngine

func NewStorageEngine(logger *zap.SugaredLogger, config *conf.ConfigurationManager, env *conf.Env, statsd statsd.ClientInterface) *StorageEngine

func (*StorageEngine) Close

func (engine *StorageEngine) Close(datasetName string)

Close handles cleanup of storage engines, if needed

func (*StorageEngine) Storage

func (engine *StorageEngine) Storage(datasetName string) (StorageInterface, error)

Storage returns a configured storage from the configured storages, or it returns an error if not found

type StorageInterface

type StorageInterface interface {
	GetConfig() conf.StorageBackend
	StoreEntities(entities []*uda.Entity) error
	StoreEntitiesFullSync(state FullSyncState, entities []*uda.Entity) error
	GetEntities() (io.Reader, error)
	GetChanges(since string) (io.Reader, error)
}

Jump to

Keyboard shortcuts

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