Skip to content

Instantly share code, notes, and snippets.

@agusrichard
Created June 6, 2021 22:08
Show Gist options
  • Select an option

  • Save agusrichard/1aeba9fdf1e5071c054f40dc0ce020f9 to your computer and use it in GitHub Desktop.

Select an option

Save agusrichard/1aeba9fdf1e5071c054f40dc0ce020f9 to your computer and use it in GitHub Desktop.
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