Created
August 27, 2016 16:03
-
-
Save mrkaspa/b634754ad86619199574ce620600caba 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 | |
type mockPersistor struct { | |
} | |
func NewMockPersistor() Persistance { | |
return mockPersistor{} | |
} | |
func (p mockPersistor) PersistAndFind(sn StrokeNear) ([]Stroke, error) { | |
return []Stroke{ | |
{ | |
UserID: "a2", | |
Info: "a2", | |
Location: []float64{-79.38066843, 43.65483486}, | |
}, | |
}, nil | |
} | |
func (p mockPersistor) Persist(s Stroke) error { | |
return nil | |
} | |
func (p mockPersistor) FindStrokes(username string) ([]Stroke, error) { | |
return []Stroke{ | |
{ | |
UserID: "a1", | |
Info: "a1", | |
Location: []float64{-79.38066843, 43.65483486}, | |
}, | |
}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment