smartcardemulation

package
v0.157.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package smartcardemulation provides the Chrome DevTools Protocol commands, types, and events for the SmartCardEmulation domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable                       = "SmartCardEmulation.enable"
	CommandDisable                      = "SmartCardEmulation.disable"
	CommandReportEstablishContextResult = "SmartCardEmulation.reportEstablishContextResult"
	CommandReportReleaseContextResult   = "SmartCardEmulation.reportReleaseContextResult"
	CommandReportListReadersResult      = "SmartCardEmulation.reportListReadersResult"
	CommandReportGetStatusChangeResult  = "SmartCardEmulation.reportGetStatusChangeResult"
	CommandReportBeginTransactionResult = "SmartCardEmulation.reportBeginTransactionResult"
	CommandReportPlainResult            = "SmartCardEmulation.reportPlainResult"
	CommandReportConnectResult          = "SmartCardEmulation.reportConnectResult"
	CommandReportDataResult             = "SmartCardEmulation.reportDataResult"
	CommandReportStatusResult           = "SmartCardEmulation.reportStatusResult"
	CommandReportError                  = "SmartCardEmulation.reportError"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionState

type ConnectionState string

ConnectionState maps to |SCARD_*| connection state values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ConnectionState

const (
	ConnectionStateAbsent     ConnectionState = "absent"
	ConnectionStatePresent    ConnectionState = "present"
	ConnectionStateSwallowed  ConnectionState = "swallowed"
	ConnectionStatePowered    ConnectionState = "powered"
	ConnectionStateNegotiable ConnectionState = "negotiable"
	ConnectionStateSpecific   ConnectionState = "specific"
)

ConnectionState values.

func (ConnectionState) String

func (t ConnectionState) String() string

String returns the ConnectionState as string value.

func (*ConnectionState) UnmarshalJSON

func (t *ConnectionState) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type DisableParams

type DisableParams struct{}

DisableParams disables the |SmartCardEmulation| domain.

func Disable

func Disable() *DisableParams

Disable disables the |SmartCardEmulation| domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.disable against the provided context.

type Disposition

type Disposition string

Disposition indicates what the reader should do with the card.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-Disposition

const (
	DispositionLeaveCard   Disposition = "leave-card"
	DispositionResetCard   Disposition = "reset-card"
	DispositionUnpowerCard Disposition = "unpower-card"
	DispositionEjectCard   Disposition = "eject-card"
)

Disposition values.

func (Disposition) String

func (t Disposition) String() string

String returns the Disposition as string value.

func (*Disposition) UnmarshalJSON

func (t *Disposition) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type EnableParams

type EnableParams struct{}

EnableParams enables the |SmartCardEmulation| domain.

func Enable

func Enable() *EnableParams

Enable enables the |SmartCardEmulation| domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-enable

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.enable against the provided context.

type EventBeginTransactionRequested

type EventBeginTransactionRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

EventBeginTransactionRequested fired when |SCardBeginTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-beginTransactionRequested

type EventCancelRequested

type EventCancelRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventCancelRequested fired when |SCardCancel| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-cancelRequested

type EventConnectRequested

type EventConnectRequested struct {
	RequestID          string       `json:"requestId"`
	ContextID          int64        `json:"contextId"`
	Reader             string       `json:"reader"`
	ShareMode          ShareMode    `json:"shareMode"`
	PreferredProtocols *ProtocolSet `json:"preferredProtocols"`
}

EventConnectRequested fired when |SCardConnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-connectRequested

type EventControlRequested

type EventControlRequested struct {
	RequestID   string `json:"requestId"`
	Handle      int64  `json:"handle"`
	ControlCode int64  `json:"controlCode"`
	Data        string `json:"data"`
}

EventControlRequested fired when |SCardControl| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-controlRequested

type EventDisconnectRequested

type EventDisconnectRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}

EventDisconnectRequested fired when |SCardDisconnect| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-disconnectRequested

type EventEndTransactionRequested

type EventEndTransactionRequested struct {
	RequestID   string      `json:"requestId"`
	Handle      int64       `json:"handle"`
	Disposition Disposition `json:"disposition"`
}

EventEndTransactionRequested fired when |SCardEndTransaction| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-endTransactionRequested

type EventGetAttribRequested

type EventGetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
}

EventGetAttribRequested fired when |SCardGetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getAttribRequested

type EventGetStatusChangeRequested

type EventGetStatusChangeRequested struct {
	RequestID    string           `json:"requestId"`
	ContextID    int64            `json:"contextId"`
	ReaderStates []*ReaderStateIn `json:"readerStates"`
	Timeout      int64            `json:"timeout,omitempty,omitzero"` // in milliseconds, if absent, it means "infinite"
}

EventGetStatusChangeRequested fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-getStatusChangeRequested

type EventListReadersRequested

type EventListReadersRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventListReadersRequested fired when |SCardListReaders| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-listReadersRequested

type EventReleaseContextRequested

type EventReleaseContextRequested struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

EventReleaseContextRequested fired when |SCardReleaseContext| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-releaseContextRequested

type EventSetAttribRequested

type EventSetAttribRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
	AttribID  int64  `json:"attribId"`
	Data      string `json:"data"`
}

EventSetAttribRequested fired when |SCardSetAttrib| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-setAttribRequested

type EventStatusRequested

type EventStatusRequested struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

EventStatusRequested fired when |SCardStatus| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-statusRequested

type EventTransmitRequested

type EventTransmitRequested struct {
	RequestID string   `json:"requestId"`
	Handle    int64    `json:"handle"`
	Data      string   `json:"data"`
	Protocol  Protocol `json:"protocol,omitempty,omitzero"`
}

EventTransmitRequested fired when |SCardTransmit| is called. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#event-transmitRequested

type Protocol

type Protocol string

Protocol maps to the |SCARD_PROTOCOL_*| values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-Protocol

const (
	ProtocolT0  Protocol = "t0"
	ProtocolT1  Protocol = "t1"
	ProtocolRaw Protocol = "raw"
)

Protocol values.

func (Protocol) String

func (t Protocol) String() string

String returns the Protocol as string value.

func (*Protocol) UnmarshalJSON

func (t *Protocol) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type ProtocolSet

type ProtocolSet struct {
	T0  bool `json:"t0"`
	T1  bool `json:"t1"`
	Raw bool `json:"raw"`
}

ProtocolSet maps to the |SCARD_PROTOCOL_*| flags.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ProtocolSet

type ReaderStateFlags

type ReaderStateFlags struct {
	Unaware     bool `json:"unaware"`
	Ignore      bool `json:"ignore"`
	Changed     bool `json:"changed"`
	Unknown     bool `json:"unknown"`
	Unavailable bool `json:"unavailable"`
	Empty       bool `json:"empty"`
	Present     bool `json:"present"`
	Exclusive   bool `json:"exclusive"`
	Inuse       bool `json:"inuse"`
	Mute        bool `json:"mute"`
	Unpowered   bool `json:"unpowered"`
}

ReaderStateFlags maps to the |SCARD_STATE_*| flags.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateFlags

type ReaderStateIn

type ReaderStateIn struct {
	Reader                string            `json:"reader"`
	CurrentState          *ReaderStateFlags `json:"currentState"`
	CurrentInsertionCount int64             `json:"currentInsertionCount"`
}

ReaderStateIn [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateIn

type ReaderStateOut

type ReaderStateOut struct {
	Reader     string            `json:"reader"`
	EventState *ReaderStateFlags `json:"eventState"`
	EventCount int64             `json:"eventCount"`
	Atr        string            `json:"atr"`
}

ReaderStateOut [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ReaderStateOut

type ReportBeginTransactionResultParams

type ReportBeginTransactionResultParams struct {
	RequestID string `json:"requestId"`
	Handle    int64  `json:"handle"`
}

ReportBeginTransactionResultParams reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

func ReportBeginTransactionResult

func ReportBeginTransactionResult(requestID string, handle int64) *ReportBeginTransactionResultParams

ReportBeginTransactionResult reports the result of a |SCardBeginTransaction| call. On success, this creates a new transaction object. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportBeginTransactionResult

parameters:

requestID
handle

func (*ReportBeginTransactionResultParams) Do

Do executes SmartCardEmulation.reportBeginTransactionResult against the provided context.

type ReportConnectResultParams

type ReportConnectResultParams struct {
	RequestID      string   `json:"requestId"`
	Handle         int64    `json:"handle"`
	ActiveProtocol Protocol `json:"activeProtocol,omitempty,omitzero"`
}

ReportConnectResultParams reports the successful result of a |SCardConnect| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta.

func (*ReportConnectResultParams) Do

Do executes SmartCardEmulation.reportConnectResult against the provided context.

func (ReportConnectResultParams) WithActiveProtocol

func (p ReportConnectResultParams) WithActiveProtocol(activeProtocol Protocol) *ReportConnectResultParams

WithActiveProtocol [no description].

type ReportDataResultParams

type ReportDataResultParams struct {
	RequestID string `json:"requestId"`
	Data      string `json:"data"`
}

ReportDataResultParams reports the successful result of a call that sends back data on success. Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|. This maps to: 1. SCardTransmit PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit 2. SCardControl PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol 3. SCardGetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib.

func (*ReportDataResultParams) Do

func (p *ReportDataResultParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.reportDataResult against the provided context.

type ReportErrorParams

type ReportErrorParams struct {
	RequestID  string     `json:"requestId"`
	ResultCode ResultCode `json:"resultCode"`
}

ReportErrorParams reports an error result for the given request.

func ReportError

func ReportError(requestID string, resultCode ResultCode) *ReportErrorParams

ReportError reports an error result for the given request.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportError

parameters:

requestID
resultCode

func (*ReportErrorParams) Do

func (p *ReportErrorParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.reportError against the provided context.

type ReportEstablishContextResultParams

type ReportEstablishContextResultParams struct {
	RequestID string `json:"requestId"`
	ContextID int64  `json:"contextId"`
}

ReportEstablishContextResultParams reports the successful result of a |SCardEstablishContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext.

func ReportEstablishContextResult

func ReportEstablishContextResult(requestID string, contextID int64) *ReportEstablishContextResultParams

ReportEstablishContextResult reports the successful result of a |SCardEstablishContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportEstablishContextResult

parameters:

requestID
contextID

func (*ReportEstablishContextResultParams) Do

Do executes SmartCardEmulation.reportEstablishContextResult against the provided context.

type ReportGetStatusChangeResultParams

type ReportGetStatusChangeResultParams struct {
	RequestID    string            `json:"requestId"`
	ReaderStates []*ReaderStateOut `json:"readerStates"`
}

ReportGetStatusChangeResultParams reports the successful result of a |SCardGetStatusChange| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

func ReportGetStatusChangeResult

func ReportGetStatusChangeResult(requestID string, readerStates []*ReaderStateOut) *ReportGetStatusChangeResultParams

ReportGetStatusChangeResult reports the successful result of a |SCardGetStatusChange| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportGetStatusChangeResult

parameters:

requestID
readerStates

func (*ReportGetStatusChangeResultParams) Do

Do executes SmartCardEmulation.reportGetStatusChangeResult against the provided context.

type ReportListReadersResultParams

type ReportListReadersResultParams struct {
	RequestID string   `json:"requestId"`
	Readers   []string `json:"readers"`
}

ReportListReadersResultParams reports the successful result of a |SCardListReaders| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa.

func (*ReportListReadersResultParams) Do

Do executes SmartCardEmulation.reportListReadersResult against the provided context.

type ReportPlainResultParams

type ReportPlainResultParams struct {
	RequestID string `json:"requestId"`
}

ReportPlainResultParams reports the successful result of a call that returns only a result code. Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|. This maps to: 1. SCardCancel PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel 2. SCardDisconnect PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect 3. SCardSetAttrib PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib 4. SCardEndTransaction PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction.

func (*ReportPlainResultParams) Do

func (p *ReportPlainResultParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.reportPlainResult against the provided context.

type ReportReleaseContextResultParams

type ReportReleaseContextResultParams struct {
	RequestID string `json:"requestId"`
}

ReportReleaseContextResultParams reports the successful result of a |SCardReleaseContext| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext.

func (*ReportReleaseContextResultParams) Do

Do executes SmartCardEmulation.reportReleaseContextResult against the provided context.

type ReportStatusResultParams

type ReportStatusResultParams struct {
	RequestID  string          `json:"requestId"`
	ReaderName string          `json:"readerName"`
	State      ConnectionState `json:"state"`
	Atr        string          `json:"atr"`
	Protocol   Protocol        `json:"protocol,omitempty,omitzero"`
}

ReportStatusResultParams reports the successful result of a |SCardStatus| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

func ReportStatusResult

func ReportStatusResult(requestID string, readerName string, state ConnectionState, atr string) *ReportStatusResultParams

ReportStatusResult reports the successful result of a |SCardStatus| call. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#method-reportStatusResult

parameters:

requestID
readerName
state
atr

func (*ReportStatusResultParams) Do

func (p *ReportStatusResultParams) Do(ctx context.Context) (err error)

Do executes SmartCardEmulation.reportStatusResult against the provided context.

func (ReportStatusResultParams) WithProtocol

WithProtocol [no description].

type ResultCode

type ResultCode string

ResultCode indicates the PC/SC error code. This maps to: PC/SC Lite: https://pcsclite.apdu.fr/api/group__ErrorCodes.html Microsoft: https://learn.microsoft.com/en-us/windows/win32/secauthn/authentication-return-values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ResultCode

const (
	ResultCodeSuccess            ResultCode = "success"
	ResultCodeRemovedCard        ResultCode = "removed-card"
	ResultCodeResetCard          ResultCode = "reset-card"
	ResultCodeUnpoweredCard      ResultCode = "unpowered-card"
	ResultCodeUnresponsiveCard   ResultCode = "unresponsive-card"
	ResultCodeUnsupportedCard    ResultCode = "unsupported-card"
	ResultCodeReaderUnavailable  ResultCode = "reader-unavailable"
	ResultCodeSharingViolation   ResultCode = "sharing-violation"
	ResultCodeNotTransacted      ResultCode = "not-transacted"
	ResultCodeNoSmartcard        ResultCode = "no-smartcard"
	ResultCodeProtoMismatch      ResultCode = "proto-mismatch"
	ResultCodeSystemCancelled    ResultCode = "system-cancelled"
	ResultCodeNotReady           ResultCode = "not-ready"
	ResultCodeCancelled          ResultCode = "cancelled"
	ResultCodeInsufficientBuffer ResultCode = "insufficient-buffer"
	ResultCodeInvalidHandle      ResultCode = "invalid-handle"
	ResultCodeInvalidParameter   ResultCode = "invalid-parameter"
	ResultCodeInvalidValue       ResultCode = "invalid-value"
	ResultCodeNoMemory           ResultCode = "no-memory"
	ResultCodeTimeout            ResultCode = "timeout"
	ResultCodeUnknownReader      ResultCode = "unknown-reader"
	ResultCodeUnsupportedFeature ResultCode = "unsupported-feature"
	ResultCodeNoReadersAvailable ResultCode = "no-readers-available"
	ResultCodeServiceStopped     ResultCode = "service-stopped"
	ResultCodeNoService          ResultCode = "no-service"
	ResultCodeCommError          ResultCode = "comm-error"
	ResultCodeInternalError      ResultCode = "internal-error"
	ResultCodeServerTooBusy      ResultCode = "server-too-busy"
	ResultCodeUnexpected         ResultCode = "unexpected"
	ResultCodeShutdown           ResultCode = "shutdown"
	ResultCodeUnknownCard        ResultCode = "unknown-card"
	ResultCodeUnknown            ResultCode = "unknown"
)

ResultCode values.

func (ResultCode) String

func (t ResultCode) String() string

String returns the ResultCode as string value.

func (*ResultCode) UnmarshalJSON

func (t *ResultCode) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type ShareMode

type ShareMode string

ShareMode maps to the |SCARD_SHARE_*| values.

See: https://chromedevtools.github.io/devtools-protocol/tot/SmartCardEmulation#type-ShareMode

const (
	ShareModeShared    ShareMode = "shared"
	ShareModeExclusive ShareMode = "exclusive"
	ShareModeDirect    ShareMode = "direct"
)

ShareMode values.

func (ShareMode) String

func (t ShareMode) String() string

String returns the ShareMode as string value.

func (*ShareMode) UnmarshalJSON

func (t *ShareMode) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

Jump to

Keyboard shortcuts

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