blog

package
v0.0.0-...-8057e55 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID       primitive.ObjectID `bson:"_d, omitempty"`
	AuthorID string             `bson:"author_id"`
	Content  string             `bson:"content"`
	Title    string             `bson:"title"`
}

Item is an itemized blog post

type Server

type Server struct {
	Collection *mongo.Collection
}

Server is an implementation of the Blog RPC proto

func (Server) CreateBlog

CreateBlog creates a blog entry

func (Server) DeleteBlog

DeleteBlog deletes a blog by blog_id

func (Server) ListBlog

ListBlog lists all blog posts

func (Server) ReadBlog

ReadBlog takes in a blog id, and returns a Blog

func (Server) UpdateBlog

UpdateBlog updates a blog post

Jump to

Keyboard shortcuts

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