mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 00:31:35 +00:00
This commit introduces a new blog feature by implementing a JSON schema for blog posts and providing five example content files. Key changes: - Created a new directory structure for schemas and content (`schemas/`, `content/blog/`). - Implemented a JSON schema for blog posts, split into `blog.json` and `_defs.json` for reusability. - Added five example blog post files with full, realistic content. - Included a Python script (`validate.py`) to validate the example content against the schema.
45 lines
1.6 KiB
Go
45 lines
1.6 KiB
Go
package app
|
|
|
|
import (
|
|
"tercul/internal/app/analytics"
|
|
"tercul/internal/app/auth"
|
|
"tercul/internal/app/copyright"
|
|
"tercul/internal/app/localization"
|
|
"tercul/internal/app/monetization"
|
|
"tercul/internal/app/search"
|
|
"tercul/internal/app/work"
|
|
"tercul/internal/domain"
|
|
)
|
|
|
|
// Application is a container for all the application-layer services.
|
|
// It's used for dependency injection into the presentation layer (e.g., GraphQL resolvers).
|
|
type Application struct {
|
|
AnalyticsService analytics.Service
|
|
AuthCommands *auth.AuthCommands
|
|
AuthQueries *auth.AuthQueries
|
|
CopyrightCommands *copyright.CopyrightCommands
|
|
CopyrightQueries *copyright.CopyrightQueries
|
|
Localization localization.Service
|
|
Search search.IndexService
|
|
WorkCommands *work.WorkCommands
|
|
WorkQueries *work.WorkQueries
|
|
|
|
// Repositories - to be refactored into app services
|
|
AuthorRepo domain.AuthorRepository
|
|
UserRepo domain.UserRepository
|
|
TagRepo domain.TagRepository
|
|
CategoryRepo domain.CategoryRepository
|
|
BookRepo domain.BookRepository
|
|
PublisherRepo domain.PublisherRepository
|
|
SourceRepo domain.SourceRepository
|
|
MonetizationQueries *monetization.MonetizationQueries
|
|
MonetizationCommands *monetization.MonetizationCommands
|
|
TranslationRepo domain.TranslationRepository
|
|
CopyrightRepo domain.CopyrightRepository
|
|
MonetizationRepo domain.MonetizationRepository
|
|
CommentRepo domain.CommentRepository
|
|
LikeRepo domain.LikeRepository
|
|
BookmarkRepo domain.BookmarkRepository
|
|
CollectionRepo domain.CollectionRepository
|
|
}
|