Documentation
¶
Overview ¶
Copyright (c) 2023 Tiago Melo. All rights reserved. Use of this source code is governed by the MIT License that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct { TransactionID int `json:"transaction_id"` AccountNumber int `json:"account_number"` TransactionType string `json:"transaction_type"` TransactionAmount float32 `json:"transaction_amount"` TransactionTime time.Time `json:"transaction_time"` Location string `json:"location"` }
Transaction represents a transaction message.
func New ¶
func New(rawTransaction string) (*Transaction, error)
New creates a new Transaction from the raw JSON transaction data.
func (*Transaction) IsSuspicious ¶
func (t *Transaction) IsSuspicious() bool
IsSuspicious checks if the transaction amount is suspicious.
Click to show internal directories.
Click to hide internal directories.