ws

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillImportWebsocket

type BillImportWebsocket struct {
	msg.Reader

	WaitRetryTrans *dataTool.RWMutexMap[string, transactionModel.Info]
	RetryingTrans  *dataTool.RWMutexMap[string, transactionModel.Info]
	// contains filtered or unexported fields
}

func NewBillImportWebsocket

func NewBillImportWebsocket(conn *websocket.Conn, account accountModel.Account) *BillImportWebsocket

func (*BillImportWebsocket) Read

func (b *BillImportWebsocket) Read() error

func (*BillImportWebsocket) ReadFile

func (b *BillImportWebsocket) ReadFile() (name []byte, file io.Reader, err error)

func (*BillImportWebsocket) RegisterMsgHandlerCreateRetry

func (b *BillImportWebsocket) RegisterMsgHandlerCreateRetry(handler func(transactionModel.Info) error)

func (*BillImportWebsocket) RegisterMsgHandlerIgnoreTrans

func (b *BillImportWebsocket) RegisterMsgHandlerIgnoreTrans()

func (*BillImportWebsocket) SendError

func (b *BillImportWebsocket) SendError() error

func (*BillImportWebsocket) SendFinish

func (b *BillImportWebsocket) SendFinish() error

func (*BillImportWebsocket) SendTransactionCreateFail

func (b *BillImportWebsocket) SendTransactionCreateFail(transInfo transactionModel.Info, failErr error) error

func (*BillImportWebsocket) SendTransactionCreateSuccess

func (b *BillImportWebsocket) SendTransactionCreateSuccess(transaction transactionModel.Transaction) error

func (*BillImportWebsocket) TryFinish

func (b *BillImportWebsocket) TryFinish() error

type TotalData

type TotalData struct {
	ExpenseAmount, IncomeAmount            atomic.Int64
	ExpenseCount, IncomeCount, IgnoreCount atomic.Int32
}

Directories

Path Synopsis
Package msg is the middle layer of client websocket communication This package is used to standardize websocket message formats with clients
Package msg is the middle layer of client websocket communication This package is used to standardize websocket message formats with clients

Jump to

Keyboard shortcuts

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