feat: fix lint and new nill functions

This commit is contained in:
d3m0k1d
2026-02-18 13:30:16 +03:00
parent 81446e56f5
commit 5a375d67c7
2 changed files with 21 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package repositories
import ( import (
"context" "context"
"database/sql" "database/sql"
"gitea.d3m0k1d.ru/d3m0k1d/d3m0k1d.ru/backend/internal/logger" "gitea.d3m0k1d.ru/d3m0k1d/d3m0k1d.ru/backend/internal/logger"
"gitea.d3m0k1d.ru/d3m0k1d/d3m0k1d.ru/backend/internal/storage" "gitea.d3m0k1d.ru/d3m0k1d/d3m0k1d.ru/backend/internal/storage"
@@ -23,3 +24,19 @@ func NewCommentsRepository(db *sql.DB) CommentRepository {
func (c *commentsRepository) CreateComment(ctx context.Context, comment *storage.Comment) error { func (c *commentsRepository) CreateComment(ctx context.Context, comment *storage.Comment) error {
return nil return nil
} }
func (c *commentsRepository) GetAllComments(ctx context.Context) ([]storage.Comment, error) {
return nil, nil
}
func (c *commentsRepository) GetCommentsOfPost(ctx context.Context, id int) ([]storage.Comment, error) {
return nil, nil
}
func (c *commentsRepository) DeleteComment(ctx context.Context, id int) error {
return nil
}
func (c *commentsRepository) UpdateComment(ctx context.Context, id int, comment *storage.Comment) error {
return nil
}

View File

@@ -25,4 +25,8 @@ type AuthRepository interface {
type CommentRepository interface { type CommentRepository interface {
CreateComment(ctx context.Context, comment *storage.Comment) error CreateComment(ctx context.Context, comment *storage.Comment) error
GetAllComments(ctx context.Context) ([]storage.Comment, error)
GetCommentsOfPost(ctx context.Context, id int) ([]storage.Comment, error)
DeleteComment(ctx context.Context, id int) error
UpdateComment(ctx context.Context, id int, comment *storage.Comment) error
} }