Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUserOutput ¶
type GetUserOutput struct { ID int64 `json:"id"` Name string `json:"name"` Handle string `json:"handle"` Bio string `json:"bio"` Location string `json:"location"` Website string `json:"website"` BirthDate time.Time `json:"birth_date"` FollowersCount int `json:"followers_count"` FollowingsCount int `json:"followings_count"` IsFollowing bool `json:"is_following"` PhotoURL string `json:"photo_url"` JoinedAt time.Time `json:"joined_at"` }
type GetUserService ¶
type GetUserService interface {
Execute(userID int64, username string) (GetUserOutput, error)
}
func NewGetUserService ¶
func NewGetUserService(db database.Database) GetUserService
type ListUserTweetsOutput ¶
type ListUserTweetsOutput 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 ListUserTweetsService ¶
type ListUserTweetsService interface {
Execute(userID int64, username string, createdAtCursor string) ([]ListUserTweetsOutput, error)
}
func NewListUserTweetsService ¶
func NewListUserTweetsService(db database.Database) ListUserTweetsService
type RegisterInput ¶
type RegisterInput struct { Handle string `json:"handle" validate:"required,excludesall= !@#$%^&*()\,.?\":{}|<>"` Email string `json:"email" validate:"required,email"` Password string `json:"password" validate:"required"` }
func (RegisterInput) Validate ¶
func (i RegisterInput) Validate() []*validator.ValidationError
type RegisterService ¶
type RegisterService interface {
Execute(input RegisterInput) (*token.AccessToken, *token.RefreshToken, error)
}
func NewRegisterService ¶
func NewRegisterService(db database.Database) RegisterService
type UpdateProfileImageService ¶
type UpdateProfileImageService interface {
Execute(photo *multipart.FileHeader, userID int64) (string, error)
}
func NewUpdateProfileImageService ¶
func NewUpdateProfileImageService(db database.Database, s3 *aws.S3Bucket) UpdateProfileImageService
type UpdateUserInput ¶
type UpdateUserInput struct { DisplayName string `json:"display_name" form:"display_name" validate:"omitempty,max=255"` Bio string `json:"bio" form:"bio" validate:"omitempty,max=255"` Location string `json:"location" form:"location" validate:"omitempty,max=30"` Website string `json:"website" form:"website" validate:"omitempty,url"` BirthDate string `json:"birth_date" form:"birth_date" validate:"omitempty,datetime=2006-01-02"` }
func (UpdateUserInput) Validate ¶
func (i UpdateUserInput) Validate() []*validator.ValidationError
type UpdateUserService ¶
type UpdateUserService interface {
Execute(input UpdateUserInput, userID int64) error
}
func NewUpdateUserService ¶
func NewUpdateUserService(db database.Database) UpdateUserService
Click to show internal directories.
Click to hide internal directories.