Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTwitterWebhookRequest ¶
type GetTwitterWebhookRequest struct {
CrcToken string `json:"crc_token" form:"crc_token" binding:"required"`
}
func NewGetTwitterWebhookRequest ¶
func NewGetTwitterWebhookRequest() GetTwitterWebhookRequest
type GetTwitterWebhookResponse ¶
type GetTwitterWebhookResponse struct {
Token string `json:"response_token"`
}
type PostTwitterWebhookRequest ¶
type PostTwitterWebhookRequest struct { UserID string `json:"for_user_id" form:"for_user_id" binding:"required"` TweetCreateEvents []TweetCreateEvent `json:"tweet_create_events" form:"tweet_create_events" binding:"required"` }
func NewPostTwitterWebhookRequest ¶
func NewPostTwitterWebhookRequest() PostTwitterWebhookRequest
type PostTwitterWebhookResponse ¶
type PostTwitterWebhookResponse struct {
SnowResortLabel string `json:"snow_resort"`
}
type ReplyUseCase ¶
type ReplyUseCase interface { GetCrcTokenResponse(GetTwitterWebhookRequest) (GetTwitterWebhookResponse, error) PostAutoReplyResponse(PostTwitterWebhookRequest) (PostTwitterWebhookResponse, error) }
func NewReplyUseCaseImpl ¶
func NewReplyUseCaseImpl(rs domain.ReplyService) ReplyUseCase
type ReplyUseCaseImpl ¶
type ReplyUseCaseImpl struct {
ReplyService domain.ReplyService
}
func (ReplyUseCaseImpl) GetCrcTokenResponse ¶
func (tu ReplyUseCaseImpl) GetCrcTokenResponse(req GetTwitterWebhookRequest) (GetTwitterWebhookResponse, error)
TwitterのWebhookの認証に用いる ref: https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/guides/securing-webhooks
func (ReplyUseCaseImpl) PostAutoReplyResponse ¶
func (tu ReplyUseCaseImpl) PostAutoReplyResponse(req PostTwitterWebhookRequest) (PostTwitterWebhookResponse, error)
type TweetCreateEvent ¶
type TweetCreateEvent struct { TweetID int64 `json:"id" form:"id" binding:"required"` TweetIDStr string `json:"id_str" form:"id_str" binding:"required"` Text string `json:"text" form:"text" binding:"required"` User struct { UserID int64 `json:"id" form:"id" binding:"required"` IDStr string `json:"id_str" form:"id_str" binding:"required"` ScreenName string `json:"screen_name" form:"screen_name" binding:"required"` } `json:"user" form:"user" binding:"required"` }
Click to show internal directories.
Click to hide internal directories.