service

package
v0.0.0-...-f2bd8bc Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const BLOG_COLLECTION = "blogs"
View Source
const USER_COLLECTION = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogService

type BlogService struct{}

func (*BlogService) CreateBlog

func (b *BlogService) CreateBlog(input model.NewBlog, user model.User) (*model.Blog, error)

func (*BlogService) DeleteBlog

func (b *BlogService) DeleteBlog(input model.DeleteBlog, user model.User) bool

func (*BlogService) EditBlog

func (b *BlogService) EditBlog(input model.EditBlog, user model.User) (*model.Blog, error)

func (*BlogService) GetAllBlogs

func (b *BlogService) GetAllBlogs() []*model.Blog

func (*BlogService) GetBlogByID

func (b *BlogService) GetBlogByID(id string) (*model.Blog, error)

type UserService

type UserService struct{}

func (*UserService) GetUser

func (u *UserService) GetUser(id string) (*model.User, error)

func (*UserService) Login

func (u *UserService) Login(input model.LoginInput) string

func (*UserService) Register

func (u *UserService) Register(input model.NewUser) string

Jump to

Keyboard shortcuts

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