transaction

package
v0.0.0-...-6c6b626 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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