Documentation
¶
Overview ¶
Package ccid is the reader driver for USB CCID contactless readers.
It reaches a reader through the system's PC/SC service where there is one, and by talking CCID over USB itself where there is not. Either way it uses only the standard PC/SC storage card commands, which the reader's firmware carries out, so it needs no knowledge of any particular reader.
Index ¶
- Constants
- type Reader
- func (r *Reader) CancelWrite()
- func (*Reader) Capabilities() []readers.Capability
- func (r *Reader) Close() error
- func (r *Reader) Connected() bool
- func (r *Reader) Detect(connected []string) string
- func (*Reader) IDs() []string
- func (r *Reader) Info() string
- func (*Reader) Metadata() readers.DriverMetadata
- func (*Reader) OnMediaChange(*models.ActiveMedia) error
- func (r *Reader) Open(device config.ReadersConnect, iq chan<- readers.Scan, opts readers.OpenOpts) error
- func (r *Reader) Path() string
- func (r *Reader) ReaderID() string
- func (r *Reader) Write(text string) (*tokens.Token, error)
- func (r *Reader) WriteTarget(ctx context.Context, text string, opts readers.WriteOptions) (*tokens.Token, error)
Constants ¶
const (
// DriverID is the driver's config and API name.
DriverID = "ccid"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is one CCID reader, or a probe for one during auto-detect.
func (*Reader) CancelWrite ¶
func (r *Reader) CancelWrite()
func (*Reader) Capabilities ¶
func (*Reader) Capabilities() []readers.Capability
func (*Reader) Detect ¶
Detect returns a reader to attach, or an empty string.
A known contactless reader is returned as soon as it is plugged in. Any other smart card reader is returned only while it holds a card, and Open then decides from the card whether it is an NFC reader at all. A laptop's card slot or a security key is never attached.
func (*Reader) IDs ¶
IDs includes the names of the PC/SC ACR122 driver this one replaced, so connection entries written for it keep working.
func (*Reader) Metadata ¶
func (*Reader) Metadata() readers.DriverMetadata
func (*Reader) OnMediaChange ¶
func (*Reader) OnMediaChange(*models.ActiveMedia) error