-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make gomobile work by removing custom couchdb document type
- Loading branch information
Showing
23 changed files
with
148 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Objective-C API for talking to github.com/zemirco/todo/item Go package. | ||
// gobind -lang=objc github.com/zemirco/todo/item | ||
// | ||
// File is generated by gobind. Do not edit. | ||
|
||
#ifndef __GoItem_H__ | ||
#define __GoItem_H__ | ||
|
||
#include <Foundation/Foundation.h> | ||
|
||
@class GoItemTodo; | ||
|
||
@interface GoItemTodo : NSObject { | ||
} | ||
@property(strong, readonly) id _ref; | ||
|
||
- (id)initWithRef:(id)ref; | ||
- (NSString*)id; | ||
- (void)setID:(NSString*)v; | ||
- (NSString*)rev; | ||
- (void)setRev:(NSString*)v; | ||
- (NSString*)type; | ||
- (void)setType:(NSString*)v; | ||
- (NSString*)text; | ||
- (void)setText:(NSString*)v; | ||
- (double)createdAt; | ||
- (void)setCreatedAt:(double)v; | ||
- (BOOL)done; | ||
- (void)setDone:(BOOL)v; | ||
- (NSString*)getID; | ||
- (NSString*)getRev; | ||
@end | ||
|
||
FOUNDATION_EXPORT GoItemTodo* GoItemNewTodo(NSString* text); | ||
|
||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
framework module "Item" { | ||
header "Item.h" | ||
|
||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
package item | ||
|
||
import "github.com/zemirco/couchdb" | ||
|
||
// Todo defines todo item. | ||
// Whole package is reused for mobile app via gomobile. | ||
// Therefore only basic types work. | ||
type Todo struct { | ||
couchdb.Document | ||
// cannot embed couchdb.Document directly because gomobile complains | ||
ID string `json:"_id,omitempty"` | ||
Rev string `json:"_rev,omitempty"` | ||
Type string `json:"type"` | ||
Text string `json:"text"` | ||
CreatedAt float64 `json:"createdAt"` | ||
Done bool `json:"done"` | ||
} | ||
|
||
// NewTodo returns new todo item. | ||
// Constructor must exist and must return pointer to work on ios. | ||
func NewTodo(text string) *Todo { | ||
return &Todo{ | ||
Type: "todo", | ||
Text: text, | ||
Done: false, | ||
} | ||
} | ||
|
||
// let Todo implement couchdb.CouchDoc interface | ||
|
||
// GetID returns document ID. | ||
func (t *Todo) GetID() string { | ||
return t.ID | ||
} | ||
|
||
// GetRev returns document revision. | ||
func (t *Todo) GetRev() string { | ||
return t.Rev | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Versions/Current/Resources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Objective-C API for talking to github.com/zemirco/todo/item Go package. | ||
// gobind -lang=objc github.com/zemirco/todo/item | ||
// | ||
// File is generated by gobind. Do not edit. | ||
|
||
#ifndef __GoItem_H__ | ||
#define __GoItem_H__ | ||
|
||
#include <Foundation/Foundation.h> | ||
|
||
@class GoItemTodo; | ||
|
||
@interface GoItemTodo : NSObject { | ||
} | ||
@property(strong, readonly) id _ref; | ||
|
||
- (id)initWithRef:(id)ref; | ||
- (NSString*)id; | ||
- (void)setID:(NSString*)v; | ||
- (NSString*)rev; | ||
- (void)setRev:(NSString*)v; | ||
- (NSString*)type; | ||
- (void)setType:(NSString*)v; | ||
- (NSString*)text; | ||
- (void)setText:(NSString*)v; | ||
- (double)createdAt; | ||
- (void)setCreatedAt:(double)v; | ||
- (BOOL)done; | ||
- (void)setDone:(BOOL)v; | ||
- (NSString*)awesome; | ||
- (void)setAwesome:(NSString*)v; | ||
- (NSString*)getID; | ||
- (NSString*)getRev; | ||
@end | ||
|
||
FOUNDATION_EXPORT GoItemTodo* GoItemNewTodo(NSString* text); | ||
|
||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
framework module "Item" { | ||
header "Item.h" | ||
|
||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+577 Bytes
(100%)
...odeproj/project.xcworkspace/xcuserdata/zemirco.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
import Foundation | ||
|
||
public class Database { | ||
|
||
public class func GetTodos(db: CBLDatabase) { | ||
|
||
} | ||
|
||
} |