Versions in this module Expand all Collapse all v0 v0.1.0 Feb 10, 2024 Changes in this version + func NewMySql(cfg *config.DBConfig) (*sqlx.DB, error) + type CommentRepository interface + Create func(postId int, input model.CommentInput) (int, error) + DeleteById func(commentId int) error + GetAll func(postId int) ([]model.Comment, error) + UpdateById func(commentId int, input model.CommentInput) error + type PostRepository interface + Create func(input model.PostInput) (int, error) + DeleteById func(postId int) error + GetAll func() ([]model.Post, error) + GetById func(postId int) (model.Post, error) + UpdateById func(postId int, input model.PostInput) error + type Repository struct + func New(db *sqlx.DB) *Repository + type UserRepository interface + Create func(input model.UserInput) (int, error) + DeleteById func(userId int) error + Get func(email string) (model.User, error) + GetAll func() ([]model.UserOutput, error) + GetById func(userId int) (model.UserOutput, error) + UpdateById func(userId int, input model.UserInput) error