service

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversionService

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

func NewConversionService

func NewConversionService(db *database.PostgresDB) *ConversionService

func (*ConversionService) GetAllData

func (s *ConversionService) GetAllData() ([]map[string]interface{}, error)

GetAllData retrieves all CSV data from the database

func (*ConversionService) GetDataByID

func (s *ConversionService) GetDataByID(id int) (map[string]interface{}, error)

GetDataByID retrieves CSV data by ID from the database

func (*ConversionService) ProcessCSVFile

func (s *ConversionService) ProcessCSVFile(filePath string) ([]byte, error)

ProcessCSVFile reads a CSV file and converts it to JSON

func (*ConversionService) ProcessCSVReader

func (s *ConversionService) ProcessCSVReader(r io.Reader) ([]byte, error)

ProcessCSVReader reads a CSV from an io.Reader and converts it to JSON

func (*ConversionService) ProcessCSVReaderWithFilename

func (s *ConversionService) ProcessCSVReaderWithFilename(r io.Reader, filename string) ([]byte, error)

ProcessCSVReaderWithFilename reads a CSV from an io.Reader, converts it to JSON, and saves to database

Jump to

Keyboard shortcuts

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