storage

package
v0.0.0-...-bb9ebef Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugins

func Plugins(sl generate.Slic, data string) error

Types

type FileStorage

type FileStorage struct {
	FilePath string
}

func (*FileStorage) ReadAll

func (fs *FileStorage) ReadAll() ([]string, error)

func (*FileStorage) Save

func (fs *FileStorage) Save(sl generate.Slic, data string) error

type MongoDBStorage

type MongoDBStorage struct {
	Collection *mongo.Collection
}

func (*MongoDBStorage) ReadAll

func (ms *MongoDBStorage) ReadAll() ([]string, error)

func (*MongoDBStorage) Save

func (ms *MongoDBStorage) Save(data string) error

type PostgresStorage

type PostgresStorage struct {
	ConnStr string
}

func (*PostgresStorage) ReadAll

func (ps *PostgresStorage) ReadAll() ([]string, error)

func (*PostgresStorage) Save

func (ps *PostgresStorage) Save(data string) error

type Storage

type Storage interface {
	Save(data string) error
	ReadAll() ([]string, error)
}

Jump to

Keyboard shortcuts

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