Documentation ¶
Index ¶
- Variables
- type CommentRepository
- func (r *CommentRepository) Create(ctx context.Context, comment *model.Comment) (err error)
- func (r *CommentRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
- func (r *CommentRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
- func (r *CommentRepository) GetCommentsWherePostingID(ctx context.Context, postingID int64) (comments []model.Comment, err error)
- func (r *CommentRepository) GetWhereID(ctx context.Context, id int64) (comment model.Comment, err error)
- type CommentRepositoryInterface
- type FollowRepository
- func (r *FollowRepository) Create(ctx context.Context, follow *model.Follow) (err error)
- func (r *FollowRepository) DeleteWhereFollowingFollowedUserName(ctx context.Context, followingUserName, followedUserName string) (err error)
- func (r *FollowRepository) DeleteWhereFollowingUserName(ctx context.Context, userName string) (err error)
- type FollowRepositoryInterface
- type LikeRepository
- func (r *LikeRepository) Create(ctx context.Context, like *model.Like) (err error)
- func (r *LikeRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
- func (r *LikeRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
- func (r *LikeRepository) GetWhereID(ctx context.Context, id int64) (like model.Like, err error)
- type LikeRepositoryInterface
- type NotificationRepository
- func (r *NotificationRepository) Create(ctx context.Context, notification *model.Notification) (err error)
- func (r *NotificationRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
- func (r *NotificationRepository) DeleteWhereVisitedName(ctx context.Context, userName string) (err error)
- func (r *NotificationRepository) GetNotifications(ctx context.Context, userName string) (notifications []model.Notification, err error)
- type NotificationRepositoryInterface
- type PostingRepository
- func (r *PostingRepository) Create(ctx context.Context, posting *model.Posting) (err error)
- func (r *PostingRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
- func (r *PostingRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
- func (r *PostingRepository) GetPostings(ctx context.Context, sinceAt time.Time, limit int8, userName string) (postings []model.Posting, err error)
- func (r *PostingRepository) GetWhereID(ctx context.Context, id int64) (posting model.Posting, err error)
- func (r *PostingRepository) GetWhereIDUserName(ctx context.Context, id int64, userName string) (posting model.Posting, err error)
- func (r *PostingRepository) UpdateLikedCount(ctx context.Context, id int64, increment bool) (err error)
- type PostingRepositoryInterface
- type UserRepository
- func (r *UserRepository) Create(ctx context.Context, user *model.User) (err error)
- func (r *UserRepository) DeleteWhereName(ctx context.Context, userName string) (err error)
- func (r *UserRepository) GetUserWhereEmail(ctx context.Context, email string) (user model.User, err error)
- func (r *UserRepository) GetUserWhereName(ctx context.Context, userName string) (user model.User, err error)
- func (r *UserRepository) GetUserWhereNameResetKey(ctx context.Context, userName, resetKey string, requestedAt time.Time) (user model.User, err error)
- func (r *UserRepository) ResetPassword(ctx context.Context, password, userName, resetKey string) (err error)
- func (r *UserRepository) UpdateEmailVerifiedWhereNameActivationKey(ctx context.Context, emailVerified bool, userName, activationKey string) (err error)
- func (r *UserRepository) UpdateFollowCount(ctx context.Context, userName string, increment bool) (err error)
- func (r *UserRepository) UpdateFollowedCount(ctx context.Context, userName string, increment bool) (err error)
- func (r *UserRepository) UpdateIconWhereName(ctx context.Context, iconURL, userName string) (err error)
- func (r *UserRepository) UpdateLikeCount(ctx context.Context, userName string, increment bool) (err error)
- func (r *UserRepository) UpdateLikedCount(ctx context.Context, postingID int64, increment bool) (err error)
- func (r *UserRepository) UpdatePasswordResetWhereEmail(ctx context.Context, count uint8, resetKey string, expiresAt time.Time, ...) (err error)
- func (r *UserRepository) UpdatePasswordWhereName(ctx context.Context, password, userName string) (err error)
- func (r *UserRepository) UpdateSelfIntroductionWhereName(ctx context.Context, selfIntroduction, userName string) (err error)
- type UserRepositoryInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateData = errors.New("duplicate data error")
View Source
var ErrNotExistsData = errors.New("not exists data error")
View Source
var ErrUserActivationNotFound = errors.New("no such user_name and activation_key")
Functions ¶
This section is empty.
Types ¶
type CommentRepository ¶
type CommentRepository struct {
// contains filtered or unexported fields
}
func NewCommentRepository ¶
func NewCommentRepository(db *sql.DB) *CommentRepository
func (*CommentRepository) DeleteWhereID ¶
func (r *CommentRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
func (*CommentRepository) DeleteWhereUserName ¶
func (r *CommentRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
func (*CommentRepository) GetCommentsWherePostingID ¶
func (*CommentRepository) GetWhereID ¶
type CommentRepositoryInterface ¶
type CommentRepositoryInterface interface { Create(ctx context.Context, comment *model.Comment) (err error) GetCommentsWherePostingID(ctx context.Context, id int64) (comments []model.Comment, err error) GetWhereID(ctx context.Context, id int64) (comment model.Comment, err error) DeleteWhereID(ctx context.Context, id int64) (err error) DeleteWhereUserName(ctx context.Context, userName string) (err error) }
type FollowRepository ¶
type FollowRepository struct {
// contains filtered or unexported fields
}
func NewFollowRepository ¶
func NewFollowRepository(db *sql.DB) *FollowRepository
func (*FollowRepository) DeleteWhereFollowingFollowedUserName ¶
func (r *FollowRepository) DeleteWhereFollowingFollowedUserName(ctx context.Context, followingUserName, followedUserName string) (err error)
func (*FollowRepository) DeleteWhereFollowingUserName ¶
func (r *FollowRepository) DeleteWhereFollowingUserName(ctx context.Context, userName string) (err error)
type LikeRepository ¶
type LikeRepository struct {
// contains filtered or unexported fields
}
func NewLikeRepository ¶
func NewLikeRepository(db *sql.DB) *LikeRepository
func (*LikeRepository) DeleteWhereID ¶
func (r *LikeRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
func (*LikeRepository) DeleteWhereUserName ¶
func (r *LikeRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
func (*LikeRepository) GetWhereID ¶
type LikeRepositoryInterface ¶
type NotificationRepository ¶
type NotificationRepository struct {
// contains filtered or unexported fields
}
func NewNotificationRepository ¶
func NewNotificationRepository(db *sql.DB) *NotificationRepository
func (*NotificationRepository) Create ¶
func (r *NotificationRepository) Create(ctx context.Context, notification *model.Notification) (err error)
func (*NotificationRepository) DeleteWhereID ¶
func (r *NotificationRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
func (*NotificationRepository) DeleteWhereVisitedName ¶
func (r *NotificationRepository) DeleteWhereVisitedName(ctx context.Context, userName string) (err error)
func (*NotificationRepository) GetNotifications ¶
func (r *NotificationRepository) GetNotifications(ctx context.Context, userName string) (notifications []model.Notification, err error)
type NotificationRepositoryInterface ¶
type NotificationRepositoryInterface interface { Create(ctx context.Context, notification *model.Notification) (err error) GetNotifications(ctx context.Context, userName string) (notifications []model.Notification, err error) DeleteWhereID(ctx context.Context, id int64) (err error) DeleteWhereNotificationUserName(ctx context.Context, userName string) (err error) }
type PostingRepository ¶
type PostingRepository struct {
// contains filtered or unexported fields
}
func NewPostingRepository ¶
func NewPostingRepository(db *sql.DB) *PostingRepository
func (*PostingRepository) DeleteWhereID ¶
func (r *PostingRepository) DeleteWhereID(ctx context.Context, id int64) (err error)
func (*PostingRepository) DeleteWhereUserName ¶
func (r *PostingRepository) DeleteWhereUserName(ctx context.Context, userName string) (err error)
func (*PostingRepository) GetPostings ¶
func (*PostingRepository) GetWhereID ¶
func (*PostingRepository) GetWhereIDUserName ¶
func (*PostingRepository) UpdateLikedCount ¶
type PostingRepositoryInterface ¶
type PostingRepositoryInterface interface { Create(ctx context.Context, posting *model.Posting) (err error) GetPostings(ctx context.Context, sinceAt time.Time, limit int8) (postings []model.Posting, err error) GetWhereID(ctx context.Context, id int64) (posting model.Posting, err error) GetWhereIDUserName(ctx context.Context, id int64, userName string) (posting model.Posting, err error) UpdateLikedCount(ctx context.Context, id int64, increment bool) (err error) DeleteWhereID(ctx context.Context, id int64) (err error) DeleteWhereUserName(ctx context.Context, userName string) (err error) }
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *sql.DB) *UserRepository
func (*UserRepository) DeleteWhereName ¶
func (r *UserRepository) DeleteWhereName(ctx context.Context, userName string) (err error)
func (*UserRepository) GetUserWhereEmail ¶
func (*UserRepository) GetUserWhereName ¶
func (*UserRepository) GetUserWhereNameResetKey ¶
func (*UserRepository) ResetPassword ¶
func (r *UserRepository) ResetPassword(ctx context.Context, password, userName, resetKey string) (err error)
func (*UserRepository) UpdateEmailVerifiedWhereNameActivationKey ¶
func (*UserRepository) UpdateFollowCount ¶
func (*UserRepository) UpdateFollowedCount ¶
func (*UserRepository) UpdateIconWhereName ¶
func (r *UserRepository) UpdateIconWhereName(ctx context.Context, iconURL, userName string) (err error)
func (*UserRepository) UpdateLikeCount ¶
func (*UserRepository) UpdateLikedCount ¶
func (*UserRepository) UpdatePasswordResetWhereEmail ¶
func (*UserRepository) UpdatePasswordWhereName ¶
func (r *UserRepository) UpdatePasswordWhereName(ctx context.Context, password, userName string) (err error)
func (*UserRepository) UpdateSelfIntroductionWhereName ¶
func (r *UserRepository) UpdateSelfIntroductionWhereName(ctx context.Context, selfIntroduction, userName string) (err error)
type UserRepositoryInterface ¶
type UserRepositoryInterface interface { Create(ctx context.Context, user *model.User) (err error) GetUserWhereEmail(ctx context.Context, email string) (user model.User, err error) GetUserWhereName(ctx context.Context, userName string) (user model.User, err error) GetUserWhereNameResetKey(ctx context.Context, userName string, resetKey string, requestedAt time.Time) (user model.User, err error) UpdatePasswordWhereName(ctx context.Context, password string, userName string) (err error) UpdateIconWhereName(ctx context.Context, iconURL string, userName string) (err error) UpdateSelfIntroductionWhereName(ctx context.Context, selfIntroduction string, userName string) (err error) UpdateEmailVerifiedWhereNameActivationKey(ctx context.Context, emailVerified bool, userName string, activationKey string) (err error) UpdatePasswordResetWhereEmail(ctx context.Context, count uint16, resetKey string, expiresAt time.Time, email string) (err error) ResetPassword(ctx context.Context, password string, userName string, resetKey string) (err error) UpdateLikeCount(ctx context.Context, userName string, increment bool) (err error) UpdateLikedCount(ctx context.Context, userName string) (err error) DeleteWhereName(ctx context.Context, userName string) (err error) }
Click to show internal directories.
Click to hide internal directories.