usecase

package
v0.0.0-...-3d1b5a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 6 Imported by: 0

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) PostAutoReplyResponse

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL