Documentation ¶
Index ¶
- Constants
- func New(opt ...ImportOptions) *importer
- type ImportOptions
- func WithCtx(ctx context.Context) ImportOptions
- func WithExtFile(ext string) ImportOptions
- func WithFile(file multipart.File) ImportOptions
- func WithProcessFn(fn processFn) ImportOptions
- func WithProcessName(processName string) ImportOptions
- func WithSentNotifToSlack(sent bool, channel ...string) ImportOptions
- func WithSheetName(sheetName string) ImportOptions
- func WithStructDestination(structDestination interface{}) ImportOptions
- func WithTransaction(trx database.Transactions) ImportOptions
- func WithWorker(totalWorker int) ImportOptions
- type ImportResult
Constants ¶
View Source
const ( ExcelFileType = "excel" CSVFileType = "csv" UndefinedFileType = "" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opt ...ImportOptions) *importer
Types ¶
type ImportOptions ¶
type ImportOptions func(reader *importer)
func WithCtx ¶
func WithCtx(ctx context.Context) ImportOptions
func WithExtFile ¶
func WithExtFile(ext string) ImportOptions
func WithFile ¶
func WithFile(file multipart.File) ImportOptions
func WithProcessFn ¶
func WithProcessFn(fn processFn) ImportOptions
func WithProcessName ¶ added in v2.17.7
func WithProcessName(processName string) ImportOptions
func WithSentNotifToSlack ¶
func WithSentNotifToSlack(sent bool, channel ...string) ImportOptions
func WithSheetName ¶
func WithSheetName(sheetName string) ImportOptions
func WithStructDestination ¶
func WithStructDestination(structDestination interface{}) ImportOptions
func WithTransaction ¶
func WithTransaction(trx database.Transactions) ImportOptions
func WithWorker ¶
func WithWorker(totalWorker int) ImportOptions
Click to show internal directories.
Click to hide internal directories.