http

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: 6 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 interface {
	InsertPost(post *p.Post) (*p.Post, error)
	GetPost(id string) (*p.Post, error)
	GetPosts(subreddit string) ([]*p.Post, error)
}

type Server

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

func New

func New(p Posts, s Subreddits) *Server

func (*Server) AddRoutes

func (s *Server) AddRoutes(r *chi.Mux)

type Subreddits

type Subreddits interface {
	InsertSubreddit(subreddit *s.Subreddit) (*s.Subreddit, error)
	GetSubreddit(id string) (*s.Subreddit, error)
	GetSubredditList(ordering string) ([]*s.Subreddit, error)
}

Jump to

Keyboard shortcuts

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