Documentation
¶
Index ¶
- func AddError(errs *base.ErrorList, fieldName string, err error)
- func Eastern() *time.Location
- func ValidateEnumeration(value string, enumeration ...string) error
- func ValidateFractionDigits(value string, maxValue int) error
- func ValidateLength(value string, length int) error
- func ValidateMaxExclusive[N cmp.Ordered](value N, maxValue N) error
- func ValidateMaxInclusive[N cmp.Ordered](value N, maxValue N) error
- func ValidateMaxLength(value string, maxLength int) error
- func ValidateMinExclusive[N cmp.Ordered](value N, minValue N) error
- func ValidateMinInclusive[N cmp.Ordered](value N, minValue N) error
- func ValidateMinLength(value string, minLength int) error
- func ValidatePattern(value string, regex string) error
- func ValidateTotalDigits(value string, maxValue int) error
- type Amount
- type ErrorCode
- type ErrorLevel
- type ISODate
- type ISODateTime
- type ISOTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eastern ¶
Eastern returns a *time.Location for the US Eastern region. RTP requires all timestamps are in this location.
func ValidateEnumeration ¶
func ValidateFractionDigits ¶
func ValidateLength ¶
func ValidateMaxExclusive ¶
func ValidateMaxInclusive ¶
func ValidateMaxLength ¶
func ValidateMinExclusive ¶
func ValidateMinInclusive ¶
func ValidateMinLength ¶
func ValidatePattern ¶
func ValidateTotalDigits ¶
Types ¶
type ErrorCode ¶
type ErrorCode struct {
Code string
Description string
Level ErrorLevel
}
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 ISODateTime ¶
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
Click to show internal directories.
Click to hide internal directories.