fednow

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MessageID added in v0.2.0

func MessageID(when time.Time, partyIdentification string, reference string) string

MessageID formats a FedNow Message Identification which is a reference assigned by the sender of the message. A MessageID is composed of

  • the Calendar Date (8 numeric characters, CCYYMMDD),
  • sender's FedNow Connection Party Identification (9 alphanumeric characters)
  • a reference assigned by the sender (up to 18 alphanumeric characters)

Types

type Amount

type Amount float64

func (Amount) MarshalText

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

func (Amount) Validate

func (a Amount) 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

ISODate is a custom type wrapping time.Time

func (ISODate) MarshalText

func (i ISODate) MarshalText() (string, error)

func (ISODate) MarshalXML added in v0.2.0

func (i ISODate) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ISODate) UnmarshalXML added in v0.2.0

func (i *ISODate) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type ISODateTime

type ISODateTime time.Time

func (ISODateTime) MarshalText

func (i ISODateTime) MarshalText() (string, error)

func (ISODateTime) MarshalXML added in v0.2.0

func (i ISODateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*ISODateTime) UnmarshalXML added in v0.2.0

func (i *ISODateTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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