Documentation ¶
Overview ¶
Package bridgecommon provides common util functions to bridge the backend to a native environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackendCall ¶
BackendCall bridges GET/POST calls (serverless, directly calling the backend handlers).
func Serve ¶
func Serve( testnet bool, theCommunication NativeCommunication, backendEnvironment backend.Environment)
Serve serves the BitBox API for use in a native client.
Types ¶
type BackendEnvironment ¶
type BackendEnvironment struct { NotifyUserFunc func(string) DeviceInfosFunc func() []usb.DeviceInfo SystemOpenFunc func(string) error }
BackendEnvironment implements backend.Environment.
func (*BackendEnvironment) DeviceInfos ¶
func (env *BackendEnvironment) DeviceInfos() []usb.DeviceInfo
DeviceInfos implements backend.Environment
func (*BackendEnvironment) NotifyUser ¶
func (env *BackendEnvironment) NotifyUser(text string)
NotifyUser implements backend.Environment
func (*BackendEnvironment) SystemOpen ¶
func (env *BackendEnvironment) SystemOpen(url string) error
SystemOpen implements backend.Environment
type NativeCommunication ¶
NativeCommunication provides function to pass responses and push notifications to the native environment.
Click to show internal directories.
Click to hide internal directories.