command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyName                        = errors.New("name cannot be empty")
	ErrInvalidCharacterInName           = errors.New("name contains an invalid character")
	ErrEmptyBankAccountNumber           = errors.New("bank account number cannot be empty")
	ErrInvalidDashedBankAccountNumber   = errors.New("bank account number in dashed format is malformed")
	ErrBankAccountNumberNotNumeric      = errors.New("bank account number contains non numeric characters")
	ErrBankAccountNumberBankCodeInvalid = errors.New("bank account number contains an invalid bank code")
	ErrBankAccountNumberTooShort        = errors.New("bank account number is too short")
	ErrBankAccountNumberTooLong         = errors.New("bank account number is too long")
	ErrBankAccountNumberChecksumInvalid = errors.New("bank account number contains an invalid checksum")
	ErrEmptyCity                        = errors.New("city cannot be empty")
	ErrInvalidCharacterInCity           = errors.New("city contains an invalid character")
)

Functions

This section is empty.

Types

type Init

type Init struct {
	Name              string
	BankAccountNumber string
	City              string
	UserID            string
	UserName          string
}

func (Init) Format

func (i Init) Format() Init

Format

Must be called only after a successful validation! Returns the same structure with expanded Bank account number.

func (Init) ToIPSString

func (i Init) ToIPSString() string

ToIPSString

Formats the data into an IPS string. The format is described here: https://ips.nbs.rs/PDF/pdfPreporukeValidacija.pdf

func (Init) Validate

func (i Init) Validate() error

Jump to

Keyboard shortcuts

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