storage

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 4 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 (
	// CategoryDatabase is the category for database components.
	CategoryDatabase component.Category = "database"
	// CategoryCache is the category for cache components.
	CategoryCache component.Category = "cache"
	// CategoryObjectStore is the category for objectstore components.
	CategoryObjectStore component.Category = "objectstore"
)
View Source
const (
	Module = "storage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v0.2.13

type Provider interface {
	Cache(name string) (storageiface.Cache, error)
	DefaultCache() (storageiface.Cache, error)

	Database(name string) (storageiface.Database, error)
	DefaultDatabase() (storageiface.Database, error)

	ObjectStore(name string) (storageiface.ObjectStore, error)
	DefaultObjectStore() (storageiface.ObjectStore, error)
}

Provider defines the interface for a storage service provider. It acts as a bridge to the runtime engine's component container.

func NewProvider added in v0.2.12

func NewProvider(l component.Locator) Provider

NewProvider creates a new storage provider instance.

Directories

Path Synopsis
Package cache provides a factory function to create Cache instances.
Package cache provides a factory function to create Cache instances.
Package database implements the functions, types, and contracts for the module.
Package database implements the functions, types, and contracts for the module.
Package objectstore provides a factory function to create ObjectStore instances.
Package objectstore provides a factory function to create ObjectStore instances.

Jump to

Keyboard shortcuts

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