Documentation ¶
Index ¶
- Constants
- func ConnectServer(nameSpace string, mailboxServer string, isDevServer bool, pairingPhrase string, ...) error
- func Disconnect(nameSpace string) error
- func GetExpiry(nameSpace string) (string, error)
- func HasPermissions(nameSpace, permission string) (bool, error)
- func InitLNC(nameSpace, debugLevel string) error
- func InvokeRPC(nameSpace string, rpcName string, requestJSON string, c NativeCallback) error
- func IsConnected(nameSpace string) (bool, error)
- func IsReadOnly(nameSpace string) (bool, error)
- func NewGrpcLogLogger(root *build.RotatingLogWriter, intercept signal.Interceptor, subsystem string) *mailbox.GrpcLogLogger
- func RegisterAuthDataCallback(nameSpace string, c NativeCallback) error
- func RegisterLocalPrivCreateCallback(nameSpace string, c NativeCallback) error
- func RegisterRemoteKeyReceiveCallback(nameSpace string, c NativeCallback) error
- func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor)
- func Status(nameSpace string) (string, error)
- type NativeCallback
Constants ¶
const Subsystem = "MOBL"
Variables ¶
This section is empty.
Functions ¶
func ConnectServer ¶
func ConnectServer(nameSpace string, mailboxServer string, isDevServer bool, pairingPhrase string, localStatic string, remoteStatic string) error
ConnectServer creates a connection from the client to the mailbox server.
func HasPermissions ¶
HasPermissions returns whether or not the connection macaroon has a specified permission.
func InitLNC ¶
InitLNC sets up everything required for LNC to run including signal interceptor, logs, and an instance of the mobile client.
func InvokeRPC ¶
func InvokeRPC(nameSpace string, rpcName string, requestJSON string, c NativeCallback) error
InvokeRPC makes a synchronous RPC call.
func IsConnected ¶
IsConnected returns whether or not there is an active connection.
func IsReadOnly ¶
IsReadOnly returns whether or not the connection macaroon is read-only.
func NewGrpcLogLogger ¶
func NewGrpcLogLogger(root *build.RotatingLogWriter, intercept signal.Interceptor, subsystem string) *mailbox.GrpcLogLogger
NewGrpcLogLogger creates a new grpclog compatible logger and attaches it as a sub logger to the passed root logger.
func RegisterAuthDataCallback ¶
func RegisterAuthDataCallback(nameSpace string, c NativeCallback) error
RegisterAuthDataCallback sets up the native callbacks upon receiving auth data.
func RegisterLocalPrivCreateCallback ¶
func RegisterLocalPrivCreateCallback(nameSpace string, c NativeCallback) error
RegisterLocalPrivCreateCallback sets up the native callbacks upon creation of local private key.
func RegisterRemoteKeyReceiveCallback ¶
func RegisterRemoteKeyReceiveCallback(nameSpace string, c NativeCallback) error
RegisterRemoteKeyReceiveCallback sets up the native callbacks upon receiving the remote key from the server.
func SetupLoggers ¶
func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor)
SetupLoggers initializes all package-global logger variables.
Types ¶
type NativeCallback ¶
type NativeCallback interface {
SendResult(json string)
}