Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletionHandler ¶
type CompletionHandler struct {
// contains filtered or unexported fields
}
CompletionHandler is a Go-compatible completion handler that implements Completionable.
func NewCompletion ¶
func NewCompletion(success successHandler, failure failureHandler) *CompletionHandler
NewCompletion returns an empty completion handler. AddHandler is required for these handlers.
func (*CompletionHandler) AddHandlers ¶
func (c *CompletionHandler) AddHandlers(success successHandler, failure failureHandler)
AddHandlers adds success/failure handlers to a completion handler
func (*CompletionHandler) OnFailure ¶
func (c *CompletionHandler) OnFailure(msg string)
OnFailure is called when a task fails.
func (*CompletionHandler) OnSuccess ¶
func (c *CompletionHandler) OnSuccess(r *Result)
OnSuccess is called when a task succeeds.
type Completionable ¶
Completionable interface is used to implement your own mobile-compatible completion handlers.
type Iteratable ¶
Iteratable is used to iterate through a list of Results.
type Result ¶
type Result struct { DataType string Data interface{} }
Result is a generic struct used with completion handlers.
func GetResults ¶
func GetResults(results ResultArray) []Result
GetResults is a Go-compatible way to get an array/slice of Result objects.
type ResultArray ¶
type ResultArray struct {
// contains filtered or unexported fields
}
ResultArray implements iteratable to allow mobile-compatible array passing.
func NewResultIterator ¶
func NewResultIterator(data []Result) *ResultArray
NewResultIterator returns a new iterator for Result arrays.
func (*ResultArray) Next ¶
func (d *ResultArray) Next() bool
Next returns true is there is additional results in the array.
func (*ResultArray) Value ¶
func (d *ResultArray) Value() Result
Value gets the current value of the iterator