Documentation ¶
Index ¶
- Constants
- func New(ctx context.Context, config cmap.CustomMap) (storageTY.Plugin, error)
- type Config
- type Store
- func (s *Store) ClearDatabase() error
- func (s *Store) Close() error
- func (s *Store) Delete(entityName string, filters []storageTY.Filter) (int64, error)
- func (s *Store) DoStartupImport() (bool, string, string)
- func (s *Store) Find(entityName string, out interface{}, filters []storageTY.Filter, ...) (*storageTY.Result, error)
- func (s *Store) FindOne(entityName string, out interface{}, filters []storageTY.Filter) error
- func (s *Store) Insert(entityName string, data interface{}) error
- func (s *Store) Name() string
- func (s *Store) Pause() error
- func (s *Store) Ping() error
- func (s *Store) Resume() error
- func (s *Store) Update(entityName string, data interface{}, filters []storageTY.Filter) error
- func (s *Store) Upsert(entityName string, data interface{}, filters []storageTY.Filter) error
Constants ¶
View Source
const (
PluginMemory = storageTY.TypeMemory
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `yaml:"name"` DumpEnabled bool `yaml:"dump_enabled"` DumpInterval string `yaml:"dump_interval"` DumpDir string `yaml:"dump_dir"` DumpFormat []string `yaml:"dump_format"` LoadFormat string `yaml:"load_format"` }
Config of the memory storage
type Store ¶
type Store struct { Config Config // contains filtered or unexported fields }
Store to keep all the entities
func (*Store) ClearDatabase ¶
ClearDatabase removes all the data from the database
func (*Store) DoStartupImport ¶
DoStartupImport returns the needs, files location, and file format
func (*Store) Find ¶
func (s *Store) Find(entityName string, out interface{}, filters []storageTY.Filter, pagination *storageTY.Pagination) (*storageTY.Result, error)
Find Implementation
Click to show internal directories.
Click to hide internal directories.