handler

package
v0.0.0-...-03f7ad7 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

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

Post ...

func NewPostHandler

func NewPostHandler(db *driver.DB) *Post

NewPostHandler ...

func (*Post) CreatePost

func (p *Post) CreatePost(w http.ResponseWriter, r *http.Request)

CreatePost a new post

func (*Post) Delete

func (p *Post) Delete(w http.ResponseWriter, r *http.Request)

Delete a post

func (*Post) UpdatePost

func (p *Post) UpdatePost(w http.ResponseWriter, r *http.Request)

UpdatePost a post by id

func (*Post) ViewAllPosts

func (p *Post) ViewAllPosts(w http.ResponseWriter, r *http.Request)

ViewAllPosts all post data

func (*Post) ViewPost

func (p *Post) ViewPost(w http.ResponseWriter, r *http.Request)

ViewPost returns a post details

Jump to

Keyboard shortcuts

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