Skip to content

Instantly share code, notes, and snippets.

@mrkaspa
Last active August 26, 2016 15:41
Show Gist options
  • Select an option

  • Save mrkaspa/9b81fa443bb43ce7c5682cf299d0c692 to your computer and use it in GitHub Desktop.

Select an option

Save mrkaspa/9b81fa443bb43ce7c5682cf299d0c692 to your computer and use it in GitHub Desktop.
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