Documentation ¶
Index ¶
- Constants
- Variables
- func IsMetroFile(s string) bool
- func IsPacked(s string) bool
- func IsVariableLength(s string) bool
- func NewErrApplicableSegment(recordName, segName string) error
- func NewErrBlockDescriptorWord() error
- func NewErrFailedParsing() error
- func NewErrFieldRequired(fieldName, recordName string) error
- func NewErrInvalidRecord(name string) error
- func NewErrInvalidSegment(name string) error
- func NewErrInvalidValueOfField(fieldName, recordName string) error
- func NewErrNonAlphanumeric(fieldName, recordName string) error
- func NewErrNumeric(fieldName, recordName string) error
- func NewErrPhoneNumber(recordName string) error
- func NewErrSegmentLength(recordName string) error
- func NewErrUpperAlpha(fieldName, recordName string) error
- func NewErrValidDate(fieldName, recordName string) error
- func ReadFile(f *os.File) string
Constants ¶
const ( // Character Format (Fixed or variable blocked) CharacterFileFormat = "Character" // Packed Format (Variable blocked) PackedFileFormat = "Packed" // Name of header record HeaderRecordName = "header" // Name of trailer record TrailerRecordName = "trailer" // Name of data record DataRecordName = "data" // Json format MessageJsonFormat = "json" // Metro format MessageMetroFormat = "metro" )
Variables ¶
var ( // ErrInvalidMetroFile is given when there's an invalid file ErrInvalidMetroFile = errors.New("the file isn't metro file") // ErrNonHeaderRecord is given when there isn't header record ErrNonHeaderRecord = errors.New("the file must have header record") )
Functions ¶
func NewErrApplicableSegment ¶
NewErrApplicableSegment returns a error that can't support applicable segment
func NewErrBlockDescriptorWord ¶
func NewErrBlockDescriptorWord() error
NewErrBlockDescriptorWord returns a error that
func NewErrFailedParsing ¶ added in v0.3.0
func NewErrFailedParsing() error
NewErrFailedParsing returns a error that is failed parsing raw data
func NewErrFieldRequired ¶ added in v0.3.0
NewErrFieldRequired is given when a field is required
func NewErrInvalidRecord ¶ added in v0.3.0
NewErrInvalidRecord returns a error if is invalid record
func NewErrInvalidSegment ¶ added in v0.3.0
NewErrInvalidSegment returns a error that has invalid segment
func NewErrInvalidValueOfField ¶ added in v0.3.0
NewErrInvalidValueOfField returns a error that has invalid value
func NewErrNonAlphanumeric ¶ added in v0.3.0
NewErrNonAlphanumeric is given when a field has non-alphanumeric characters
func NewErrNumeric ¶ added in v0.3.0
NewErrNumeric is given when a field is not numeric characters
func NewErrPhoneNumber ¶ added in v0.3.0
NewErrPhoneNumber is given when a field is an invalid phone number
func NewErrSegmentLength ¶ added in v0.3.0
NewErrSegmentLength is given when a segment has an invalid length
func NewErrUpperAlpha ¶ added in v0.3.0
NewErrUpperAlpha is given when a field is not in uppercase
func NewErrValidDate ¶ added in v0.3.0
NewErrValidDate is given when there's an invalid date
Types ¶
This section is empty.