service

package
v0.0.0-...-cad2462 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVData

type CSVData []string

CSVData represents a row of data in the CSV file

type CSVService

type CSVService interface {
	ReadCSVData() ([][]string, error)
	MapCsvResponse(data [][]string) []model.AIProject
}

CSVService defines the interface for reading data from a CSV file

type CSVServiceImpl

type CSVServiceImpl struct {
}

CSVServiceImpl is an implementation of the CSVService interface

func InitService

func InitService() *CSVServiceImpl

func (*CSVServiceImpl) MapCsvResponse

func (service *CSVServiceImpl) MapCsvResponse(data [][]string) []model.AIProject

func (*CSVServiceImpl) ReadCSVData

func (service *CSVServiceImpl) ReadCSVData(filepath string) ([]model.AIProject, error)

ReadCSVData reads data from a CSV file and returns the data as a slice of CSVData

Jump to

Keyboard shortcuts

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