fincen

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

Moov Banner Logo

Project Documentation · API Endpoints · API Guide · Community · Blog

GoDoc Build Status Coverage Status Go Report Card Repo Size Apache 2 License Slack Channel Docker Pulls GitHub Stars Twitter

fincen

Fincen (Financial crimes enforcment network) BSA data transmission methods for the the BSA E-Filing System

A go library for reading and writing Fincen BSA forms. It is capable of generating, validating, and batching submissions.

The project is Fincen which is a financial reporting for the United States. There are many forms that are required in this project but we will start with SAR(Suspicious activity report). I would like a go library that creates the structs to build and validate the SAR form. It also needs to be able to export the file to XML.

In the future we will wrap the service with json/http services so that it can work as a web service and not just a go library. New project https://github.com/moov-io/fincen/blob/master/README.md

We will end up with a sub project for each of the form parsers. This is all of the forms. https://bsaefiling.fincen.treas.gov/FilingInformation.html

The final phase of the project will be a service that collects fillings and then on a scheduled time will batch the fillings and submit them electronically. https://bsaefiling.fincen.treas.gov/docs/SDTMRequirements.pdf

About the BSA E-Filing System

Supported Forms

  • FinCEN Currency Transaction Report (FinCEN Report 112)
  • FinCEN Designation of Exempt Person (FinCEN Report 110)
  • FinCEN Suspicious Activity Report (FinCEN Report 111)
  • FinCEN Registration of Money Services Business (FinCEN Report 107)
  • Report of Foreign Bank and Financial Accounts (FinCEN Report 114)
  • Report of Cash Payments Over $10,000 Received in a Trade or Business (FinCEN Form 8300)

Filing information user guides

The Filing Information website contains PDF's of each of the XML formates. The PDF's guides contain links to XSD's of the formts.

Become a BSA E-Filer

Secure Direct Transfer Mode

Supervisory User Registration

Getting help

channel info
Project Documentation Our project documentation available online.
Twitter @moov You can follow Moov.io's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack Join our slack channel to have an interactive discussion about the development of the project.

License

Apache License 2.0 - See LICENSE for details.

Documentation

Index

Constants

View Source
const Version = "v0.2.2"

Variables

View Source
var (
	DefaultValidateFunction = "Validate"

	SequenceFieldName = "SeqNum"
)

Functions

func CheckInvolved

func CheckInvolved(element string, elements ...string) bool

func GenerateSeqNumbers added in v0.2.0

func GenerateSeqNumbers(r interface{}) error

GenerateSeqNumbers generate unique sequence numbers

func NewErrFieldRequired

func NewErrFieldRequired(typeStr string) error

NewErrFieldRequired returns an error when a field is required

func NewErrFiledOmitted

func NewErrFiledOmitted(typeStr string) error

NewErrFiledOmitted returns an error that the field should be omitted

func NewErrMinMaxRange

func NewErrMinMaxRange(typeStr string) error

NewErrMinMaxRange returns an error that the field has min/max element range

func NewErrValueInvalid

func NewErrValueInvalid(typeStr string) error

NewErrTextLength returns an error that the length of value is invalid

func NumericStringField

func NumericStringField(s string, max uint) string

NumericStringField return number string with filling zero

func Validate

func Validate(r interface{}, args ...string) error

Validate is trying to run Validate(...string) function of fields

func ValidateDateText

func ValidateDateText(str string) bool

ValidateDateText check input string is date string (YYYYMMDD)

func ValidateNumericCharacters

func ValidateNumericCharacters(str string, min, max int) bool

ValidateNumericCharacters check input string is numeric characters

Types

type DateYYYYMMDDOrBlankType

type DateYYYYMMDDOrBlankType string

Must match the pattern (19|20)[0-9][0-9](0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[01])|

func (DateYYYYMMDDOrBlankType) Validate

func (r DateYYYYMMDDOrBlankType) Validate() error

type DateYYYYMMDDOrBlankTypeDOB

type DateYYYYMMDDOrBlankTypeDOB string

Must match the pattern (19|20)[0-9][0-9](0[0-9]|1[0-2])(0[0-9]|1[0-9]|2[0-9]|3[01])|

func (DateYYYYMMDDOrBlankTypeDOB) Validate

func (r DateYYYYMMDDOrBlankTypeDOB) Validate() error

type DateYYYYMMDDType

type DateYYYYMMDDType string

Must match the pattern (19|20)[0-9][0-9](0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[01])

func (DateYYYYMMDDType) Validate

func (r DateYYYYMMDDType) Validate() error

type DateYYYYType

type DateYYYYType string

Must match the pattern (19|20)[0-9][0-9]

func (DateYYYYType) Validate

func (r DateYYYYType) Validate() error

type Element

type Element interface {
	Validate(args ...string) error
}

Element defines interface of complex xml elements args:

1: ActivityPartyTypeCode
2: FilerTypeIndividualIndicator (true/false)
1: disableValidateAttrs (EFilingBatchXML only)

type ElementActivity

type ElementActivity interface {
	Validate(args ...string) error
	FormTypeCode() string
	TotalAmount() float64
	PartyCount(args ...string) int64
}

Element defines interface of complex xml elements

type RestrictNumeric14

type RestrictNumeric14 string

func (RestrictNumeric14) Validate

func (r RestrictNumeric14) Validate() error

type RestrictString100

type RestrictString100 string

Must match the pattern \S+( +\S+)*|

func (RestrictString100) Validate

func (r RestrictString100) Validate() error

type RestrictString15

type RestrictString15 string

Must match the pattern \S+( +\S+)*|

func (RestrictString15) Validate

func (r RestrictString15) Validate() error

type RestrictString150

type RestrictString150 string

Must match the pattern \S+( +\S+)*|

func (RestrictString150) Validate

func (r RestrictString150) Validate() error

type RestrictString16

type RestrictString16 string

Must match the pattern \S+( +\S+)*|

func (RestrictString16) Validate

func (r RestrictString16) Validate() error

type RestrictString2

type RestrictString2 string

Must match the pattern \S+( +\S+)*|

func (RestrictString2) Validate

func (r RestrictString2) Validate() error

type RestrictString20

type RestrictString20 string

Must match the pattern \S+( +\S+)*|

func (RestrictString20) Validate

func (r RestrictString20) Validate() error

type RestrictString25

type RestrictString25 string

Must match the pattern \S+( +\S+)*|

func (RestrictString25) Validate

func (r RestrictString25) Validate() error

type RestrictString3

type RestrictString3 string

Must match the pattern \S+( +\S+)*|

func (RestrictString3) Validate

func (r RestrictString3) Validate() error

type RestrictString30

type RestrictString30 string

Must match the pattern \S+( +\S+)*|

func (RestrictString30) Validate

func (r RestrictString30) Validate() error

type RestrictString35

type RestrictString35 string

Must match the pattern \S+( +\S+)*|

func (RestrictString35) Validate

func (r RestrictString35) Validate() error

type RestrictString39

type RestrictString39 string

Must match the pattern \S+( +\S+)*|

func (RestrictString39) Validate

func (r RestrictString39) Validate() error

type RestrictString4

type RestrictString4 string

Must match the pattern \S+( +\S+)*|

func (RestrictString4) Validate

func (r RestrictString4) Validate() error

type RestrictString40

type RestrictString40 string

Must match the pattern \S+( +\S+)*|

func (RestrictString40) Validate

func (r RestrictString40) Validate() error

type RestrictString4000

type RestrictString4000 string

May be no more than 4000 items long

func (RestrictString4000) Validate

func (r RestrictString4000) Validate() error

type RestrictString50

type RestrictString50 string

Must match the pattern \S+( +\S+)*|

func (RestrictString50) Validate

func (r RestrictString50) Validate() error

type RestrictString512

type RestrictString512 string

Must match the pattern \S+( +\S+)*|

func (RestrictString512) Validate

func (r RestrictString512) Validate() error

type RestrictString517

type RestrictString517 string

Must match the pattern \S+( +\S+)*|

func (RestrictString517) Validate

func (r RestrictString517) Validate() error

type RestrictString525

type RestrictString525 string

Must match the pattern \S+( +\S+)*|

func (RestrictString525) Validate

func (r RestrictString525) Validate() error

type RestrictString6

type RestrictString6 string

Must match the pattern \S+( +\S+)*|

func (RestrictString6) Validate

func (r RestrictString6) Validate() error

type RestrictString750

type RestrictString750 string

Must match the pattern \S+( +\S+)*|

func (RestrictString750) Validate

func (r RestrictString750) Validate() error

type RestrictString9

type RestrictString9 string

Must match the pattern \S+( +\S+)*|

func (RestrictString9) Validate

func (r RestrictString9) Validate() error

type SeqNumber

type SeqNumber int64

May be one of C, D, E, F

func (SeqNumber) Validate

func (r SeqNumber) Validate() error

type ValidateAccountTypeCodeType

type ValidateAccountTypeCodeType string

May be one of 1, 2, 999

func (ValidateAccountTypeCodeType) Validate

func (r ValidateAccountTypeCodeType) Validate() error

type ValidateAssetAttributeTypeIDTypeCode

type ValidateAssetAttributeTypeIDTypeCode int64

May be one of 1, 2, 3, 4

func (ValidateAssetAttributeTypeIDTypeCode) Validate

type ValidateAssetSubtypeIDTypeCode

type ValidateAssetSubtypeIDTypeCode int64

May be one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 46, 47

func (ValidateAssetSubtypeIDTypeCode) Validate

type ValidateAssetTypeIDTypeCode

type ValidateAssetTypeIDTypeCode int64

May be one of 5, 6

func (ValidateAssetTypeIDTypeCode) Validate

func (r ValidateAssetTypeIDTypeCode) Validate() error

type ValidateCurrencyTransactionActivityDetailCodeType

type ValidateCurrencyTransactionActivityDetailCodeType string

May be one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 999

func (ValidateCurrencyTransactionActivityDetailCodeType) Validate

type ValidateCyberEventIndicatorsTypeCode

type ValidateCyberEventIndicatorsTypeCode string

May be one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 999

func (ValidateCyberEventIndicatorsTypeCode) Validate

type ValidateEFilingAccountTypeCodeType

type ValidateEFilingAccountTypeCodeType string

May be one of 141, 142, 143, 144

func (ValidateEFilingAccountTypeCodeType) Validate

type ValidateElectronicAddressTypeCode

type ValidateElectronicAddressTypeCode string

May be one of E, U

func (ValidateElectronicAddressTypeCode) Validate

type ValidateExemptBasisTypeCode

type ValidateExemptBasisTypeCode string

May be one of C, D, E, F

func (ValidateExemptBasisTypeCode) Validate

func (r ValidateExemptBasisTypeCode) Validate() error

type ValidateIndicatorType

type ValidateIndicatorType string

May be one of Y,

func (ValidateIndicatorType) Validate

func (r ValidateIndicatorType) Validate() error

type ValidateIndicatorYNType

type ValidateIndicatorYNType string

May be one of Y, N,

func (ValidateIndicatorYNType) Validate

func (r ValidateIndicatorYNType) Validate() error

type ValidateInstrumentProductServiceTypeCode

type ValidateInstrumentProductServiceTypeCode int

May be one of 35, 16, 39, 26, 40, 34

func (ValidateInstrumentProductServiceTypeCode) Validate

type ValidateLateFilingReasonCodeType

type ValidateLateFilingReasonCodeType string

May be one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 999

func (ValidateLateFilingReasonCodeType) Validate

type ValidateOrganizationCodeType

type ValidateOrganizationCodeType int

May be one of 1, 2, 3, 4, 5, 11, 12, 999

func (ValidateOrganizationCodeType) Validate

func (r ValidateOrganizationCodeType) Validate() error

type ValidateOrganizationSubtypeCodeCtrType

type ValidateOrganizationSubtypeCodeCtrType int

May be one of 101, 102, 103, 1999

func (ValidateOrganizationSubtypeCodeCtrType) Validate

type ValidateOrganizationSubtypeCodeSarType

type ValidateOrganizationSubtypeCodeSarType int

May be one of 101, 102, 103, 503, 504, 508, 513, 514, 535, 528, 529, 533, 534, 539, 540, 541, 542, 1999, 5999

func (ValidateOrganizationSubtypeCodeSarType) Validate

type ValidatePartyTypeCode

type ValidatePartyTypeCode string

May be one of I, O, U

func (ValidatePartyTypeCode) Validate

func (r ValidatePartyTypeCode) Validate() error

type ValidatePhoneNumberCodeType

type ValidatePhoneNumberCodeType string

May be one of F, M, R, W

func (ValidatePhoneNumberCodeType) Validate

func (r ValidatePhoneNumberCodeType) Validate() error

type ValidateSuspiciousActivitySubtypeID

type ValidateSuspiciousActivitySubtypeID int

May be one of 106, 111, 112, 113, 114, 301, 304, 305, 308, 309, 310, 312, 320, 321, 322, 323, 324, 325, 401, 402, 403, 404, 405, 409, 501, 502, 504, 505, 506, 507, 601, 603, 604, 608, 609, 701, 801, 804, 805, 806, 807, 808, 809, 812, 820, 821, 822, 823, 824, 901, 903, 904, 905, 907, 908, 909, 910, 911, 913, 917, 920, 921, 922, 924, 925, 926, 927, 928, 1001, 1003, 1005, 1006, 1007, 1101, 1102, 1201, 1202, 1203, 1204, 1999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 10999, 11999, 12999

func (ValidateSuspiciousActivitySubtypeID) Validate

type ValidateSuspiciousActivityTypeID

type ValidateSuspiciousActivityTypeID int

May be one of 1, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11

func (ValidateSuspiciousActivityTypeID) Validate

type ValidateTimeDataOrBlankType

type ValidateTimeDataOrBlankType string

Must match the pattern ([0-1][0-9]|(2[0-3])):[0-5][0-9]:[0-5][0-9]|

func (ValidateTimeDataOrBlankType) Validate

func (r ValidateTimeDataOrBlankType) Validate() error

Jump to

Keyboard shortcuts

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