author

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewController

func NewController(
	authMFunc network.AuthenticationProvider,
	authorizeMFunc network.AuthorizationProvider,
	service Service,
) network.Controller

Types

type Service

type Service interface {
	CreateBlog(createBlogDto *dto.CreateBlog, author *userModel.User) (*dto.PrivateBlog, error)
	UpdateBlog(updateBlogDto *dto.UpdateBlog, author *userModel.User) (*dto.PrivateBlog, error)
	DeactivateBlog(blogId primitive.ObjectID, author *userModel.User) error
	BlogSubmission(blogId primitive.ObjectID, author *userModel.User, submit bool) error
	GetBlogById(id primitive.ObjectID, author *userModel.User) (*dto.PrivateBlog, error)
	GetPaginatedDrafts(author *userModel.User, p *coredto.Pagination) ([]*dto.InfoBlog, error)
	GetPaginatedPublished(author *userModel.User, p *coredto.Pagination) ([]*dto.InfoBlog, error)
	GetPaginatedSubmitted(author *userModel.User, p *coredto.Pagination) ([]*dto.InfoBlog, error)
	// contains filtered or unexported methods
}

func NewService

func NewService(db mongo.Database, blogService blog.Service) Service

Jump to

Keyboard shortcuts

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