Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoteRepo ¶
type NoteRepo interface { Create(ctx *gin.Context, note *models.Note) error Read(ctx *gin.Context, note *models.Note) error ReadByUserName(ctx *gin.Context, user string) ([]models.Note, error) ReadAll(ctx *gin.Context) ([]models.Note, error) Update(ctx *gin.Context, note models.Note) (models.Note, error) Delete(ctx *gin.Context, note *models.Note) error DeleteAllByUserName(ctx *gin.Context, username string) error VerifyPassword(ctx *gin.Context, username, password string) (bool, error) }
func NewNoteRepo ¶
NewNoteRepo initializes the note repository
type UserRepo ¶ added in v0.1.0
type UserRepo interface { // CreateUser creates a new user CreateUser(user *models.User) error // GetUserByID returns a user by id GetUser(id int) (models.User, error) // GetUsers returns all users GetUsers() ([]models.User, error) // GetUserByUsername returns a user by username GetUserByUsername(username string) (models.User, error) // GetUserByEmail returns a user by email GetUserByEmail(email string) (models.User, error) // UpdateUser updates an existing user UpdateUser(user *models.User) error // DeleteUser deletes an existing user DeleteUser(id uint) error }
UserRepo is a repository for users
func NewUserRepo ¶ added in v0.1.0
NewUserRepo initializes a new user repository
Click to show internal directories.
Click to hide internal directories.