Documentation ¶
Index ¶
- Variables
- func NewArticleService(repository *repotypes.Repository, fileService FileService) *articleService
- func NewFileService() *fileService
- func NewMigrationService(artService *articleService, userService *userService) *migrationService
- func NewUserService(repository *repotypes.Repository) *userService
- type ArticleService
- type FileService
- type MigrationService
- type Service
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUserSettings = map[string]string{
"theme": "light",
"language": "en",
}
Functions ¶
func NewArticleService ¶
func NewArticleService(repository *repotypes.Repository, fileService FileService) *articleService
func NewFileService ¶
func NewFileService() *fileService
func NewMigrationService ¶
func NewMigrationService(artService *articleService, userService *userService) *migrationService
func NewUserService ¶
func NewUserService(repository *repotypes.Repository) *userService
Types ¶
type ArticleService ¶
type ArticleService interface { CreateNewArticle(string, string, []byte) (models.Article, error) DeleteArticle(fileName string) error UpdateArticle(fileName string) error //GetArticle(fileName string) (string, error) GetArticleInfo(fileName string) (models.Article, error) GetArticleBody(fileName string) ([]byte, error) GetArticlesList() ([]models.Article, error) }
type FileService ¶
type MigrationService ¶
type MigrationService interface {
Migrate() error
}
type Service ¶
type Service struct { FileService FileService ArticleService ArticleService MigrationService MigrationService UserService UserService // contains filtered or unexported fields }
func NewService ¶
func NewService(repository *repotypes.Repository) *Service
Click to show internal directories.
Click to hide internal directories.