Documentation
¶
Index ¶
- Variables
- func NewAdminAuthUseCase(cfg *config.Config, adminRepo repo.AdminRepo, ...) usecase.AdminAuth
- func NewAdminRepo(pg *postgres.Postgres) repo.AdminRepo
- func NewAdminTwoFASetupStore(r *redis.Redis) repo.AdminTwoFASetupStore
- func NewAuthUseCase(adminAuth usecase.AdminAuth, userAuth usecase.UserAuth) usecase.Auth
- func NewCaptchaGenerator(cfg *config.Config) captcha.Generator
- func NewCaptchaStore(r *redis.Redis) repo.CaptchaStore
- func NewCaptchaUseCase(gen captcha.Generator, store repo.CaptchaStore) usecase.Captcha
- func NewCategoryRepo(pg *postgres.Postgres) repo.CategoryRepo
- func NewCommentLikeRepo(pg *postgres.Postgres) repo.CommentLikeRepo
- func NewCommentRepo(pg *postgres.Postgres) repo.CommentRepo
- func NewCommentUseCase(commentRepo repo.CommentRepo, commentLikeRepo repo.CommentLikeRepo, ...) usecase.Comment
- func NewContentUseCase(translationAPI repo.TranslationWebAPI, llmAPI repo.LLMWebAPI, ...) usecase.Content
- func NewEmailCodeStore(r *redis.Redis) repo.EmailCodeStore
- func NewEmailSender(cfg *config.Config) repo.EmailSender
- func NewEmailUseCase(sender repo.EmailSender, codeStore repo.EmailCodeStore) usecase.Email
- func NewFeedbackRepo(pg *postgres.Postgres) repo.FeedbackRepo
- func NewFeedbackUseCase(feedbackRepo repo.FeedbackRepo) usecase.Feedback
- func NewFileRepo(pg *postgres.Postgres) repo.FileRepo
- func NewFileUseCase(cfg *config.Config, objectStore repo.ObjectStore, fileRepo repo.FileRepo) usecase.File
- func NewLLMWebAPI(cfg *config.Config) repo.LLMWebAPI
- func NewLinkRepo(pg *postgres.Postgres) repo.LinkRepo
- func NewLinkUseCase(linkRepo repo.LinkRepo) usecase.Link
- func NewLogger(cfg *config.Config) logger.Interface
- func NewMinioClient(cfg *config.Config) (*minio.Client, error)
- func NewNotificationRepo(pg *postgres.Postgres) repo.NotificationRepo
- func NewNotificationUseCase(notificationRepo repo.NotificationRepo, notifier repo.Notifier, ...) usecase.Notification
- func NewNotifier(notificationRepo repo.NotificationRepo, hub *ssehub.Hub) repo.Notifier
- func NewObjectStore(cli *minio.Client) repo.ObjectStore
- func NewPostLikeRepo(pg *postgres.Postgres) repo.PostLikeRepo
- func NewPostRepo(pg *postgres.Postgres) repo.PostRepo
- func NewPostViewRepo(pg *postgres.Postgres, l logger.Interface) (repo.PostViewRepo, func())
- func NewPostgres(cfg *config.Config) (*postgres.Postgres, func(), error)
- func NewRedis(cfg *config.Config) (*redis.Redis, func(), error)
- func NewRefreshTokenBlacklistRepo(pg *postgres.Postgres) repo.RefreshTokenBlacklistRepo
- func NewRefreshTokenStore(r *redis.Redis) repo.RefreshTokenStore
- func NewSSEHub() *ssehub.Hub
- func NewSettingUseCase(settingRepo repo.SiteSettingRepo) usecase.Setting
- func NewSiteSettingRepo(pg *postgres.Postgres) repo.SiteSettingRepo
- func NewTagRepo(pg *postgres.Postgres) repo.TagRepo
- func NewTokenSigner(cfg *config.Config) (user.TokenSigner, error)
- func NewTranslationWebAPI() repo.TranslationWebAPI
- func NewUserAuthUseCase(userRepo repo.UserRepo, signer user.TokenSigner, ...) usecase.UserAuth
- func NewUserRepo(pg *postgres.Postgres) repo.UserRepo
- func NewUserUseCase(userRepo repo.UserRepo) usecase.User
- func Run(cfg *config.Config)
- func SetupHTTPServer(cfg *config.Config, l logger.Interface, auth2 usecase.Auth, ...) *httpserver.Server
- type App
- type AppInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewAppInfo, NewLogger, NewApp, NewPostgres, NewRedis, NewMinioClient, NewAdminRepo, NewUserRepo, NewPostRepo, NewTagRepo, NewCategoryRepo, NewCommentRepo, NewPostLikeRepo, NewCommentLikeRepo, NewFeedbackRepo, NewLinkRepo, NewSiteSettingRepo, NewFileRepo, NewNotificationRepo, NewRefreshTokenBlacklistRepo, NewPostViewRepo, NewCaptchaStore, NewEmailCodeStore, NewRefreshTokenStore, NewAdminTwoFASetupStore, NewObjectStore, NewEmailSender, NewTranslationWebAPI, NewLLMWebAPI, NewTokenSigner, NewAdminAuthUseCase, NewUserAuthUseCase, NewAuthUseCase, NewCaptchaGenerator, NewCaptchaUseCase, NewEmailUseCase, NewFileUseCase, NewUserUseCase, NewContentUseCase, NewCommentUseCase, NewFeedbackUseCase, NewLinkUseCase, NewSettingUseCase, NewSSEHub, NewNotifier, NewNotificationUseCase, SetupHTTPServer, )
ProviderSet is the Wire provider set for the application.
Functions ¶
func NewAdminAuthUseCase ¶
func NewAdminTwoFASetupStore ¶
func NewAdminTwoFASetupStore(r *redis.Redis) repo.AdminTwoFASetupStore
func NewAuthUseCase ¶
func NewCaptchaStore ¶
func NewCaptchaStore(r *redis.Redis) repo.CaptchaStore
func NewCaptchaUseCase ¶
func NewCategoryRepo ¶
func NewCategoryRepo(pg *postgres.Postgres) repo.CategoryRepo
func NewCommentLikeRepo ¶
func NewCommentLikeRepo(pg *postgres.Postgres) repo.CommentLikeRepo
func NewCommentRepo ¶
func NewCommentRepo(pg *postgres.Postgres) repo.CommentRepo
func NewCommentUseCase ¶
func NewContentUseCase ¶
func NewContentUseCase(translationAPI repo.TranslationWebAPI, llmAPI repo.LLMWebAPI, adminRepo repo.AdminRepo, postRepo repo.PostRepo, tagRepo repo.TagRepo, categoryRepo repo.CategoryRepo, postLikeRepo repo.PostLikeRepo, fileRepo repo.FileRepo, postViewRepo repo.PostViewRepo) usecase.Content
func NewEmailCodeStore ¶
func NewEmailCodeStore(r *redis.Redis) repo.EmailCodeStore
func NewEmailSender ¶
func NewEmailSender(cfg *config.Config) repo.EmailSender
func NewEmailUseCase ¶
func NewEmailUseCase(sender repo.EmailSender, codeStore repo.EmailCodeStore) usecase.Email
func NewFeedbackRepo ¶
func NewFeedbackRepo(pg *postgres.Postgres) repo.FeedbackRepo
func NewFeedbackUseCase ¶
func NewFeedbackUseCase(feedbackRepo repo.FeedbackRepo) usecase.Feedback
func NewFileUseCase ¶
func NewMinioClient ¶
NewMinioClient initializes MinIO client and ensures default bucket exists.
func NewNotificationRepo ¶
func NewNotificationRepo(pg *postgres.Postgres) repo.NotificationRepo
func NewNotificationUseCase ¶
func NewNotificationUseCase(notificationRepo repo.NotificationRepo, notifier repo.Notifier, hub *ssehub.Hub) usecase.Notification
func NewNotifier ¶
func NewObjectStore ¶
func NewObjectStore(cli *minio.Client) repo.ObjectStore
func NewPostLikeRepo ¶
func NewPostLikeRepo(pg *postgres.Postgres) repo.PostLikeRepo
func NewPostViewRepo ¶
func NewPostgres ¶
NewPostgres creates a new postgres connection with cleanup.
func NewRefreshTokenBlacklistRepo ¶
func NewRefreshTokenBlacklistRepo(pg *postgres.Postgres) repo.RefreshTokenBlacklistRepo
func NewRefreshTokenStore ¶
func NewRefreshTokenStore(r *redis.Redis) repo.RefreshTokenStore
func NewSettingUseCase ¶
func NewSettingUseCase(settingRepo repo.SiteSettingRepo) usecase.Setting
func NewSiteSettingRepo ¶
func NewSiteSettingRepo(pg *postgres.Postgres) repo.SiteSettingRepo
func NewTokenSigner ¶
func NewTokenSigner(cfg *config.Config) (user.TokenSigner, error)
func NewTranslationWebAPI ¶
func NewTranslationWebAPI() repo.TranslationWebAPI
func NewUserAuthUseCase ¶
func NewUserAuthUseCase(userRepo repo.UserRepo, signer user.TokenSigner, refreshStore repo.RefreshTokenStore, refreshBlacklist repo.RefreshTokenBlacklistRepo) usecase.UserAuth
func SetupHTTPServer ¶
func SetupHTTPServer( cfg *config.Config, l logger.Interface, auth2 usecase.Auth, captchaUC usecase.Captcha, emailUC usecase.Email, signer user.TokenSigner, fileUC usecase.File, userUC usecase.User, contentUC usecase.Content, commentUC usecase.Comment, feedbackUC usecase.Feedback, linkUC usecase.Link, settingUC usecase.Setting, notificationUC usecase.Notification, ) *httpserver.Server
Types ¶
Click to show internal directories.
Click to hide internal directories.