feat: fix lint and new nill functions
This commit is contained in:
@@ -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
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user