Documentation ¶
Index ¶
- func GetAllArticlesHandler(s storage.ArticleStorage, logger logr.Logger) http.HandlerFunc
- func GetArticleByIdHandler(s storage.ArticleStorage, logger logr.Logger) http.HandlerFunc
- func ListenAndServe(v *viper.Viper, s storage.ArticleStorage, logger logr.Logger) error
- func MakeErrorArticleDetailed(msg string) types.ArticleDetailed
- func MakeErrorArticleList(msg string) types.ArticleList
- func MakeSuccessArticleDetailed(data types.Article) types.ArticleDetailed
- func MakeSuccessArticleList(data []types.Article) types.ArticleList
- type WithMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllArticlesHandler ¶
func GetAllArticlesHandler(s storage.ArticleStorage, logger logr.Logger) http.HandlerFunc
func GetArticleByIdHandler ¶
func GetArticleByIdHandler(s storage.ArticleStorage, logger logr.Logger) http.HandlerFunc
func ListenAndServe ¶
func MakeErrorArticleDetailed ¶
func MakeErrorArticleDetailed(msg string) types.ArticleDetailed
func MakeErrorArticleList ¶
func MakeErrorArticleList(msg string) types.ArticleList
func MakeSuccessArticleDetailed ¶
func MakeSuccessArticleDetailed(data types.Article) types.ArticleDetailed
func MakeSuccessArticleList ¶
func MakeSuccessArticleList(data []types.Article) types.ArticleList
Types ¶
type WithMessage ¶
type WithMessage interface {
GetMessage() string
}
Click to show internal directories.
Click to hide internal directories.