changes...
This commit is contained in:
parent
41944884b4
commit
ab4b53fd40
26 changed files with 600 additions and 51 deletions
15
internal/application/errors/db_error.go
Normal file
15
internal/application/errors/db_error.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package errors
|
||||
|
||||
type DBError struct {
|
||||
msg string
|
||||
}
|
||||
|
||||
func NewDBError(msg string) DBError {
|
||||
return DBError{
|
||||
msg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *DBError) Error() string {
|
||||
return e.msg
|
||||
}
|
||||
15
internal/application/errors/not_found_error.go
Normal file
15
internal/application/errors/not_found_error.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package errors
|
||||
|
||||
type NotFoundError struct {
|
||||
msg string
|
||||
}
|
||||
|
||||
func NewNotFoundError(msg string) *NotFoundError {
|
||||
return &NotFoundError{
|
||||
msg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *NotFoundError) Error() string {
|
||||
return e.msg
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue