Documentation ¶
Overview ¶
Package bertybridge is the main gomobile entrypoint, used to generate iOS and Android frameworks.
Index ¶
- Constants
- type Bridge
- func (b *Bridge) Close() error
- func (b *Bridge) HandleConnectivityUpdate(info *ConnectivityInfo)
- func (b *Bridge) HandleState(appstate int)
- func (b *Bridge) HandleTask() LifeCycleBackgroundTask
- func (b *Bridge) Log(level int, subsystem string, message string)
- func (b *Bridge) PushDecrypt(inputB64 string) (*FormatedPush, error)
- func (b *Bridge) WillTerminate()
- type BridgeConfig
- func (c *BridgeConfig) AppendCLIArg(arg string)
- func (c *BridgeConfig) AppendPreferredLanguage(preferred string)
- func (c *BridgeConfig) SetAppRootDir(rootdir string)
- func (c *BridgeConfig) SetBleDriver(driver ProximityDriver)
- func (c *BridgeConfig) SetConnectivityDriver(d IConnectivityDriver)
- func (c *BridgeConfig) SetKeystoreDriver(d NativeKeystoreDriver)
- func (c *BridgeConfig) SetLifeCycleDriver(lc LifeCycleDriver)
- func (c *BridgeConfig) SetMDNSLocker(driver NativeMDNSLockerDriver)
- func (c *BridgeConfig) SetNBDriver(driver ProximityDriver)
- func (c *BridgeConfig) SetNetDriver(driver NativeNetDriver)
- func (c *BridgeConfig) SetNotificationDriver(driver NotificationDriver)
- func (c *BridgeConfig) SetPreferredLanguages(preferred string)
- func (c *BridgeConfig) SetSharedRootDir(rootdir string)
- type ConnectivityInfo
- func (ci *ConnectivityInfo) GetBluetooth() int
- func (ci *ConnectivityInfo) GetCellularType() int
- func (ci *ConnectivityInfo) GetMetering() int
- func (ci *ConnectivityInfo) GetNetType() int
- func (ci *ConnectivityInfo) GetState() int
- func (ci *ConnectivityInfo) SetBluetooth(bluetooth int)
- func (ci *ConnectivityInfo) SetCellularType(cellularType int)
- func (ci *ConnectivityInfo) SetMetering(metering int)
- func (ci *ConnectivityInfo) SetNetType(netType int)
- func (ci *ConnectivityInfo) SetState(state int)
- type DecryptedPush
- type FormatedPush
- type IConnectivityDriver
- type IConnectivityHandler
- type LifeCycleBackgroundTask
- type LifeCycleDriver
- type LifeCycleHandler
- type LocalNotification
- type NativeKeystoreDriver
- type NativeMDNSLockerDriver
- type NativeNetDriver
- type NetAddrs
- type NetInterface
- type NetInterfaces
- type NotificationDriver
- type PromiseBlock
- type ProximityDriver
- type ProximityTransport
- type PushConfig
- type PushStandalone
- type RemoteBridge
- type RemoteBridgeConfig
- type ServiceClient
Constants ¶
View Source
const ( LevelDebug int = int(zapcore.DebugLevel) LevelInfo int = int(zapcore.InfoLevel) LevelWarn int = int(zapcore.WarnLevel) LevelError int = int(zapcore.ErrorLevel) )
View Source
const ( ConnectivityStateUnknown int = int(netmanager.ConnectivityStateUnknown) ConnectivityStateOff = int(netmanager.ConnectivityStateOff) ConnectivityStateOn = int(netmanager.ConnectivityStateOn) ConnectivityNetUnknown = int(netmanager.ConnectivityNetUnknown) ConnectivityNetNone = int(netmanager.ConnectivityNetNone) ConnectivityNetWifi = int(netmanager.ConnectivityNetWifi) ConnectivityNetEthernet = int(netmanager.ConnectivityNetEthernet) ConnectivityNetCellular = int(netmanager.ConnectivityNetCellular) ConnectivityCellularUnknown = int(netmanager.ConnectivityCellularUnknown) ConnectivityCellularNone = int(netmanager.ConnectivityCellularNone) ConnectivityCellular2G = int(netmanager.ConnectivityCellular2G) ConnectivityCellular3G = int(netmanager.ConnectivityCellular3G) ConnectivityCellular4G = int(netmanager.ConnectivityCellular4G) ConnectivityCellular5G = int(netmanager.ConnectivityCellular5G) )
View Source
const ( AppStateUnknown int = iota AppStateActive AppStateInactive AppStateBackground )
View Source
const ( NetFlagUp int = iota // interface is up NetFlagBroadcast // interface supports broadcast access capability NetFlagLoopback // interface is a loopback interface NetFlagPointToPoint // interface belongs to a point-to-point link NetFlagMulticast // interface supports multicast access capability )
View Source
const ( ServicePushPayloadKey = pushtypes.ServicePushPayloadKey StorageKeyName = accountutils.StorageKeyName )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct { ServiceClient // contains filtered or unexported fields }
func NewBridge ¶ added in v2.190.1
func NewBridge(config *BridgeConfig) (*Bridge, error)
func (*Bridge) HandleConnectivityUpdate ¶ added in v2.459.0
func (b *Bridge) HandleConnectivityUpdate(info *ConnectivityInfo)
func (*Bridge) HandleState ¶ added in v2.190.1
func (*Bridge) HandleTask ¶ added in v2.190.1
func (b *Bridge) HandleTask() LifeCycleBackgroundTask
func (*Bridge) PushDecrypt ¶ added in v2.319.0
func (b *Bridge) PushDecrypt(inputB64 string) (*FormatedPush, error)
func (*Bridge) WillTerminate ¶ added in v2.190.1
func (b *Bridge) WillTerminate()
type BridgeConfig ¶ added in v2.435.0
type BridgeConfig struct { CLIArgs []string `json:"cliArgs"` AppRootDirPath string `json:"appRootDir"` // contains filtered or unexported fields }
Config is used to build a bertybridge configuration using only simple types or types returned by the bertybridge package.
func NewBridgeConfig ¶ added in v2.435.0
func NewBridgeConfig() *BridgeConfig
func (*BridgeConfig) AppendCLIArg ¶ added in v2.435.0
func (c *BridgeConfig) AppendCLIArg(arg string)
func (*BridgeConfig) AppendPreferredLanguage ¶ added in v2.435.0
func (c *BridgeConfig) AppendPreferredLanguage(preferred string)
func (*BridgeConfig) SetAppRootDir ¶ added in v2.435.0
func (c *BridgeConfig) SetAppRootDir(rootdir string)
func (*BridgeConfig) SetBleDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetBleDriver(driver ProximityDriver)
func (*BridgeConfig) SetConnectivityDriver ¶ added in v2.459.0
func (c *BridgeConfig) SetConnectivityDriver(d IConnectivityDriver)
func (*BridgeConfig) SetKeystoreDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetKeystoreDriver(d NativeKeystoreDriver)
func (*BridgeConfig) SetLifeCycleDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetLifeCycleDriver(lc LifeCycleDriver)
func (*BridgeConfig) SetMDNSLocker ¶ added in v2.435.0
func (c *BridgeConfig) SetMDNSLocker(driver NativeMDNSLockerDriver)
func (*BridgeConfig) SetNBDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetNBDriver(driver ProximityDriver)
func (*BridgeConfig) SetNetDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetNetDriver(driver NativeNetDriver)
func (*BridgeConfig) SetNotificationDriver ¶ added in v2.435.0
func (c *BridgeConfig) SetNotificationDriver(driver NotificationDriver)
func (*BridgeConfig) SetPreferredLanguages ¶ added in v2.435.0
func (c *BridgeConfig) SetPreferredLanguages(preferred string)
func (*BridgeConfig) SetSharedRootDir ¶ added in v2.435.0
func (c *BridgeConfig) SetSharedRootDir(rootdir string)
type ConnectivityInfo ¶ added in v2.459.0
type ConnectivityInfo struct {
// contains filtered or unexported fields
}
func NewConnectivityInfo ¶ added in v2.459.0
func NewConnectivityInfo() *ConnectivityInfo
func (*ConnectivityInfo) GetBluetooth ¶ added in v2.459.0
func (ci *ConnectivityInfo) GetBluetooth() int
func (*ConnectivityInfo) GetCellularType ¶ added in v2.459.0
func (ci *ConnectivityInfo) GetCellularType() int
func (*ConnectivityInfo) GetMetering ¶ added in v2.459.0
func (ci *ConnectivityInfo) GetMetering() int
func (*ConnectivityInfo) GetNetType ¶ added in v2.459.0
func (ci *ConnectivityInfo) GetNetType() int
func (*ConnectivityInfo) GetState ¶ added in v2.459.0
func (ci *ConnectivityInfo) GetState() int
func (*ConnectivityInfo) SetBluetooth ¶ added in v2.459.0
func (ci *ConnectivityInfo) SetBluetooth(bluetooth int)
func (*ConnectivityInfo) SetCellularType ¶ added in v2.459.0
func (ci *ConnectivityInfo) SetCellularType(cellularType int)
func (*ConnectivityInfo) SetMetering ¶ added in v2.459.0
func (ci *ConnectivityInfo) SetMetering(metering int)
func (*ConnectivityInfo) SetNetType ¶ added in v2.459.0
func (ci *ConnectivityInfo) SetNetType(netType int)
func (*ConnectivityInfo) SetState ¶ added in v2.459.0
func (ci *ConnectivityInfo) SetState(state int)
type DecryptedPush ¶ added in v2.319.0
type DecryptedPush pushtypes.DecryptedPush
type FormatedPush ¶ added in v2.327.0
type FormatedPush pushtypes.FormatedPush
type IConnectivityDriver ¶ added in v2.459.0
type IConnectivityDriver interface { GetCurrentState() *ConnectivityInfo RegisterHandler(handler IConnectivityHandler) }
type IConnectivityHandler ¶ added in v2.459.0
type IConnectivityHandler interface {
HandleConnectivityUpdate(connectivityInfo *ConnectivityInfo)
}
type LifeCycleBackgroundTask ¶ added in v2.124.0
type LifeCycleBackgroundTask interface { Execute() (success bool) Cancel() }
type LifeCycleDriver ¶ added in v2.124.0
type LifeCycleDriver interface { GetCurrentState() int RegisterHandler(handler LifeCycleHandler) }
type LifeCycleHandler ¶ added in v2.124.0
type LifeCycleHandler interface { HandleState(appstate int) HandleTask() LifeCycleBackgroundTask WillTerminate() }
type LocalNotification ¶ added in v2.134.1
type NativeKeystoreDriver ¶ added in v2.313.0
type NativeKeystoreDriver interface { accountutils.NativeKeystore }
type NativeMDNSLockerDriver ¶ added in v2.337.0
type NativeMDNSLockerDriver interface { Lock() Unlock() }
type NativeNetDriver ¶ added in v2.337.0
type NativeNetDriver interface { InterfaceAddrs() (*NetAddrs, error) Interfaces() (*NetInterfaces, error) }
type NetAddrs ¶ added in v2.337.0
type NetAddrs struct {
// contains filtered or unexported fields
}
func NewNetAddrs ¶ added in v2.337.0
func NewNetAddrs() *NetAddrs
func (*NetAddrs) AppendAddr ¶ added in v2.337.0
type NetInterface ¶ added in v2.346.0
type NetInterface struct { Index int // positive integer that starts at one, zero is never used MTU int // maximum transmission unit Name string // e.g., "en0", "lo0", "eth0.100" Addrs *NetAddrs // InterfaceAddresses // contains filtered or unexported fields }
func (*NetInterface) AddFlag ¶ added in v2.346.0
func (n *NetInterface) AddFlag(flag int) (err error)
func (*NetInterface) CopyHardwareAddr ¶ added in v2.346.0
func (n *NetInterface) CopyHardwareAddr(addr []byte)
func (*NetInterface) Interface ¶ added in v2.346.0
func (n *NetInterface) Interface() net.Interface
type NetInterfaces ¶ added in v2.346.0
type NetInterfaces struct {
// contains filtered or unexported fields
}
func (*NetInterfaces) Append ¶ added in v2.346.0
func (n *NetInterfaces) Append(i *NetInterface)
func (*NetInterfaces) Interfaces ¶ added in v2.346.0
func (n *NetInterfaces) Interfaces() []net.Interface
type NotificationDriver ¶ added in v2.134.1
type NotificationDriver interface {
Post(notif *LocalNotification) error
}
type PromiseBlock ¶ added in v2.121.0
type ProximityDriver ¶ added in v2.296.0
type ProximityDriver interface { proximity.ProximityDriver }
type ProximityTransport ¶ added in v2.260.0
type ProximityTransport interface { proximity.ProximityTransport }
func GetProximityTransport ¶ added in v2.260.0
func GetProximityTransport(protocolName string) ProximityTransport
type PushConfig ¶ added in v2.327.0
type PushConfig struct {
// contains filtered or unexported fields
}
func NewPushConfig ¶ added in v2.327.0
func NewPushConfig() *PushConfig
func (*PushConfig) SetPreferredLanguages ¶ added in v2.327.0
func (c *PushConfig) SetPreferredLanguages(lang string)
type PushStandalone ¶ added in v2.327.0
type PushStandalone struct {
// contains filtered or unexported fields
}
func NewPushStandalone ¶ added in v2.327.0
func NewPushStandalone(c *PushConfig) *PushStandalone
func (*PushStandalone) Decrypt ¶ added in v2.327.0
func (s *PushStandalone) Decrypt(rootDir string, inputB64 string, ks NativeKeystoreDriver) (*FormatedPush, error)
type RemoteBridge ¶ added in v2.435.0
type RemoteBridge struct { ServiceClient // contains filtered or unexported fields }
func NewRemoteBridge ¶ added in v2.435.0
func NewRemoteBridge(address string, _ *RemoteBridgeConfig) (*RemoteBridge, error)
func (*RemoteBridge) Close ¶ added in v2.435.0
func (b *RemoteBridge) Close() error
func (*RemoteBridge) ConnectService ¶ added in v2.435.0
func (b *RemoteBridge) ConnectService(serviceName string, address string) error
type RemoteBridgeConfig ¶ added in v2.435.0
type RemoteBridgeConfig struct{}
func NewRemoteBridgeConfig ¶ added in v2.435.0
func NewRemoteBridgeConfig() *RemoteBridgeConfig
type ServiceClient ¶ added in v2.435.0
type ServiceClient interface { InvokeBridgeMethodWithPromiseBlock(promise PromiseBlock, method string, b64message string) InvokeBridgeMethod(method string, b64message string) (string, error) }
func NewServiceClient ¶ added in v2.435.0
func NewServiceClient(cl *grpcutil.LazyClient) ServiceClient
Click to show internal directories.
Click to hide internal directories.