bill

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package bill is used to define the bill reading method

The bill package uses the template method design pattern, so to add a new bill reader, all you need to do is implement TransactionReader and update the NewReader method.

Of course, the new product configuration needs to be completed before this, Its configuration is very simple, refer to other product in A file [productModel.initSqlFile] set the data of the new product, and set productModel.Key

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCategoryCannotRead      = errors.New("交易类型不可读取")
	ErrCategoryReadFail        = errors.New("读取交易类型失败")
	ErrCategoryMappingNotExist = errors.New("不存在关联类型")
)

Functions

This section is empty.

Types

type AliPayReader

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

type BillInfo

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

type Reader

type Reader interface {
	TransactionReader
	ReaderTrans(row []string, ctx context.Context) (trans transactionModel.Info, ignore bool, err error)
	// contains filtered or unexported methods
}

func NewReader

func NewReader(account accountModel.Account, product productModel.Product, ctx context.Context) (Reader, error)

type ReaderTemplate

type ReaderTemplate struct {
	BillInfo

	TransactionReadIterator
	TransactionReader
}

func (*ReaderTemplate) ReaderTrans

func (t *ReaderTemplate) ReaderTrans(row []string, ctx context.Context) (
	trans transactionModel.Info, ignore bool, err error,
)

type TransactionReadIterator

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

type TransactionReader

type TransactionReader interface {
	// contains filtered or unexported methods
}

type WeChatPayReader

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

Jump to

Keyboard shortcuts

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