Documentation
¶
Index ¶
- type BookmarkUseCase
- type CommentUseCase
- type CommunityUseCase
- func (u *CommunityUseCase) GetCommunity(ctx context.Context, id int64) (*models.Community, error)
- func (u *CommunityUseCase) IssueInviteToken(ctx context.Context, issuerId int64, communityId int64) (*models.InviteToken, error)
- func (u *CommunityUseCase) ListRestaurants(ctx context.Context, communityId int64) ([]*models.Restaurant, error)
- func (u *CommunityUseCase) ListUsers(ctx context.Context, communityId int64) ([]*models.User, error)
- func (u *CommunityUseCase) NewCommunity(ctx context.Context, userId int64, name string, description string, ...) (*models.Community, error)
- func (u *CommunityUseCase) SearchCommunity(ctx context.Context, keyword string) ([]*models.Community, error)
- func (u *CommunityUseCase) UpdateCommunity(ctx context.Context, userId, communityId int64, name string, ...) (*models.Community, error)
- type RestaurantUseCase
- func (r RestaurantUseCase) AddRestaurantToCommunity(ctx context.Context, userId int64, communityId int64, restaurantId int64) error
- func (r RestaurantUseCase) GetOtherCommunitiesWithSameRestaurants(ctx context.Context, restaurantId, communityId int64) ([]*models.Community, error)
- func (r RestaurantUseCase) GetRestaurantById(ctx context.Context, id int64) (*models.Restaurant, error)
- func (r RestaurantUseCase) RemoveRestaurantFromCommunity(ctx context.Context, userId int64, communityId int64, restaurantId int64) error
- func (r RestaurantUseCase) SearchRestaurant(ctx context.Context, keyword string, loc *models.Location) ([]*models.Restaurant, error)
- type UserUseCase
- func (u *UserUseCase) JoinCommunity(ctx context.Context, userId int64, token string) error
- func (u *UserUseCase) LeaveCommunity(ctx context.Context, userId int64, communityId int64) error
- func (u *UserUseCase) ListUserCommunities(ctx context.Context, userId int64) ([]*models.Community, error)
- func (u *UserUseCase) MyUser(ctx context.Context, userId int64) (*models.UserDetail, error)
- func (u *UserUseCase) NewUser(ctx context.Context, name string, authVendor models.AuthVendor) (*models.User, *models.AuthInfo, error)
- func (u *UserUseCase) UpdateMe(ctx context.Context, userId int64, userName *string) (*models.User, error)
- func (u *UserUseCase) UpdateUserProfileImage(ctx context.Context, userId int64, imageData []byte) (imageUrl string, e error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarkUseCase ¶
type BookmarkUseCase struct {
// contains filtered or unexported fields
}
func NewBookmarkUseCase ¶
func NewBookmarkUseCase(bookmarkRepo models.BookmarkRepository) BookmarkUseCase
func (*BookmarkUseCase) CreateBookmark ¶
func (u *BookmarkUseCase) CreateBookmark(ctx context.Context, userId, communityId int64) error
func (*BookmarkUseCase) DeleteBookmark ¶
func (*BookmarkUseCase) ListBookmark ¶
type CommentUseCase ¶
type CommentUseCase struct {
// contains filtered or unexported fields
}
func NewCommentUseCase ¶
func NewCommentUseCase(commentRepository models.CommentRepository, userRepository models.UserRepository) CommentUseCase
func (*CommentUseCase) GetComment ¶
func (*CommentUseCase) SetComment ¶
type CommunityUseCase ¶
type CommunityUseCase struct {
// contains filtered or unexported fields
}
func NewCommunityUseCase ¶
func NewCommunityUseCase( store session.Store, config *config.ServerConfig, communityRepository models.CommunityRepository, affiliationRepository models.AffiliationRepository, communityRestaurantsRepository models.CommunityRestaurantsRepository, inviteTokenRepository models.InviteTokenRepository, userRepository models.UserRepository, ) CommunityUseCase
func (*CommunityUseCase) GetCommunity ¶
func (*CommunityUseCase) IssueInviteToken ¶
func (u *CommunityUseCase) IssueInviteToken(ctx context.Context, issuerId int64, communityId int64) (*models.InviteToken, error)
func (*CommunityUseCase) ListRestaurants ¶
func (u *CommunityUseCase) ListRestaurants(ctx context.Context, communityId int64) ([]*models.Restaurant, error)
func (*CommunityUseCase) NewCommunity ¶
func (*CommunityUseCase) SearchCommunity ¶
type RestaurantUseCase ¶
type RestaurantUseCase struct {
// contains filtered or unexported fields
}
func NewRestaurantUseCase ¶
func NewRestaurantUseCase( restaurantSearch restaurant_search.SearchApi, restaurantRepository models.RestaurantRepository, userRepository models.UserRepository, communityRestaurantsRepository models.CommunityRestaurantsRepository) RestaurantUseCase
func (RestaurantUseCase) AddRestaurantToCommunity ¶
func (RestaurantUseCase) GetOtherCommunitiesWithSameRestaurants ¶
func (RestaurantUseCase) GetRestaurantById ¶
func (r RestaurantUseCase) GetRestaurantById(ctx context.Context, id int64) (*models.Restaurant, error)
func (RestaurantUseCase) RemoveRestaurantFromCommunity ¶
func (RestaurantUseCase) SearchRestaurant ¶
func (r RestaurantUseCase) SearchRestaurant(ctx context.Context, keyword string, loc *models.Location) ([]*models.Restaurant, error)
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase( store session.Store, userRepo models.UserRepository, affiliationRepo models.AffiliationRepository, inviteTokenRepository models.InviteTokenRepository, config *config.ServerConfig, ) UserUseCase
func (*UserUseCase) JoinCommunity ¶
func (*UserUseCase) LeaveCommunity ¶
func (*UserUseCase) ListUserCommunities ¶
func (*UserUseCase) MyUser ¶
func (u *UserUseCase) MyUser(ctx context.Context, userId int64) (*models.UserDetail, error)
func (*UserUseCase) UpdateUserProfileImage ¶
Click to show internal directories.
Click to hide internal directories.