1package datastore23// StorageOption configures storages.4type StorageOption func(*Storage)56// WithSchema assigns a schema to the storage.7func WithSchema(s *Schema) StorageOption {8 return func(st *Storage) {9 if s != nil {10 st.schema = s11 }12 }13}1415// WithIndex assigns an index to the storage.16func WithIndex(i Index) StorageOption {17 return func(st *Storage) {18 st.collection.AddIndex(i.name, i.fn, i.options)19 }20}21Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.