Documentation
¶
Overview ¶
Package params defines the parameter used in FPDUs. those parameters can be marshaled and unmarshaled in their binary form for wire transfer.
Index ¶
- Constants
- Variables
- func IsGroup(t Type) bool
- func ReadSize(r io.Reader) (uint16, error)
- type AccessControl
- type AccessType
- type ArticleFormat
- type ArticleLength
- type ArticlesNumber
- type BankID
- type CRCUsage
- type CallerID
- type CheckpointNumber
- type Checkpointing
- type Compression
- type CreationDate
- type CustomerID
- type DataBytesNumber
- type DataCoding
- type DataElementMaxSize
- type Defaulter
- type DiagnosticComplements
- type Diagnostics
- type EndTransferCode
- type FileAccessControl
- type FileAttributes
- type FileLabel
- type FileType
- type Filename
- type FreeText
- type GroupFileID
- type GroupHistoricalAttributes
- type GroupLogicalAttributes
- type GroupPhysicalAttributes
- type KeyLength
- type KeyOffset
- type LastAccess
- type MaximumReservedSpace
- type Message
- type Param
- type ProtocolMonitoringTimeout
- type RecoveredTransfer
- type RecoveryPoint
- type RequestedAttributes
- type Restarting
- type ServerID
- type ServerTime
- type SitMac
- type StorageReservationUnit
- type TransferID
- type TransferPriority
- type Type
- type UseSignature
- type Version
Constants ¶
const ( PasswordMaxSize = 8 AccessControlMaxSize = 16 )
const ( CheckpointingIntervalNoCheckpoints uint16 = 0 CheckpointingIntervalUnlimited uint16 = 0xFFFF CheckpointingWindowCheckpointNotAcknoledged uint8 = 0 )
const ( NeedHistoricalAttributes = 32 << iota NeedPhysicalAttributes NeedLogicalAttributes NoAttributesRequested = 0x00 ExpectMessageInMSG = 0x01 )
const (
BankIDMaxSize = 24
)
const (
CallerIDMaxSize = 24
)
const (
CustomerIDMaxSize = 24
)
const (
DiagnosticComplementMaxLength = 254
)
const (
FileLabelMaxSize = 80
)
const (
FilenameMaxSize = 76
)
const FreeTextMaxSize = 254
const (
ServerIDMaxSize = 24
)
Variables ¶
Functions ¶
Types ¶
type AccessControl ¶
AccessControl carries the password identifying the caller and eventually a new password to replace the existing one.
func (*AccessControl) GetID ¶
func (*AccessControl) GetID() Type
GetID returns the PID of the parameter.
func (*AccessControl) Marshal ¶
func (a *AccessControl) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type AccessType ¶
type AccessType uint8
const ( AccessWrite AccessType = 0x00 AccessRead AccessType = 0x01 AccessReadWrite AccessType = 0x02 )
func (*AccessType) Marshal ¶
func (a *AccessType) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type ArticleFormat ¶
type ArticleFormat uint8
const ( Fixed ArticleFormat = 0x00 Variable ArticleFormat = 0x80 )
func (*ArticleFormat) Default ¶
func (*ArticleFormat) Default() reflect.Value
func (*ArticleFormat) GetID ¶
func (*ArticleFormat) GetID() Type
GetID returns the PID of the parameter.
func (*ArticleFormat) Marshal ¶
func (a *ArticleFormat) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type ArticleLength ¶
type ArticleLength uint16
func (*ArticleLength) GetID ¶
func (*ArticleLength) GetID() Type
GetID returns the PID of the parameter.
func (*ArticleLength) Marshal ¶
func (a *ArticleLength) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type ArticlesNumber ¶
type ArticlesNumber uint32
func (*ArticlesNumber) GetID ¶
func (*ArticlesNumber) GetID() Type
GetID returns the PID of the parameter.
func (*ArticlesNumber) Marshal ¶
func (a *ArticlesNumber) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type BankID ¶
type BankID string
func (*BankID) Marshal ¶
Marshal serializes the parameter in its binary form.
type CRCUsage ¶
type CRCUsage bool
CRCUsage indicates if a polynomial error detection checksum (CRC) is added to each FPDU to check the validity of these messages.
func (*CRCUsage) Default ¶
Default returns the default value of the parameter.
func (*CRCUsage) Marshal ¶
Marshal serializes the parameter in its binary form.
type CallerID ¶
type CallerID string
CallerID represents the caller identification. It must be less than 24 characters.
func (*CallerID) Marshal ¶
Marshal serializes the parameter in its binary form.
type CheckpointNumber ¶
type CheckpointNumber uint32
func (*CheckpointNumber) GetID ¶
func (*CheckpointNumber) GetID() Type
GetID returns the PID of the parameter.
func (*CheckpointNumber) Marshal ¶
func (c *CheckpointNumber) Marshal() ([]byte, error)
type Checkpointing ¶
Checkpointing indicates if checkpoints are used and their frequencies.
func (*Checkpointing) Default ¶
func (*Checkpointing) Default() reflect.Value
func (*Checkpointing) GetID ¶
func (*Checkpointing) GetID() Type
GetID returns the PID of the parameter.
func (*Checkpointing) Marshal ¶
func (c *Checkpointing) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type Compression ¶
type Compression uint8
const ( NoCompression Compression = 0 HorizontalCompression Compression = 1 VerticalCompression Compression = 2 HorizontalAndVerticalCompression Compression = 3 )
func (*Compression) Default ¶
func (*Compression) Default() reflect.Value
func (*Compression) GetID ¶
func (*Compression) GetID() Type
GetID returns the PID of the parameter.
func (*Compression) Marshal ¶
func (c *Compression) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type CreationDate ¶
func (*CreationDate) GetID ¶
func (*CreationDate) GetID() Type
func (*CreationDate) Marshal ¶
func (c *CreationDate) Marshal() ([]byte, error)
type CustomerID ¶
type CustomerID string
func (*CustomerID) GetID ¶
func (*CustomerID) GetID() Type
func (*CustomerID) Marshal ¶
func (c *CustomerID) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type DataBytesNumber ¶
type DataBytesNumber uint64
func (*DataBytesNumber) GetID ¶
func (*DataBytesNumber) GetID() Type
func (*DataBytesNumber) Marshal ¶
func (d *DataBytesNumber) Marshal() ([]byte, error)
type DataCoding ¶
type DataCoding uint8
const ( ASCII DataCoding = 0x00 EBCDIC DataCoding = 0x01 Binary DataCoding = 0x02 )
func (*DataCoding) Default ¶
func (*DataCoding) Default() reflect.Value
func (*DataCoding) Marshal ¶
func (d *DataCoding) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type DataElementMaxSize ¶
type DataElementMaxSize uint16
const (
MinDataMaxSize DataElementMaxSize = 800
)
func (*DataElementMaxSize) GetID ¶
func (*DataElementMaxSize) GetID() Type
func (*DataElementMaxSize) Marshal ¶
func (d *DataElementMaxSize) Marshal() ([]byte, error)
type DiagnosticComplements ¶
type DiagnosticComplements string
func (*DiagnosticComplements) GetID ¶
func (*DiagnosticComplements) GetID() Type
func (*DiagnosticComplements) Marshal ¶
func (d *DiagnosticComplements) Marshal() ([]byte, error)
type Diagnostics ¶
type Diagnostics diagnostics.DiagnosticCode
Diagnostics contains the error type and code, as defined in the PeSIT specifications, Annexe 4.
func (*Diagnostics) GetID ¶
func (*Diagnostics) GetID() Type
GetID returns the PID of the parameter.
func (*Diagnostics) Marshal ¶
func (d *Diagnostics) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
func (*Diagnostics) MarshalDiagnostics ¶
func (d *Diagnostics) MarshalDiagnostics() []byte
type EndTransferCode ¶
type EndTransferCode uint8
const ( Error EndTransferCode = 4 Suspension EndTransferCode = 8 ServerCancel EndTransferCode = 12 CallerCancel EndTransferCode = 16 )
func (*EndTransferCode) GetID ¶
func (*EndTransferCode) GetID() Type
func (*EndTransferCode) Marshal ¶
func (e *EndTransferCode) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type FileAccessControl ¶
type FileAccessControl struct{}
func (*FileAccessControl) GetID ¶
func (*FileAccessControl) GetID() Type
func (*FileAccessControl) Marshal ¶
func (f *FileAccessControl) Marshal() ([]byte, error)
type FileAttributes ¶
type FileAttributes uint8
const ( Sequential FileAttributes = 0 Relative FileAttributes = 1 Indexed FileAttributes = 2 )
func (*FileAttributes) Default ¶
func (*FileAttributes) Default() reflect.Value
func (*FileAttributes) GetID ¶
func (*FileAttributes) GetID() Type
func (*FileAttributes) Marshal ¶
func (f *FileAttributes) Marshal() ([]byte, error)
type FileType ¶
type FileType uint16
func (*FileType) Marshal ¶
Marshal serializes the parameter in its binary form.
type Filename ¶
type Filename string
func (*Filename) Marshal ¶
Marshal serializes the parameter in its binary form.
type GroupFileID ¶
type GroupFileID struct {
CallerID CallerID `NonSIT:"optional"`
ServerID ServerID `NonSIT:"optional"`
FileType FileType `NonSIT:"mandatory"`
Filename Filename `NonSIT:"mandatory"`
}
func (*GroupFileID) GetID ¶
func (*GroupFileID) GetID() Type
func (*GroupFileID) Marshal ¶
func (*GroupFileID) Marshal() ([]byte, error)
type GroupHistoricalAttributes ¶
type GroupHistoricalAttributes struct {
CreationDate CreationDate `NonSIT:"mandatory"`
LastAccess LastAccess `NonSIT:"optional"`
}
func (*GroupHistoricalAttributes) GetID ¶
func (*GroupHistoricalAttributes) GetID() Type
func (*GroupHistoricalAttributes) Marshal ¶
func (*GroupHistoricalAttributes) Marshal() ([]byte, error)
type GroupLogicalAttributes ¶
type GroupLogicalAttributes struct {
ArticleFormat ArticleFormat `NonSIT:"optional"`
ArticleLength ArticleLength `NonSIT:"mandatory"`
FileAttributes FileAttributes `NonSIT:"optional"`
//nolint:dupword // word is name then type
// UseSignature UseSignature `NonSIT:"optional"`
// SitMac SitMac `NonSIT:"optional"`
//nolint:dupword // word is name then type
FileLabel FileLabel `NonSIT:"optional"`
}
func (*GroupLogicalAttributes) GetID ¶
func (*GroupLogicalAttributes) GetID() Type
func (*GroupLogicalAttributes) Marshal ¶
func (*GroupLogicalAttributes) Marshal() ([]byte, error)
type GroupPhysicalAttributes ¶
type GroupPhysicalAttributes struct {
StorageReservationUnit StorageReservationUnit `NonSIT:"optional"`
MaximumReservedSpace MaximumReservedSpace `NonSIT:"mandatory"`
}
func (*GroupPhysicalAttributes) GetID ¶
func (*GroupPhysicalAttributes) GetID() Type
func (*GroupPhysicalAttributes) Marshal ¶
func (*GroupPhysicalAttributes) Marshal() ([]byte, error)
type LastAccess ¶
func (*LastAccess) GetID ¶
func (*LastAccess) GetID() Type
func (*LastAccess) Marshal ¶
func (l *LastAccess) Marshal() ([]byte, error)
type MaximumReservedSpace ¶
type MaximumReservedSpace uint32
func (*MaximumReservedSpace) GetID ¶
func (*MaximumReservedSpace) GetID() Type
func (*MaximumReservedSpace) Marshal ¶
func (m *MaximumReservedSpace) Marshal() ([]byte, error)
type Message ¶
type Message string
func (*Message) Marshal ¶
Marshal serializes the parameter in its binary form.
type Param ¶
type ProtocolMonitoringTimeout ¶
type ProtocolMonitoringTimeout uint16
func (*ProtocolMonitoringTimeout) GetID ¶
func (*ProtocolMonitoringTimeout) GetID() Type
func (*ProtocolMonitoringTimeout) Marshal ¶
func (p *ProtocolMonitoringTimeout) Marshal() ([]byte, error)
type RecoveredTransfer ¶
type RecoveredTransfer bool
func (*RecoveredTransfer) Default ¶
func (*RecoveredTransfer) Default() reflect.Value
func (*RecoveredTransfer) GetID ¶
func (*RecoveredTransfer) GetID() Type
GetID returns the PID of the parameter.
func (*RecoveredTransfer) Marshal ¶
func (r *RecoveredTransfer) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type RecoveryPoint ¶
type RecoveryPoint uint32
func (*RecoveryPoint) GetID ¶
func (*RecoveryPoint) GetID() Type
GetID returns the PID of the parameter.
func (*RecoveryPoint) Marshal ¶
func (r *RecoveryPoint) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type RequestedAttributes ¶
type RequestedAttributes uint8
func (*RequestedAttributes) Default ¶
func (*RequestedAttributes) Default() reflect.Value
func (*RequestedAttributes) GetID ¶
func (*RequestedAttributes) GetID() Type
GetID returns the PID of the parameter.
func (*RequestedAttributes) Marshal ¶
func (r *RequestedAttributes) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type Restarting ¶
type Restarting bool
func (*Restarting) Default ¶
func (*Restarting) Default() reflect.Value
func (*Restarting) Marshal ¶
func (r *Restarting) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type ServerID ¶
type ServerID string
ServerID represents the server identification. It must be less than 24 characters.
func (*ServerID) Marshal ¶
Marshal serializes the parameter in its binary form.
type ServerTime ¶
type ServerTime struct{}
func (*ServerTime) GetID ¶
func (*ServerTime) GetID() Type
func (*ServerTime) Marshal ¶
func (s *ServerTime) Marshal() ([]byte, error)
type StorageReservationUnit ¶
type StorageReservationUnit uint8
const ( KBytes StorageReservationUnit = 0 Articles StorageReservationUnit = 1 )
func (*StorageReservationUnit) Default ¶
func (*StorageReservationUnit) Default() reflect.Value
func (*StorageReservationUnit) GetID ¶
func (*StorageReservationUnit) GetID() Type
func (*StorageReservationUnit) Marshal ¶
func (s *StorageReservationUnit) Marshal() ([]byte, error)
type TransferID ¶
type TransferID uint32
func (*TransferID) Marshal ¶
func (t *TransferID) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type TransferPriority ¶
type TransferPriority uint8
const ( Urgent TransferPriority = 0 SemiUrgent TransferPriority = 1 LeastUrgent TransferPriority = 2 )
func (*TransferPriority) GetID ¶
func (*TransferPriority) GetID() Type
GetID returns the PID of the parameter.
func (*TransferPriority) Marshal ¶
func (t *TransferPriority) Marshal() ([]byte, error)
Marshal serializes the parameter in its binary form.
type Type ¶
type Type uint8
Type is the type of the parameter. It is an integer.
const ( TypeCRCUsage Type = 0x01 TypeDiagnostics Type = 0x02 TypeCallerID Type = 0x03 TypeServerID Type = 0x04 TypeAccessControl Type = 0x05 TypeVersion Type = 0x06 TypeCheckpointing Type = 0x07 TypeGroupFileID Type = 0x09 TypeFileType Type = 0x0B TypeFilename Type = 0x0C TypeTransferID Type = 0x0D TypeRequestedAttributes Type = 0x0E TypeRecoveredTransfer Type = 0x0F TypeDataCoding Type = 0x10 TypeTransferPriority Type = 0x11 TypeRecoveryPoint Type = 0x12 TypeEndTransferCode Type = 0x13 TypeCheckpointNumber Type = 0x14 TypeCompression Type = 0x15 TypeAccessType Type = 0x16 TypeRestarting Type = 0x17 TypeDataElementMaxSize Type = 0x19 TypeProtocolMonitoringTimeOut Type = 0x1A TypeDataBytesNumber Type = 0x1B TypeArticlesNumber Type = 0x1C TypeDiagnosticComplements Type = 0x1D TypeGroupLogicalAttributes Type = 0x1E TypeArticleFormat Type = 0x1F TypeArticleLength Type = 0x20 TypeFileAttributes Type = 0x21 TypeUseSignature Type = 0x22 TypeSitMac Type = 0x24 TypeFileLabel Type = 0x25 TypeKeyLength Type = 0x26 TypeKeyOffset Type = 0x27 TypeGroupPhysicalAttributes Type = 0x28 TypeStorageReservationUnit Type = 0x29 TypeMaximumReservedSpace Type = 0x2A TypeGroupHistoricalAttributes Type = 0x32 TypeCreationDate Type = 0x33 TypeLastAccess Type = 0x34 TypeCustomerID Type = 0x3D TypeBankID Type = 0x3E TypeFileAccessControl Type = 0x3F TypeServerTime Type = 0x40 TypeMessage Type = 0x5B TypeFreeText Type = 0x63 )
type UseSignature ¶
type UseSignature bool
func (*UseSignature) Default ¶
func (*UseSignature) Default() reflect.Value
func (*UseSignature) GetID ¶
func (*UseSignature) GetID() Type
func (*UseSignature) Marshal ¶
func (u *UseSignature) Marshal() ([]byte, error)
Source Files
¶
- access_control.go
- access_type.go
- article_format.go
- articles_length.go
- articles_number.go
- bankID.go
- caller_id.go
- checkpoint_number.go
- checkpointing.go
- compression.go
- crc_usage.go
- creation_date.go
- customerID.go
- data_bytes_number.go
- data_coding.go
- data_max_size.go
- diagnostic_complements.go
- diagnostics.go
- doc.go
- end_transfer_code.go
- file_access_control.go
- file_attributes.go
- file_label.go
- file_type.go
- filename.go
- free_text.go
- group_file_ID.go
- group_historical_attributes.go
- group_logical_attributes.go
- group_physical_attributes.go
- key_length.go
- key_offset.go
- last_access.go
- maximum_reserved_space.go
- message.go
- param.go
- protocol_monitoring_timeout.go
- recovered_transfer.go
- recovery_point.go
- requested_attributes.go
- restarting.go
- server_id.go
- server_time.go
- sit_mac.go
- storage_reservation_unit.go
- transfer_id.go
- transfer_priority.go
- type_string.go
- types.go
- use_signature.go
- utils.go
- version.go