storage

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package storage provides a unified interface for various storage solutions including cache, database, and file storage.

Index

Constants

View Source
const (
	Module = "storage"
)

Variables

This section is empty.

Functions

func New

New creates a new storage provider instance based on the provided structured configuration. This function is primarily for backward compatibility or when a custom interfaces.StructuredConfig implementation is used. For most cases, NewProvider is recommended.

func NewCaches added in v0.2.12

func NewCaches(cachesConfig *datav1.Caches) (map[string]storageiface.Cache, string, error)

NewCaches creates a map of cache instances and determines the default cache name from a datav1.Caches configuration object.

func NewCachesFromConfigs added in v0.2.12

func NewCachesFromConfigs(configs map[string]*cachev1.CacheConfig) (map[string]storageiface.Cache, error)

NewCachesFromConfigs creates a map of cache instances from a map of cache configurations.

func NewDatabases added in v0.2.12

func NewDatabases(databasesConfig *datav1.Databases) (map[string]storageiface.Database, string, error)

NewDatabases creates a map of database instances and determines the default database name from a datav1.Databases configuration object.

func NewDatabasesFromConfigs added in v0.2.12

func NewDatabasesFromConfigs(configs map[string]*databasev1.DatabaseConfig) (map[string]storageiface.Database, error)

NewDatabasesFromConfigs creates a map of database instances from a map of database configurations.

func NewFileStoresFromConfigs added in v0.2.12

func NewFileStoresFromConfigs(configs map[string]*filestorev1.FilestoreConfig) (map[string]storageiface.FileStore, error)

NewFileStoresFromConfigs creates a map of file store instances from a map of file store configurations.

func NewFilestores added in v0.2.12

func NewFilestores(filestoresConfig *datav1.Filestores) (map[string]storageiface.FileStore, string, error)

NewFilestores creates a map of file store instances and determines the default file store name from a datav1.FileStores configuration object.

func NewProvider added in v0.2.12

func NewProvider(dataConfig *datav1.Data) (storageiface.Provider, error)

NewProvider creates a new storage provider instance based on the provided decoded DataConfig. This is the recommended way to initialize a full storage provider when you have the configuration already decoded.

Types

This section is empty.

Directories

Path Synopsis
Package cache implements the functions, types, and interfaces for the module.
Package cache implements the functions, types, and interfaces for the module.
Package database implements the functions, types, and interfaces for the module.
Package database implements the functions, types, and interfaces for the module.
Package filestore implements the functions, types, and interfaces for the module.
Package filestore implements the functions, types, and interfaces for the module.

Jump to

Keyboard shortcuts

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