keybase

package
v0.0.0-...-a8b6a46 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 37 Imported by: 0

README

Bind

Go bindable package that includes both Keybase client and KBFS for gomobile builds.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppBeginBackgroundTask

func AppBeginBackgroundTask(pusher PushNotifier)

AppBeginBackgroundTask notifies us that an app background task has been started on our behalf. This function will return once we no longer need any time in the background.

func AppBeginBackgroundTaskNonblock

func AppBeginBackgroundTaskNonblock(pusher PushNotifier)

func AppDidEnterBackground

func AppDidEnterBackground() bool

AppDidEnterBackground notifies the service that the app is in the background [iOS] returning true will request about ~3mins from iOS to continue execution

func AppWillExit

func AppWillExit(pusher PushNotifier)

AppWillExit is called reliably on iOS when the app is about to terminate not as reliably on android

func BackgroundSync

func BackgroundSync()

func ExtensionDetectMIMEType

func ExtensionDetectMIMEType(filename string) (res string, err error)

func ExtensionForceGC

func ExtensionForceGC()

ExtensionForceGC Forces a gc

func ExtensionGetInbox

func ExtensionGetInbox() (res string, err error)

func ExtensionGetSavedConv

func ExtensionGetSavedConv() string

func ExtensionInit

func ExtensionInit(homeDir string, mobileSharedHome string, logFile string, runModeStr string,
	accessGroupOverride bool) (err error)

func ExtensionIsInited

func ExtensionIsInited() bool

func ExtensionPostFile

func ExtensionPostFile(strConvID, strOutboxID, name string, public bool, membersType int,
	caption string, filename string, pusher PushNotifier) (err error)

func ExtensionPostImage

func ExtensionPostImage(strConvID, strOutboxID, name string, public bool, membersType int,
	caption string, filename string, mimeType string,
	baseWidth, baseHeight, previewWidth, previewHeight int, previewData []byte, pusher PushNotifier) (err error)

func ExtensionPostText

func ExtensionPostText(strConvID, strOutboxID, name string, public bool, membersType int,
	body string, pusher PushNotifier) (err error)

func ExtensionPostVideo

func ExtensionPostVideo(strConvID, strOutboxID, name string, public bool, membersType int,
	caption string, filename string, mimeType string,
	duration, baseWidth, baseHeight, previewWidth, previewHeight int, previewData []byte, pusher PushNotifier) (err error)

func ExtensionRegisterSend

func ExtensionRegisterSend(strConvID string, pusher PushNotifier) (res string, err error)

func ForceGC

func ForceGC()

ForceGC Forces a gc

func HandleBackgroundNotification

func HandleBackgroundNotification(strConvID, body string, intMembersType int, displayPlaintext bool,
	intMessageID int, pushID string, badgeCount, unixTime int, soundName string, pusher PushNotifier) (err error)

func Init

func Init(homeDir string, mobileSharedHome string, logFile string, runModeStr string,
	accessGroupOverride bool, externalDNSNSFetcher ExternalDNSNSFetcher, nvh NativeVideoHelper) (err error)

Init runs the Keybase services

func InitOnce

func InitOnce(homeDir string, mobileSharedHome string, logFile string, runModeStr string,
	accessGroupOverride bool, dnsNSFetcher ExternalDNSNSFetcher, nvh NativeVideoHelper)

InitOnce runs the Keybase services (only runs one time)

func LogSend

func LogSend(status string, feedback string, sendLogs bool, uiLogPath, traceDir, cpuProfileDir string) (res string, err error)

LogSend sends a log to Keybase

func ReadB64

func ReadB64() (res string, err error)

ReadB64 is a blocking read for base64 encoded msgpack rpc data. It is called serially by the mobile run loops.

func Reset

func Reset() error

Reset resets the socket connection

func SetAppStateBackground

func SetAppStateBackground()

func SetAppStateBackgroundActive

func SetAppStateBackgroundActive()

func SetAppStateForeground

func SetAppStateForeground()

func SetAppStateInactive

func SetAppStateInactive()

func Version

func Version() string

Version returns semantic version string

func WriteB64

func WriteB64(str string) (err error)

WriteB64 sends a base64 encoded msgpack rpc payload

Types

type ExternalDNSNSFetcher

type ExternalDNSNSFetcher interface {
	GetServers() []byte
}

type NativeVideoHelper

type NativeVideoHelper interface {
	Thumbnail(filename string) []byte
	Duration(filename string) int
}

type PushNotifier

type PushNotifier interface {
	LocalNotification(ident string, msg string, badgeCount int, soundName string, convID string, typ string)
}

Jump to

Keyboard shortcuts

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