params

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: MIT Imports: 11 Imported by: 0

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

View Source
const (
	PasswordMaxSize      = 8
	AccessControlMaxSize = 16
)
View Source
const (
	CheckpointingIntervalNoCheckpoints          uint16 = 0
	CheckpointingIntervalUnlimited              uint16 = 0xFFFF
	CheckpointingWindowCheckpointNotAcknoledged uint8  = 0
)
View Source
const (
	NeedHistoricalAttributes = 32 << iota
	NeedPhysicalAttributes
	NeedLogicalAttributes
	NoAttributesRequested = 0x00
	ExpectMessageInMSG    = 0x01
)
View Source
const (
	BankIDMaxSize = 24
)
View Source
const (
	CallerIDMaxSize = 24
)
View Source
const (
	CustomerIDMaxSize = 24
)
View Source
const (
	DiagnosticComplementMaxLength = 254
)
View Source
const (
	FileLabelMaxSize = 80
)
View Source
const (
	FilenameMaxSize = 76
)
View Source
const FreeTextMaxSize = 254
View Source
const (
	ServerIDMaxSize = 24
)

Variables

View Source
var (
	ErrNotEnoughData error = errors.New("cannot read param: not enough data")
)

Functions

func IsGroup

func IsGroup(t Type) bool

func ReadSize

func ReadSize(r io.Reader) (uint16, error)

Types

type AccessControl

type AccessControl struct {
	Password    string
	NewPassword string
}

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.

func (*AccessControl) ReadParam

func (a *AccessControl) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from a io.Reader.

type AccessType

type AccessType uint8
const (
	AccessWrite     AccessType = 0x00
	AccessRead      AccessType = 0x01
	AccessReadWrite AccessType = 0x02
)

func (*AccessType) GetID

func (*AccessType) GetID() Type

GetID returns the PID of the parameter.

func (*AccessType) Marshal

func (a *AccessType) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*AccessType) ReadParam

func (a *AccessType) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*ArticleFormat) ReadParam

func (a *ArticleFormat) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*ArticleLength) ReadParam

func (a *ArticleLength) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*ArticlesNumber) ReadParam

func (a *ArticlesNumber) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type BankID

type BankID string

func (*BankID) GetID

func (*BankID) GetID() Type

func (*BankID) IsOptional

func (*BankID) IsOptional() bool

func (*BankID) Marshal

func (b *BankID) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*BankID) ReadParam

func (b *BankID) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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

func (*CRCUsage) Default() reflect.Value

Default returns the default value of the parameter.

func (*CRCUsage) GetID

func (*CRCUsage) GetID() Type

GetID returns the PID of the parameter.

func (*CRCUsage) Marshal

func (c *CRCUsage) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*CRCUsage) ReadParam

func (c *CRCUsage) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type CallerID

type CallerID string

CallerID represents the caller identification. It must be less than 24 characters.

func (*CallerID) GetID

func (*CallerID) GetID() Type

GetID returns the PID of the parameter.

func (*CallerID) Marshal

func (c *CallerID) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*CallerID) ReadParam

func (c *CallerID) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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)

func (*CheckpointNumber) ReadParam

func (c *CheckpointNumber) ReadParam(r io.Reader, size int) error

type Checkpointing

type Checkpointing struct {
	Interval uint16
	Window   uint8
}

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.

func (*Checkpointing) ReadParam

func (c *Checkpointing) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*Compression) ReadParam

func (c *Compression) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type CreationDate

type CreationDate time.Time

func (*CreationDate) GetID

func (*CreationDate) GetID() Type

func (*CreationDate) Marshal

func (c *CreationDate) Marshal() ([]byte, error)

func (*CreationDate) ReadParam

func (c *CreationDate) ReadParam(r io.Reader, size int) 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.

func (*CustomerID) ReadParam

func (c *CustomerID) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type DataBytesNumber

type DataBytesNumber uint64

func (*DataBytesNumber) GetID

func (*DataBytesNumber) GetID() Type

func (*DataBytesNumber) Marshal

func (d *DataBytesNumber) Marshal() ([]byte, error)

func (*DataBytesNumber) ReadParam

func (d *DataBytesNumber) ReadParam(r io.Reader, size int) 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) GetID

func (*DataCoding) GetID() Type

GetID returns the PID of the parameter.

func (*DataCoding) Marshal

func (d *DataCoding) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*DataCoding) ReadParam

func (d *DataCoding) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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)

func (*DataElementMaxSize) ReadParam

func (d *DataElementMaxSize) ReadParam(r io.Reader, size int) error

type Defaulter

type Defaulter interface {
	Default() reflect.Value
}

type DiagnosticComplements

type DiagnosticComplements string

func (*DiagnosticComplements) GetID

func (*DiagnosticComplements) GetID() Type

func (*DiagnosticComplements) Marshal

func (d *DiagnosticComplements) Marshal() ([]byte, error)

func (*DiagnosticComplements) ReadParam

func (d *DiagnosticComplements) ReadParam(r io.Reader, size int) 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

func (*Diagnostics) ReadParam

func (d *Diagnostics) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

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.

func (*EndTransferCode) ReadParam

func (e *EndTransferCode) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type FileAccessControl

type FileAccessControl struct{}

func (*FileAccessControl) GetID

func (*FileAccessControl) GetID() Type

func (*FileAccessControl) Marshal

func (f *FileAccessControl) Marshal() ([]byte, error)

func (*FileAccessControl) ReadParam

func (f *FileAccessControl) ReadParam(r io.Reader, size int) 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)

func (*FileAttributes) ReadParam

func (f *FileAttributes) ReadParam(r io.Reader, size int) error

type FileLabel

type FileLabel string

func (*FileLabel) GetID

func (*FileLabel) GetID() Type

func (*FileLabel) IsOptional

func (*FileLabel) IsOptional() bool

func (*FileLabel) Marshal

func (f *FileLabel) Marshal() ([]byte, error)

func (*FileLabel) ReadParam

func (f *FileLabel) ReadParam(r io.Reader, size int) error

type FileType

type FileType uint16
const (
	DoNothing FileType = 0x0000
	SendMsg   FileType = 0xFFFF
	RecvMsg   FileType = 0xFFFE
)

func (*FileType) GetID

func (*FileType) GetID() Type

GetID returns the PID of the parameter.

func (*FileType) Marshal

func (f *FileType) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*FileType) ReadParam

func (f *FileType) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type Filename

type Filename string

func (*Filename) GetID

func (*Filename) GetID() Type

GetID returns the PID of the parameter.

func (*Filename) Marshal

func (f *Filename) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*Filename) ReadParam

func (f *Filename) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type FreeText

type FreeText string

func (*FreeText) GetID

func (*FreeText) GetID() Type

func (*FreeText) Marshal

func (f *FreeText) Marshal() ([]byte, error)

func (*FreeText) ReadParam

func (f *FreeText) ReadParam(r io.Reader, size int) error

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)

func (*GroupFileID) ReadParam

func (*GroupFileID) ReadParam(io.Reader, int) error

type GroupHistoricalAttributes

type GroupHistoricalAttributes struct {
	CreationDate CreationDate `NonSIT:"mandatory"`
	LastAccess   LastAccess   `NonSIT:"optional"`
}

func (*GroupHistoricalAttributes) GetID

func (*GroupHistoricalAttributes) Marshal

func (*GroupHistoricalAttributes) Marshal() ([]byte, error)

func (*GroupHistoricalAttributes) ReadParam

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)

func (*GroupLogicalAttributes) ReadParam

func (*GroupLogicalAttributes) ReadParam(io.Reader, int) 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)

func (*GroupPhysicalAttributes) ReadParam

func (*GroupPhysicalAttributes) ReadParam(io.Reader, int) error

type KeyLength

type KeyLength uint16

func (*KeyLength) GetID

func (*KeyLength) GetID() Type

func (*KeyLength) Marshal

func (k *KeyLength) Marshal() ([]byte, error)

func (*KeyLength) ReadParam

func (k *KeyLength) ReadParam(r io.Reader, size int) error

type KeyOffset

type KeyOffset uint16

func (*KeyOffset) GetID

func (*KeyOffset) GetID() Type

func (*KeyOffset) IsOptional

func (*KeyOffset) IsOptional() bool

func (*KeyOffset) Marshal

func (k *KeyOffset) Marshal() ([]byte, error)

func (*KeyOffset) ReadParam

func (k *KeyOffset) ReadParam(r io.Reader, size int) error

type LastAccess

type LastAccess time.Time

func (*LastAccess) GetID

func (*LastAccess) GetID() Type

func (*LastAccess) Marshal

func (l *LastAccess) Marshal() ([]byte, error)

func (*LastAccess) ReadParam

func (l *LastAccess) ReadParam(r io.Reader, size int) error

type MaximumReservedSpace

type MaximumReservedSpace uint32

func (*MaximumReservedSpace) GetID

func (*MaximumReservedSpace) GetID() Type

func (*MaximumReservedSpace) Marshal

func (m *MaximumReservedSpace) Marshal() ([]byte, error)

func (*MaximumReservedSpace) ReadParam

func (m *MaximumReservedSpace) ReadParam(r io.Reader, size int) error

type Message

type Message string

func (*Message) GetID

func (*Message) GetID() Type

func (*Message) Marshal

func (m *Message) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*Message) ReadParam

func (m *Message) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type Param

type Param interface {
	GetID() Type
	Marshal() ([]byte, error)
	ReadParam(r io.Reader, size int) error
}

type ProtocolMonitoringTimeout

type ProtocolMonitoringTimeout uint16

func (*ProtocolMonitoringTimeout) GetID

func (*ProtocolMonitoringTimeout) Marshal

func (p *ProtocolMonitoringTimeout) Marshal() ([]byte, error)

func (*ProtocolMonitoringTimeout) ReadParam

func (p *ProtocolMonitoringTimeout) ReadParam(r io.Reader, size int) 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.

func (*RecoveredTransfer) ReadParam

func (r *RecoveredTransfer) ReadParam(rd io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*RecoveryPoint) ReadParam

func (r *RecoveryPoint) ReadParam(rd io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*RequestedAttributes) ReadParam

func (r *RequestedAttributes) ReadParam(rd io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type Restarting

type Restarting bool

func (*Restarting) Default

func (*Restarting) Default() reflect.Value

func (*Restarting) GetID

func (*Restarting) GetID() Type

GetID returns the PID of the parameter.

func (*Restarting) Marshal

func (r *Restarting) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*Restarting) ReadParam

func (r *Restarting) ReadParam(rd io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type ServerID

type ServerID string

ServerID represents the server identification. It must be less than 24 characters.

func (*ServerID) GetID

func (*ServerID) GetID() Type

GetID returns the PID of the parameter.

func (*ServerID) Marshal

func (s *ServerID) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*ServerID) ReadParam

func (s *ServerID) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

type ServerTime

type ServerTime struct{}

func (*ServerTime) GetID

func (*ServerTime) GetID() Type

func (*ServerTime) Marshal

func (s *ServerTime) Marshal() ([]byte, error)

func (*ServerTime) ReadParam

func (s *ServerTime) ReadParam(r io.Reader, size int) error

type SitMac

type SitMac uint64

func (*SitMac) GetID

func (s *SitMac) GetID() Type

func (*SitMac) Marshal

func (s *SitMac) Marshal() ([]byte, error)

func (*SitMac) ReadParam

func (s *SitMac) ReadParam(r io.Reader, size int) error

type StorageReservationUnit

type StorageReservationUnit uint8
const (
	KBytes   StorageReservationUnit = 0
	Articles StorageReservationUnit = 1
)

func (*StorageReservationUnit) Default

func (*StorageReservationUnit) GetID

func (*StorageReservationUnit) GetID() Type

func (*StorageReservationUnit) Marshal

func (s *StorageReservationUnit) Marshal() ([]byte, error)

func (*StorageReservationUnit) ReadParam

func (s *StorageReservationUnit) ReadParam(r io.Reader, size int) error

type TransferID

type TransferID uint32

func (*TransferID) GetID

func (*TransferID) GetID() Type

GetID returns the PID of the parameter.

func (*TransferID) Marshal

func (t *TransferID) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*TransferID) ReadParam

func (t *TransferID) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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.

func (*TransferPriority) ReadParam

func (t *TransferPriority) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from 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
)

func ReadType

func ReadType(r io.Reader) (Type, error)

func (Type) String

func (i Type) String() string

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)

func (*UseSignature) ReadParam

func (u *UseSignature) ReadParam(r io.Reader, size int) error

type Version

type Version uint8

Version carries the version of PESIT used.

const (
	VersionD Version = 1
	VersionE Version = 2
)

func (*Version) GetID

func (*Version) GetID() Type

GetID returns the PID of the parameter.

func (*Version) Marshal

func (v *Version) Marshal() ([]byte, error)

Marshal serializes the parameter in its binary form.

func (*Version) ReadParam

func (v *Version) ReadParam(r io.Reader, size int) error

ReadParam populates the parameter values from its binary form.

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

Jump to

Keyboard shortcuts

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