warpify

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cycles

func Cycles() (string, error)

Cycles returns the stringify of list of available cycles in the bundles e.g. [{ id: 1, name: "dev" }, ...]

func DownloadRelease

func DownloadRelease(cycleID, releaseID int64, version string) error

DownloadRelease it starts download and save the bundle inside path it uses the release id

func DownloadVersion

func DownloadVersion(cycleID int64, version string) error

DownloadVersion it starts download and save the bundle inside path it uses the version

func Latest

func Latest(cycleID int64) (string, error)

Latest returns an string version of release map

func LocalVersions

func LocalVersions(cycleID int64) (string, error)

LocalVersions we can not returns an array of data.Release because gomobile won't generate proepr objective-c binding, what we do here is serliazie the array into string and return the value. The string will be parsed in javascript side

func Reload

func Reload(cycleID int64, versionStr string) error

Reload accepts a version. The version needs to be already downloaded or an error will be return. version also needs to follow semantic versioning the preRelease section of the version targets the cycle's name

func RemoteVersions

func RemoteVersions(cycleID int64) (string, error)

RemoteVersions we can not returns an array of data.Release because gomobile won't generate proepr objective-c binding, what we do here is serliazie the array into string and return the value. The string will be parsed in javascript side

func SetReload

func SetReload(reloadTask Callback)

SetReload assing an func call from native target for reloading react-native, this is only need to be used if forceUpdate is enabled.

func Setup

func Setup(bundleVersion, bundlePath, documentPath, platform, defaultCycle string, forceUpdate bool) error

Setup we need to setup the app

func SourcePath

func SourcePath() string

SourcePath returns the proper path for react-native app to start the process if there is no downlaod available, simply return an empty string on native side, it will be replaced by default value also this method must be called after Setup function is called with no errors

Types

type Callback

type Callback interface {
	Do(kind int, value string)
}

Callback is an interface for calling native with some values

Jump to

Keyboard shortcuts

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