Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { Init() error AddPassport(series uint16, number uint32) (bool, error) CheckPassport(series uint16, number uint32) (bool, error) // ImportData calls the engins standard import procedures if exists ImportData(fileName string) error }
Engine represents interfaces of memory storage engine
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage - implementation storage of passport data
func (*Storage) CheckStorage ¶
func (ms *Storage) CheckStorage(cfg *config.Configuration) (bool, error)
CheckStorage - self test memory storage. Usually after update procedure the function returns true if everythig is correct
func (*Storage) IsPassportInList ¶
IsPassportInList - check is the passport number in the list
func (*Storage) StartStorage ¶
func (ms *Storage) StartStorage(cfg *config.Configuration) error
StartStorage loads data from exising file if file doesnt exists then dowload it via UpdateStorage
func (*Storage) UpdateStorage ¶
func (ms *Storage) UpdateStorage(cfg *config.Configuration) error
UpdateStorage implements regular update passport data with simple scheduling
Click to show internal directories.
Click to hide internal directories.