dto

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APDUResponse

type APDUResponse struct {
	Cmd      string `json:"apdu"`
	Response string `json:"response"`
	Valid    bool   `json:"isValid"`
}

func NewAPDUResponse

func NewAPDUResponse(apdu, response []byte) *APDUResponse

type Atr

type Atr struct {
	ProtocolInterfaceA string `json:"protocolInterfaceA"`
	ProtocolInterfaceB string `json:"protocolInterfaceB"`
	ProtocolInterfaceC string `json:"protocolInterfaceC"`
	ProtocolInterfaceD string `json:"protocolInterfaceD"`
	HistoricalBytes    string `json:"historicalBytes"`
	TckValid           bool   `json:"tckValid"`
	Raw                string `json:"raw"`
}

type AtrInfo

type AtrInfo struct {
}

type DeviceInformation

type DeviceInformation struct {
	EnclosureLocation interface{}       `json:"enclosureLocation"`
	ID                string            `json:"id"`
	IsDefault         bool              `json:"isDefault"`
	IsEnabled         bool              `json:"isEnabled"`
	Kind              int               `json:"kind"`
	Name              string            `json:"name"`
	Pairing           *DevicePairing    `json:"pairing"`
	Properties        *DeviceProperties `json:"properties"`
}

func NewDeviceInfo

func NewDeviceInfo(name, id string, isEnabled bool) *DeviceInformation

type DevicePairing

type DevicePairing struct {
	CanPair         bool        `json:"canPair"`
	Custom          interface{} `json:"custom"`
	IsPaired        bool        `json:"isPaired"`
	ProtectionLevel int         `json:"rotectionLevel"`
}

type DeviceProperties

type DeviceProperties struct {
	ItemNameDisplay  string `json:"System.ItemNameDisplay"`
	InterfaceEnabled bool   `json:"System.Devices.InterfaceEnabled"`
}

type Reader

type Reader struct {
	Name  string `json:"name"`
	ID    string `json:"id"`
	IdHex string `json:"idHex"`
}

func NewReader

func NewReader(id, name string) *Reader

type SmartcardStatus

type SmartcardStatus struct {
	ATR        *Atr       `json:"atr"`
	StatusCode StatusCode `json:"statusCode"`
	Status     string     `json:"status"`
}

func NewSmartCardStatus

func NewSmartCardStatus(atr []byte, status StatusCode) *SmartcardStatus

type StatusCode

type StatusCode int
const (
	Ready      StatusCode = 1
	Shared     StatusCode = 2
	NotPresent StatusCode = -1
)

func (StatusCode) String

func (s StatusCode) String() string

Jump to

Keyboard shortcuts

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