Documentation

Overview

    Package bertybridge is the main gomobile entrypoint, used to generate iOS and Android frameworks.

    Example
    Output:
    
    [+] initialized.
    [+] account opened.
    [+] has grpc-web listener:            false
    [+] has websocket listener:           true
    [+] has more than one swarm listener: true
    

    Index

    Examples

    Constants

    View Source
    const (
    	AppStateUnknown int = iota
    	AppStateActive
    	AppStateInactive
    	AppStateBackground
    )

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Bridge

    type Bridge struct {
    	// contains filtered or unexported fields
    }

    func NewBridge

    func NewBridge(config *Config) (*Bridge, error)

    func (*Bridge) Close

    func (b *Bridge) Close() error

    func (*Bridge) HandleState

    func (b *Bridge) HandleState(appstate int)

    func (*Bridge) HandleTask

    func (b *Bridge) HandleTask() LifeCycleBackgroundTask

    func (*Bridge) InvokeBridgeMethod

    func (b *Bridge) InvokeBridgeMethod(method string, b64message string) (string, error)

    func (*Bridge) InvokeBridgeMethodWithPromiseBlock

    func (b *Bridge) InvokeBridgeMethodWithPromiseBlock(promise PromiseBlock, method string, b64message string)

    func (*Bridge) WillTerminate

    func (b *Bridge) WillTerminate()

    type Config

    type Config struct {
    	// 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 NewConfig

      func NewConfig() *Config

      func (*Config) AppendCLIArg

      func (c *Config) AppendCLIArg(arg string)

      func (*Config) SetBleDriver

      func (c *Config) SetBleDriver(driver NativeBleDriver)

      func (*Config) SetLifeCycleDriver

      func (c *Config) SetLifeCycleDriver(lc LifeCycleDriver)

      func (*Config) SetLoggerDriver

      func (c *Config) SetLoggerDriver(dLogger NativeLoggerDriver)

      func (*Config) SetNBDriver

      func (c *Config) SetNBDriver(driver NativeNBDriver)

      func (*Config) SetNotificationDriver

      func (c *Config) SetNotificationDriver(driver NotificationDriver)

      func (*Config) SetRootDir

      func (c *Config) SetRootDir(rootdir string)

      type LifeCycleBackgroundTask

      type LifeCycleBackgroundTask interface {
      	Execute() (success bool)
      	Cancel()
      }

      type LifeCycleDriver

      type LifeCycleDriver interface {
      	GetCurrentState() int
      	RegisterHandler(handler LifeCycleHandler)
      }

      type LifeCycleHandler

      type LifeCycleHandler interface {
      	HandleState(appstate int)
      	HandleTask() LifeCycleBackgroundTask
      	WillTerminate()
      }

      type LocalNotification

      type LocalNotification struct {
      	Title    string
      	Body     string
      	Interval float64
      }

      type NativeBleDriver

      type NativeBleDriver interface {
      	proximity.NativeDriver
      }

      type NativeLoggerDriver

      type NativeLoggerDriver interface {
      	Log(level, namespace, message string) error
      	LevelEnabler(level string) bool
      }

      type NativeNBDriver

      type NativeNBDriver interface {
      	proximity.NativeDriver
      }

      type NotificationDriver

      type NotificationDriver interface {
      	Post(notif *LocalNotification) error
      }

      type PromiseBlock

      type PromiseBlock interface {
      	CallResolve(reply string)
      	CallReject(error error)
      }

      type ProximityTransport

      type ProximityTransport interface {
      	proximity.ProximityTransport
      }

      func GetProximityTransport

      func GetProximityTransport(protocolName string) ProximityTransport