libtodolite

package
v0.0.0-...-6c1febb Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Task    = "task"
	List    = "list"
	Profile = "profile"
)

Variables

This section is empty.

Functions

func ConfigMiddleware

func ConfigMiddleware(databaseURL string) func(*Context, web.ResponseWriter, *web.Request, web.NextMiddlewareFunc)

Types

type Attachments

type Attachments map[string]interface{}

type Context

type Context struct {
	Database    *couch.Database
	DatabaseURL string
}

func (*Context) ChangesFeed

func (c *Context) ChangesFeed(rw web.ResponseWriter, req *web.Request)

func (*Context) ConnectToSyncGw

func (c *Context) ConnectToSyncGw(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)

func (*Context) Root

func (c *Context) Root(rw web.ResponseWriter, req *web.Request)

func (*Context) WebhookReceiver

func (c *Context) WebhookReceiver(rw web.ResponseWriter, req *web.Request)

type TodoItem

type TodoItem struct {
	Revision    string      `json:"_rev"`
	Id          string      `json:"_id"`
	Checked     bool        `json:"checked"`
	CreatedAt   string      `json:"created_at"`
	ListId      string      `json:"list_id"`
	Title       string      `json:"title"`
	Type        string      `json:"type"`
	OcrDecoded  string      `json:"ocr_decoded"`
	Attachments Attachments `json:"_attachments"`
}

func (TodoItem) AttachmentUrl

func (t TodoItem) AttachmentUrl(dbUrl string) string

type TodoList

type TodoList struct {
	Revision  string   `json:"_rev"`
	Id        string   `json:"_id"`
	Checked   bool     `json:"checked"`
	CreatedAt string   `json:"created_at"`
	Title     string   `json:"title"`
	Type      string   `json:"type"`
	UpdatedAt string   `json:"updated_at"`
	Owner     string   `json:"owner"`
	Members   []string `json:"members"`
}

type TodoLiteApp

type TodoLiteApp struct {
	DatabaseURL string
	OpenOCRURL  string
	Database    couch.Database
}

func NewTodoLiteApp

func NewTodoLiteApp(DatabaseURL, openOCRURL string) *TodoLiteApp

func (TodoLiteApp) FollowChangesFeed

func (t TodoLiteApp) FollowChangesFeed(startingSince string)

func (*TodoLiteApp) InitApp

func (t *TodoLiteApp) InitApp() error

type TodoProfile

type TodoProfile struct {
	Revision    string `json:"_rev"`
	Id          string `json:"_id"`
	Type        string `json:"type"`
	FacebookId  string `json:"id"`
	UserId      string `json:"user_id"`
	Name        string `json:"name"`
	AccessToken string `json:"access_token"`
}

type TodoliteChange

type TodoliteChange struct {
	Sequence    interface{}        `json:"seq"`
	Id          string             `json:"id"`
	ChangedRevs []couch.ChangedRev `json:"changes"`
	Deleted     bool               `json:"deleted"`
	Type        string
	Title       string
	Parent      string // The parent list, or N/A
}

func NewTodoLiteChange

func NewTodoLiteChange(database couch.Database, change couch.Change) *TodoliteChange

type TodoliteChanges

type TodoliteChanges struct {
	Changes      []TodoliteChange `json:"results"`
	LastSequence interface{}      `json:"last_seq"`
}

Jump to

Keyboard shortcuts

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