finly

package
v0.0.0-...-9d57a4f Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package finly provides a store that interacts with the database to retrieve bank information.

Index

Constants

This section is empty.

Variables

View Source
var ErrBankNotFound = errors.New("bank not found")

Functions

This section is empty.

Types

type Bank

type Bank struct {
	// Name specifies the name of the bank
	Name string `json:"name"`
	// State specifics which state the bank is in
	State string `json:"state"`
	// City specifies which city the bank is in
	City string `json:"city"`
	// Micr specifies the micr code of the bank
	Micr string `json:"micr"`
	// Branch specifies the branch of the bank
	Branch string `json:"branch"`
	// Code specifies the code of the bank which is unique and 4 letters long
	Code string `json:"code"`
	// Contact information of the bank
	Contact string `json:"contact"`
	// Ifsc code of the bank branch
	Ifsc string `json:"ifsc"`
	// District specifies which district the bank is in
	District string `json:"district"`
	// Address specifies the address of the bank
	Address string `json:"address"`
	// Center specifies the center of the bank
	Center string `json:"center"`
	// Swift specifies the swift code of the bank
	Swift string `json:"swift"`
	// Iso3166 specifies the iso3166 code of the bank
	Iso3166 string `json:"iso3166"`
	// Neft specifies whether the bank supports neft
	Neft bool `json:"neft"`
	// Rtgs specifies whether the bank supports rtgs
	Rtgs bool `json:"rtgs"`
	// Imps specifies whether the bank supports imps
	Imps bool `json:"imps"`
	// Upi specifies whether the bank supports upi
	Upi bool `json:"upi"`
}

Bank entity represents the bank across the indian banking system

type Finly

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

Finly is the store that interacts with the database

func New

func New() (*Finly, error)

New returns a new finly instance that interacts with the database. It returns an error if it fails to open the database.

func (*Finly) GetBankByIFSC

func (b *Finly) GetBankByIFSC(ctx context.Context, ifsc string) (*Bank, error)

GetBankByIFSC returns a Bank instance by its IFSC code. It returns an error if it fails to query the database.

Jump to

Keyboard shortcuts

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