Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(s IService, store *session.Store) *Controller
func (*Controller) AddPost ¶
func (uc *Controller) AddPost(c *fiber.Ctx) error
func (*Controller) GetAll ¶
func (uc *Controller) GetAll() []Post
type IRepository ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx context.Context, client *mongo.Client) *Repository
func (*Repository) GetAllPosts ¶
func (r *Repository) GetAllPosts() []Post
func (*Repository) Upsert ¶
func (r *Repository) Upsert(post *Post) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(r IRepository) *Service
func (*Service) GetAllPosts ¶
Click to show internal directories.
Click to hide internal directories.