fedwire

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddError

func AddError(errs *base.ErrorList, fieldName string, err error)

func BusinessMessageID

func BusinessMessageID(prefix string) string

BusinessMessageID creates a FedWire Business Message Identifier from a base64-encoded UUID v4 and a prefix (up to 3 characters)

func BusinessMessageIDHash

func BusinessMessageIDHash(prefix string, input ...string) string

BusinessMessageID creates a FedWire Business Message Identifier from a base64-encoded SHA UUID v4 and a prefix (up to 3 characters)

func Eastern

func Eastern() *time.Location

Eastern returns a *time.Location for the US Eastern region. RTP requires all timestamps are in this location.

func InputMessageAccountabilityData

func InputMessageAccountabilityData(cycleDate string, endpointID string, sequenceNumber int) string

InputMessageAccountabilityData is an Identifier composed of the FedWire Input Cycle Date, Input Source, and Input Sequence Number.

- The Input Cycle Date must be the Fedwire funds-transfer business day (8 characters, CCYYMMDD). - The Input Source must be the unique Endpoint ID of the Fedwire Sender (8 characters, alphanumeric). - The Input Sequence Number should be incremental and should start with 000001 at the start of each Input Cycle Date per Endpoint ID (6 characters, numeric).

func ValidBusinessMessageID

func ValidBusinessMessageID(id string) error

func ValidIMAD

func ValidIMAD(input string) error

func ValidateEnumeration

func ValidateEnumeration(value string, enumeration ...string) error

func ValidateFractionDigits

func ValidateFractionDigits(value string, maxValue int) error

func ValidateLength

func ValidateLength(value string, length int) error

func ValidateMaxExclusive

func ValidateMaxExclusive[N cmp.Ordered](value N, maxValue N) error

func ValidateMaxInclusive

func ValidateMaxInclusive[N cmp.Ordered](value N, maxValue N) error

func ValidateMaxLength

func ValidateMaxLength(value string, maxLength int) error

func ValidateMinExclusive

func ValidateMinExclusive[N cmp.Ordered](value N, minValue N) error

func ValidateMinInclusive

func ValidateMinInclusive[N cmp.Ordered](value N, minValue N) error

func ValidateMinLength

func ValidateMinLength(value string, minLength int) error

func ValidatePattern

func ValidatePattern(value string, regex string) error

func ValidateTotalDigits

func ValidateTotalDigits(value string, maxValue int) error

Types

type Amount

type Amount float64

func (Amount) MarshalText

func (a Amount) MarshalText() ([]byte, error)

func (Amount) Validate

func (a Amount) Validate() error

type Cdata

type Cdata struct {
	CDataString string `xml:",cdata"`
}

func (Cdata) Validate

func (c Cdata) Validate() error

type ErrorCode

type ErrorCode struct {
	Code        string
	Description string
	Level       ErrorLevel
}

func IsError

func IsError(code string) *ErrorCode

type ErrorLevel

type ErrorLevel string
const (
	// ErrAccountFatal indicates a problem with the (Creditor) account.
	// It likely should be reverified.
	ErrAccountFatal ErrorLevel = "Fatal error for the Account"

	// ErrFatal indicates a problem that likely requires a human be notified.
	ErrFatal ErrorLevel = "Fatal error"

	// ErrTemporary indicates a problem which should go away with time.
	ErrTemporary ErrorLevel = "Temporary"

	// ErrNetwork indicates a problem with the network / connection.
	ErrNetwork ErrorLevel = "Network issue"

	// ErrLogic indicates a bug to fix or work around.
	ErrLogic ErrorLevel = "Logic Bug"
)

func (ErrorLevel) Error

func (e ErrorLevel) Error() string

type ISODate

type ISODate time.Time

func (ISODate) MarshalText

func (t ISODate) MarshalText() ([]byte, error)

func (ISODate) String

func (t ISODate) String() string

func (*ISODate) UnmarshalText

func (t *ISODate) UnmarshalText(text []byte) error

func (ISODate) Validate

func (t ISODate) Validate() error

type ISODateTime

type ISODateTime time.Time

func (ISODateTime) MarshalText

func (t ISODateTime) MarshalText() ([]byte, error)

func (ISODateTime) String

func (t ISODateTime) String() string

func (*ISODateTime) UnmarshalText

func (t *ISODateTime) UnmarshalText(text []byte) error

func (ISODateTime) Validate

func (t ISODateTime) Validate() error

type ISOTime

type ISOTime time.Time

func (ISOTime) MarshalText

func (t ISOTime) MarshalText() ([]byte, error)

func (ISOTime) String

func (t ISOTime) String() string

func (*ISOTime) UnmarshalText

func (t *ISOTime) UnmarshalText(text []byte) error

func (ISOTime) Validate

func (t ISOTime) Validate() error

Jump to

Keyboard shortcuts

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