storage

package
v0.0.0-...-c0efb99 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFileStorage

type CSVFileStorage struct {
	// contains filtered or unexported fields
}

CSVFileStorage type

func NewCSVFileStorage

func NewCSVFileStorage(envConfig *config.Environment) *CSVFileStorage

NewCSVFileStorage creates a new CSVFileStorage

func (*CSVFileStorage) Delete

func (s *CSVFileStorage) Delete(fileName string) error

Delete deletes the file

func (*CSVFileStorage) Read

func (s *CSVFileStorage) Read(fileName string) ([][]string, error)

Read reads the file

func (*CSVFileStorage) Save

func (s *CSVFileStorage) Save(file multipart.File) (string, error)

Save saves the data to a file. Returns the filename and an error

type CSVStorage

type CSVStorage interface {
	Save(file multipart.File) (string, error)
	Delete(fileName string) error
	Read(fileName string) ([][]string, error)
}

CSVStorage interface for storing csv files

Jump to

Keyboard shortcuts

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