Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateWordHandler ¶
func NewCreateWordHandler(repo Repository) http.Handler
func NewGetAllWordsHandler ¶
func NewGetAllWordsHandler(repo Repository) http.Handler
Types ¶
type CreateWordHandler ¶
type CreateWordHandler struct {
Repository Repository
}
func (CreateWordHandler) Handle ¶
func (h CreateWordHandler) Handle(w http.ResponseWriter, req *http.Request) (interface{}, error)
type Entry ¶
type GetAllWordsHandler ¶
type GetAllWordsHandler struct {
Repository Repository
}
func (GetAllWordsHandler) Handle ¶
func (h GetAllWordsHandler) Handle(_ http.ResponseWriter, _ *http.Request) (interface{}, error)
type PgRepository ¶
type PgRepository struct {
Db infrastructure.DB
}
func (PgRepository) GetAll ¶
func (repo PgRepository) GetAll() ([]Entry, error)
func (PgRepository) Save ¶
func (repo PgRepository) Save(entry Entry) error
type Repository ¶
func NewRepository ¶
func NewRepository(config infrastructure.DbConfig) Repository
Click to show internal directories.
Click to hide internal directories.