Last active
August 26, 2016 15:41
-
-
Save mrkaspa/9b81fa443bb43ce7c5682cf299d0c692 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package models | |
| import ( | |
| "time" | |
| "github.com/mrkaspa/geoserver/utils" | |
| "gopkg.in/mgo.v2/bson" | |
| ) | |
| type Persistance interface { | |
| PersistAndFind(StrokeNear) ([]Stroke, error) | |
| Persist(Stroke) error | |
| FindStrokes(string) ([]Stroke, error) | |
| } | |
| // Persistor takes care of persisting strokes and finding near ones | |
| type persistor struct { | |
| } | |
| func NewPersistor() Persistance { | |
| return persistor{} | |
| } | |
| func (p persistor) PersistAndFind(sn StrokeNear) ([]Stroke, error) { | |
| } | |
| func (p persistor) Persist(s Stroke) error { | |
| } | |
| func (p persistor) FindStrokes(username string) ([]Stroke, error) { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment