Initial commit
This commit is contained in:
commit
c0cb826917
63 changed files with 2069 additions and 0 deletions
13
internal/domain/repository/images_repo.go
Normal file
13
internal/domain/repository/images_repo.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"58team_blog/internal/domain/entities"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type ImagesRepository interface {
|
||||
Create(*entities.Images) error
|
||||
FindById(uuid.UUID) (*entities.Images, error)
|
||||
Delete(uuid.UUID) error
|
||||
}
|
||||
16
internal/domain/repository/post_repo.go
Normal file
16
internal/domain/repository/post_repo.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"58team_blog/internal/domain/entities"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type PostRepository interface {
|
||||
Create(*entities.Post) (*entities.Post, error)
|
||||
FindById(uuid.UUID) (*entities.Post, error)
|
||||
FindAllByUserName(string) ([]*entities.Post, error)
|
||||
GetAll() ([]*entities.Post, error)
|
||||
Update(*entities.Post) error
|
||||
Delete(uuid.UUID) error
|
||||
}
|
||||
17
internal/domain/repository/posts_repo.go
Normal file
17
internal/domain/repository/posts_repo.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"58team_blog/internal/domain/entities"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type PostsRepository interface {
|
||||
Create(*entities.Posts) (*entities.Posts, error)
|
||||
FindById(uuid.UUID) (*entities.Posts, error)
|
||||
FindByPostId(uuid.UUID) (*entities.Posts, error)
|
||||
FindByUserId(uuid.UUID) (*entities.Posts, error)
|
||||
FindAllByUserId(uuid.UUID) ([]*entities.Posts, error)
|
||||
GetAll() ([]*entities.Posts, error)
|
||||
Delete(uuid.UUID) error
|
||||
}
|
||||
16
internal/domain/repository/user_repo.go
Normal file
16
internal/domain/repository/user_repo.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package repository
|
||||
|
||||
import (
|
||||
"58team_blog/internal/domain/entities"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type UsersRepository interface {
|
||||
Create(*entities.User) (*entities.User, error)
|
||||
FindById(uuid.UUID) (*entities.User, error)
|
||||
FindByName(string) (*entities.User, error)
|
||||
GetAll() ([]*entities.User, error)
|
||||
Update(*entities.User) error
|
||||
Delete(uuid.UUID) error
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue