Documentation ¶
Index ¶
- type CreateReplyInput
- type CreateReplyService
- type CreateTweetInput
- type CreateTweetService
- type FavoriteTweetService
- type GetTweetOutput
- type GetTweetService
- type ListTweetFeedOutput
- type ListTweetFeedService
- type ListTweetRepliesOutput
- type ListTweetRepliesService
- type RetweetService
- type SearchTweetOutput
- type SearchTweetService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateReplyInput ¶
type CreateReplyInput struct {
Content string `json:"content" validate:"required,max=300"`
}
func (CreateReplyInput) Validate ¶
func (i CreateReplyInput) Validate() []*validator.ValidationError
type CreateReplyService ¶
type CreateReplyService interface {
Execute(input CreateReplyInput, userID int64, tweetID int64) error
}
func NewCreateReplyService ¶
func NewCreateReplyService(db database.Database) CreateReplyService
type CreateTweetInput ¶
type CreateTweetInput struct {
Content string `json:"content" form:"content" validate:"required,max=300"`
}
func (CreateTweetInput) Validate ¶
func (i CreateTweetInput) Validate() []*validator.ValidationError
type CreateTweetService ¶
type CreateTweetService interface {
Execute(input CreateTweetInput, photos []*multipart.FileHeader, userID int64) error
}
func NewCreateTweetService ¶
func NewCreateTweetService(db database.Database, s3 *aws.S3Bucket) CreateTweetService
type FavoriteTweetService ¶
func NewFavoriteTweetService ¶
func NewFavoriteTweetService(db database.Database) FavoriteTweetService
type GetTweetOutput ¶
type GetTweetService ¶
type GetTweetService interface {
Execute(userID, tweetID int64) (GetTweetOutput, error)
}
func NewGetTweetService ¶
func NewGetTweetService(db database.Database) GetTweetService
type ListTweetFeedOutput ¶
type ListTweetFeedOutput struct { entity.Tweet AuthorName string `json:"author_name"` AuthorHandle string `json:"author_handle"` AuthorPhotoURL string `json:"author_photo_url"` Reply *entity.Reply `json:"replied_to,omitempty"` IsReply bool `json:"is_reply"` AlreadyLiked bool `json:"already_liked"` IsRetweet bool `json:"is_retweet"` RetweetAuthorHandle string `json:"retweet_author_handle"` AlreadyRetweeted bool `json:"already_retweeted"` }
type ListTweetFeedService ¶
type ListTweetFeedService interface {
Execute(userID int64, createdAtCursor string) ([]ListTweetFeedOutput, error)
}
func NewListTweetFeedService ¶
func NewListTweetFeedService(db database.Database) ListTweetFeedService
type ListTweetRepliesOutput ¶
type ListTweetRepliesService ¶
type ListTweetRepliesService interface {
Execute(tweetID int64, createdAtCursor string) ([]ListTweetRepliesOutput, error)
}
func NewListTweetRepliesService ¶
func NewListTweetRepliesService(db database.Database) ListTweetRepliesService
type RetweetService ¶
func NewRetweetService ¶
func NewRetweetService(db database.Database) RetweetService
type SearchTweetOutput ¶
type SearchTweetOutput struct { entity.Tweet AuthorName string `json:"author_name"` AuthorHandle string `json:"author_handle"` AuthorPhotoURL string `json:"author_photo_url"` Reply *entity.Reply `json:"replied_to,omitempty"` IsReply bool `json:"is_reply"` Rank float64 `json:"rank"` AlreadyLiked bool `json:"already_liked"` }
type SearchTweetService ¶
type SearchTweetService interface {
Execute(searchQuery string, userID int64, cursor string) ([]SearchTweetOutput, error)
}
func NewSearchTweetService ¶
func NewSearchTweetService(db database.Database) SearchTweetService
Click to show internal directories.
Click to hide internal directories.