entries

package
v0.0.0-...-523796e Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryStore

type EntryStore interface {
	// Users returns all the users who have published entries.
	Users() ([]types.Username, error)
	// GetEntries returns all published entries for the given user.
	GetEntries(username types.Username) ([]types.JournalEntry, error)
	// GetReactions retrieves reader reactions associated with a published entry.
	// Followers returns all the users the specified user is following.
	Following(follower types.Username) ([]types.Username, error)
}

EntryStore stores information related to journal entries.

type Reader

type Reader interface {
	// Recent returns the recent entries in the store.
	Recent(start, limit int) ([]RecentEntry, error)
	// RecentFollowing returns recent entries from among users that the specified
	// user is following.
	RecentFollowing(username types.Username, start, limit int) ([]RecentEntry, error)
}

Reader reads journal entries.

func NewReader

func NewReader(store EntryStore) Reader

NewReader creates a new entries.Reader.

type RecentEntry

type RecentEntry struct {
	Author       types.Username
	Date         types.EntryDate
	LastModified string
	Markdown     string
}

RecentEntry stores data about a journal entry.

Jump to

Keyboard shortcuts

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