posts

package
v0.0.0-...-d0177a8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Posts

type Posts struct {
	// contains filtered or unexported fields
}

func New

func New(s Store) *Posts

func (*Posts) GetPost

func (p *Posts) GetPost(id string) (*model.Post, error)

func (*Posts) GetPosts

func (p *Posts) GetPosts(subreddit string) ([]*model.Post, error)

func (*Posts) InsertPost

func (p *Posts) InsertPost(post *model.Post) (*model.Post, error)

type Store

type Store interface {
	InsertPost(post *model.Post) (*model.Post, error)
	GetPost(id string) (*model.Post, error)
	GetPosts(subreddit string) ([]*model.Post, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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