Documentation ¶
Index ¶
- type MockDatastore
- func (ds *MockDatastore) AddReaction(entryAuthor types.Username, entryDate types.EntryDate, reaction types.Reaction) error
- func (ds *MockDatastore) Close() error
- func (ds *MockDatastore) DeleteFollow(leader, follower types.Username) error
- func (ds *MockDatastore) DeleteReaction(entryAuthor types.Username, entryDate types.EntryDate, user types.Username) error
- func (ds *MockDatastore) Following(follower types.Username) ([]types.Username, error)
- func (ds *MockDatastore) GetDraft(username types.Username, date types.EntryDate) (types.JournalEntry, error)
- func (ds *MockDatastore) GetEntries(username types.Username) ([]types.JournalEntry, error)
- func (ds *MockDatastore) GetEntry(username types.Username, date types.EntryDate) (types.JournalEntry, error)
- func (ds *MockDatastore) GetPageViews(path string) (int, error)
- func (ds *MockDatastore) GetPreferences(username types.Username) (types.Preferences, error)
- func (ds *MockDatastore) GetReactions(entryAuthor types.Username, entryDate types.EntryDate) ([]types.Reaction, error)
- func (ds *MockDatastore) GetUserProfile(username types.Username) (types.UserProfile, error)
- func (ds *MockDatastore) InsertDraft(username types.Username, j types.JournalEntry) error
- func (ds *MockDatastore) InsertEntry(username types.Username, j types.JournalEntry) error
- func (ds *MockDatastore) InsertFollow(leader, follower types.Username) error
- func (ds *MockDatastore) InsertPageViews(path string, pageViews int) error
- func (ds *MockDatastore) SetPreferences(username types.Username, prefs types.Preferences) error
- func (ds *MockDatastore) SetUserProfile(username types.Username, p types.UserProfile) error
- func (ds *MockDatastore) Users() ([]types.Username, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDatastore ¶
type MockDatastore struct { JournalEntries []types.JournalEntry JournalDrafts []types.JournalEntry Usernames []types.Username Reactions []types.Reaction UserFollows map[types.Username][]types.Username UserPreferences map[types.Username]types.Preferences PageViewCounts []ga.PageViewCount UserProfile types.UserProfile GetEntriesErr error // contains filtered or unexported fields }
MockDatastore is a mock implementation of the datstore.Datastore interface for testing.
func (*MockDatastore) AddReaction ¶
func (*MockDatastore) Close ¶
func (ds *MockDatastore) Close() error
func (*MockDatastore) DeleteFollow ¶
func (ds *MockDatastore) DeleteFollow(leader, follower types.Username) error
func (*MockDatastore) DeleteReaction ¶
func (*MockDatastore) GetDraft ¶
func (ds *MockDatastore) GetDraft(username types.Username, date types.EntryDate) (types.JournalEntry, error)
func (*MockDatastore) GetEntries ¶
func (ds *MockDatastore) GetEntries(username types.Username) ([]types.JournalEntry, error)
func (*MockDatastore) GetEntry ¶
func (ds *MockDatastore) GetEntry(username types.Username, date types.EntryDate) (types.JournalEntry, error)
func (*MockDatastore) GetPageViews ¶
func (ds *MockDatastore) GetPageViews(path string) (int, error)
func (*MockDatastore) GetPreferences ¶
func (ds *MockDatastore) GetPreferences(username types.Username) (types.Preferences, error)
func (*MockDatastore) GetReactions ¶
func (*MockDatastore) GetUserProfile ¶
func (ds *MockDatastore) GetUserProfile(username types.Username) (types.UserProfile, error)
func (*MockDatastore) InsertDraft ¶
func (ds *MockDatastore) InsertDraft(username types.Username, j types.JournalEntry) error
func (*MockDatastore) InsertEntry ¶
func (ds *MockDatastore) InsertEntry(username types.Username, j types.JournalEntry) error
func (*MockDatastore) InsertFollow ¶
func (ds *MockDatastore) InsertFollow(leader, follower types.Username) error
func (*MockDatastore) InsertPageViews ¶
func (ds *MockDatastore) InsertPageViews(path string, pageViews int) error
func (*MockDatastore) SetPreferences ¶
func (ds *MockDatastore) SetPreferences(username types.Username, prefs types.Preferences) error
func (*MockDatastore) SetUserProfile ¶
func (ds *MockDatastore) SetUserProfile(username types.Username, p types.UserProfile) error
Click to show internal directories.
Click to hide internal directories.