file

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExcelFile

type ExcelFile interface {
	// GetRows returns all rows for a specific sheet
	GetRows(sheet string) ([][]string, error)
	// Close closes and cleanup the open temporary file
	Close() error
}

ExcelFile defines the contract for perform action over an excel file

func NewExcelizeFile

func NewExcelizeFile(file *excelize.File) (ExcelFile, error)

NewExcelizeFile creates an instance of ExcelFile

type ExcelFileSystem

type ExcelFileSystem interface {
	// Open opens the excel file
	Open(path string) (ExcelFile, error)
}

ExcelFileSystem defines a system that contains excel files

and allows access to them

func NewExcelizeFileSystem

func NewExcelizeFileSystem() (ExcelFileSystem, error)

NewExcelizeFileSystem creates an instance of ExcelFileSystem

type ExcelizeFile

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

ExcelizeFile is the handler to manage action for a excel file

using excelize package

func (*ExcelizeFile) Close

func (f *ExcelizeFile) Close() error

Close closes and cleanup the open temporary file

func (*ExcelizeFile) GetRows

func (f *ExcelizeFile) GetRows(sheet string) ([][]string, error)

GetRows returns all rows for a specific sheet

type ExcelizeFileSystem

type ExcelizeFileSystem struct{}

ExcelizeFileSystem is the handler of a excel file system

using excelize package

func (*ExcelizeFileSystem) Open

func (fs *ExcelizeFileSystem) Open(path string) (ExcelFile, error)

Open opens the excel file

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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