keybase

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 40 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 added in v1.0.48

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 added in v1.0.48

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, pusher PushNotifier, mobileOsVersion string) (err error)

func ExtensionIsInited

func ExtensionIsInited() bool

func ExtensionPostFile

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

func ExtensionPostImage

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

func ExtensionPostText

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

func ExtensionPostVideo

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

func ForceGC added in v1.0.41

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, mobileSharedHome, logFile, runModeStr string,
	accessGroupOverride bool, externalDNSNSFetcher ExternalDNSNSFetcher, nvh NativeVideoHelper,
	mobileOsVersion string) (err error)

Init runs the Keybase services

func InitOnce

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

InitOnce runs the Keybase services (only runs one time)

func LogSend

func LogSend(statusJSON string, feedback string, sendLogs, sendMaxBytes 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 added in v1.0.48

func SetAppStateBackground()

func SetAppStateBackgroundActive added in v1.0.48

func SetAppStateBackgroundActive()

func SetAppStateForeground added in v1.0.48

func SetAppStateForeground()

func SetAppStateInactive added in v1.0.48

func SetAppStateInactive()

func Version added in v1.0.18

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 added in v1.0.21

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