dalgo2files

package module
v0.0.0-...-ac0ca2b Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: MIT Imports: 8 Imported by: 0

README

github.com/dal-go/dalgo2files

A DALgo provider to persist data on a file system mainly in human-readable formats like JSON/YAML/CSV/etc.

Documentation

Index

Constants

View Source
const DalgoProviderID = "dalgo2files"

Variables

This section is empty.

Functions

func NewDB

func NewDB(dirPath string, schemaDefinition SchemaDefinition) (db dal.DB, err error)

Types

type ByDefault

type ByDefault struct {
	StoreRecordsAs StoreCollectionRecordsAs
	RecordFormat   RecordFormat
}

type CollectionDef

type CollectionDef struct {
	StoreRecordsAs StoreCollectionRecordsAs
	RecordFormat   RecordFormat
}

func (CollectionDef) Validate

func (v CollectionDef) Validate() error

type RecordFormat

type RecordFormat string
const RecordFormatJSON RecordFormat = "json"

type SchemaDefinition

type SchemaDefinition interface {
	GetCollectionDef(key *dal.Key) CollectionDef
	Validate() error
}

func NewSchemaDefinition

func NewSchemaDefinition(collections map[string]*CollectionDef) SchemaDefinition

type StoreCollectionRecordsAs

type StoreCollectionRecordsAs string
const (
	StoreCollectionRecordsInSingleFile    StoreCollectionRecordsAs = "single_file"
	StoreCollectionRecordsIndividualFiles StoreCollectionRecordsAs = "individual_files"
)

Jump to

Keyboard shortcuts

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