Created
June 6, 2021 22:08
-
-
Save agusrichard/1aeba9fdf1e5071c054f40dc0ce020f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type tweetHandler struct { | |
| tweetUsecase usecases.TweetUsecase | |
| } | |
| type TweetHandler interface { | |
| CreateTweet(ctx *gin.Context) *entities.AppResult | |
| // ... another methods | |
| } | |
| func InitializeTweetHandler(usecase usecases.TweetUsecase) TweetHandler { | |
| return &tweetHandler{usecase} | |
| } | |
| func (handler *tweetHandler) CreateTweet(ctx *gin.Context) *entities.AppResult { | |
| // detail implementation here | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment