Documentation
¶
Index ¶
- func ToOpenApiAuthVendor(v AuthVendor) (openapi.AuthVendor, error)
- type AffiliationRepository
- type AuthInfo
- type AuthVendor
- type Bookmark
- type BookmarkRepository
- type CommentRepository
- type Community
- type CommunityRepository
- type CommunityRestaurantsRepository
- type InviteToken
- type InviteTokenRepository
- type Location
- type Restaurant
- type RestaurantRepository
- type RestaurantSource
- type SearchApiRestaurant
- type UpdateUserInput
- type User
- type UserDetail
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToOpenApiAuthVendor ¶
func ToOpenApiAuthVendor(v AuthVendor) (openapi.AuthVendor, error)
Types ¶
type AffiliationRepository ¶
type AuthInfo ¶
type AuthInfo struct {
Vendor AuthVendor
Token string
}
type AuthVendor ¶
type AuthVendor string
const ( AuthVendorGoogle AuthVendor = "google" AuthVendorApple AuthVendor = "apple" AuthVendorAnonymous AuthVendor = "anonymous" )
func FromOpenApiAuthVendor ¶
func FromOpenApiAuthVendor(v openapi.AuthVendor) (AuthVendor, error)
type Bookmark ¶
type Bookmark struct {
models_gen.Bookmark
}
type BookmarkRepository ¶
type CommentRepository ¶
type Community ¶
type Community struct {
models_gen.Community
ImageUrls []string
NumRestaurants int
NumUsers int
}
func (*Community) ToOpenApiCommunity ¶
type CommunityRepository ¶
type CommunityRepository interface {
GetCommunityByID(ctx context.Context, id int64) (*Community, error)
NewCommunity(ctx context.Context, name string, description string, loc Location) (*Community, error)
SearchCommunity(ctx context.Context, keyword string) ([]*Community, error)
UpdateCommunity(ctx context.Context, communityId int64, name string, description string, loc Location) (*Community, error)
}
type CommunityRestaurantsRepository ¶
type CommunityRestaurantsRepository interface {
ListCommunityRestaurants(ctx context.Context, communityId int64) ([]*Restaurant, error)
AddRestaurants(ctx context.Context, communityId int64, restaurantId int64) error
RemoveRestaurants(ctx context.Context, communityId int64, restaurantId int64) error
ListCommunitiesWithSameRestaurants(ctx context.Context, restaurantId, communityId int64) ([]*Community, error)
}
type InviteToken ¶
type InviteTokenRepository ¶
type Restaurant ¶
func (*Restaurant) ToOpenApiRestaurant ¶
func (r *Restaurant) ToOpenApiRestaurant() *openapi.Restaurant
type RestaurantRepository ¶
type RestaurantRepository interface {
AddOrUpdateRestaurant(ctx context.Context, restaurant *[]SearchApiRestaurant, source RestaurantSource) ([]*Restaurant, error)
GetRestaurantById(ctx context.Context, id int64) (*Restaurant, error)
}
type RestaurantSource ¶
type RestaurantSource string
const HotpepperSource RestaurantSource = "hotpepper"
type SearchApiRestaurant ¶
type UpdateUserInput ¶
type User ¶
func (*User) ToOpenApiUser ¶
type UserDetail ¶
func (*UserDetail) ToOpenApi ¶
func (u *UserDetail) ToOpenApi() *openapi.UserDetail
type UserRepository ¶
type UserRepository interface {
GetUserById(ctx context.Context, id int64, profileImageBase url.URL) (*User, error)
NewUser(ctx context.Context, userName string) (*User, error)
GetUserDetailById(ctx context.Context, id int64, profileImageBase url.URL) (*UserDetail, error)
UpdateProfileImage(ctx context.Context, userId int64, fileName string) error
ListUserCommunity(ctx context.Context, userId int64) ([]*Community, error)
ExistInCommunity(ctx context.Context, userId int64, communityId int64) (bool, error)
UpdateUser(ctx context.Context, input *UpdateUserInput, profileImageBase url.URL) (*User, error)
}
Click to show internal directories.
Click to hide internal directories.