Documentation ¶
Index ¶
- Constants
- type BlogService
- func (b *BlogService) CreateBlog(input model.NewBlog, user model.User) (*model.Blog, error)
- func (b *BlogService) DeleteBlog(input model.DeleteBlog, user model.User) bool
- func (b *BlogService) EditBlog(input model.EditBlog, user model.User) (*model.Blog, error)
- func (b *BlogService) GetAllBlogs() []*model.Blog
- func (b *BlogService) GetBlogByID(id string) (*model.Blog, error)
- type UserService
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 (*BlogService) DeleteBlog ¶
func (b *BlogService) DeleteBlog(input model.DeleteBlog, user model.User) bool
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) Login ¶
func (u *UserService) Login(input model.LoginInput) string
Click to show internal directories.
Click to hide internal directories.