regular

package
v0.0.0-...-ea9379f Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 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 Service

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

Service represents the regular service layer for blog posts.

func New

func New(repo postRepo.Repo) Service

New creates a new instance of the regular service layer for blog posts.

func (*Service) Create

func (service *Service) Create(post model.BlogPost) gloBalModel.Response

Create creates a new blog post.

func (*Service) Delete

func (service *Service) Delete(id string) gloBalModel.Response

Delete deletes a blog post.

func (*Service) Get

func (service *Service) Get(id string) gloBalModel.Response

Get fetches a blog post.

func (*Service) GetAll

func (service *Service) GetAll() gloBalModel.Response

GetAll fetches all blog posts (limit is 10).

func (*Service) GetMore

func (service *Service) GetMore(lastID string) gloBalModel.Response

GetMore fetches more blog posts (limit is 10).

func (*Service) Update

func (service *Service) Update(post model.BlogPost) gloBalModel.Response

Update updates an existing blog post.

Jump to

Keyboard shortcuts

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