store

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package store provides generic storage interfaces and factory functions for different storage backends

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage[T any] interface {
	Set(string, T) error
	Get(string) (T, error)
	GetAll() ([]T, error)
	Delete(string) error
	Close() error
}

Storage provides generic storage operations for storable objects

func NewStorage

func NewStorage[T any](storeType Type, config any) (Storage[T], error)

NewStorage creates a new storage instance based on the specified store type and configuration

type Type

type Type string

Type represents the type of storage backend

const (
	// DiskStoreType indicates file-based disk storage
	DiskStoreType Type = "disk"
)

Directories

Path Synopsis
Package disk provides configuration for disk-based storage implementations
Package disk provides configuration for disk-based storage implementations

Jump to

Keyboard shortcuts

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