Documentation ¶
Index ¶
- type ErrorMessage
- type Feedback
- type Feedbacks
- type GorseClient
- func (c *GorseClient) DelFeedback(ctx context.Context, feedbackType, userId, itemId string) (Feedback, error)
- func (c *GorseClient) DelFeedbackWithUserItem(ctx context.Context, userId, itemId string) ([]Feedback, error)
- func (c *GorseClient) DelItemCategory(ctx context.Context, itemId string, category string) (RowAffected, error)
- func (c *GorseClient) DeleteItem(ctx context.Context, itemId string) (RowAffected, error)
- func (c *GorseClient) DeleteUser(ctx context.Context, userId string) (RowAffected, error)
- func (c *GorseClient) GetFeedback(ctx context.Context, cursor string, n int) (Feedbacks, error)
- func (c *GorseClient) GetFeedbackWithTypeUserItem(ctx context.Context, feedbackType, userId, itemId string) (Feedback, error)
- func (c *GorseClient) GetFeedbackWithUserItem(ctx context.Context, userId, itemId string) ([]Feedback, error)
- func (c *GorseClient) GetFeedbacksWithType(ctx context.Context, feedbackType, cursor string, n int) (Feedbacks, error)
- func (c *GorseClient) GetItem(ctx context.Context, itemId string) (Item, error)
- func (c *GorseClient) GetItemFeedbacks(ctx context.Context, itemId string) ([]Feedback, error)
- func (c *GorseClient) GetItemFeedbacksWithType(ctx context.Context, itemId, feedbackType string) ([]Feedback, error)
- func (c *GorseClient) GetItemLatest(ctx context.Context, userid string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemLatestWithCategory(ctx context.Context, userid, category string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemNeighbors(ctx context.Context, itemId string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemNeighborsWithCategory(ctx context.Context, itemId, category string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemPopular(ctx context.Context, userid string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemPopularWithCategory(ctx context.Context, userid, category string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetItemRecommend(ctx context.Context, userId string, categories []string, ...) ([]string, error)
- func (c *GorseClient) GetItemRecommendWithCategory(ctx context.Context, userId, category, writeBackType, writeBackDelay string, ...) ([]string, error)
- func (c *GorseClient) GetItems(ctx context.Context, cursor string, n int) (Items, error)
- func (c *GorseClient) GetNeighbors(ctx context.Context, itemId string, n int) ([]Score, error)deprecated
- func (c *GorseClient) GetRecommend(ctx context.Context, userId, category string, n int) ([]string, error)deprecated
- func (c *GorseClient) GetUser(ctx context.Context, userId string) (User, error)
- func (c *GorseClient) GetUserFeedbacks(ctx context.Context, userId string) ([]Feedback, error)
- func (c *GorseClient) GetUserFeedbacksWithType(ctx context.Context, userId, feedbackType string) ([]Feedback, error)
- func (c *GorseClient) GetUserNeighbors(ctx context.Context, userId string, n, offset int) ([]Score, error)
- func (c *GorseClient) GetUsers(ctx context.Context, cursor string, n int) (Users, error)
- func (c *GorseClient) HealthLive(ctx context.Context) (Health, error)
- func (c *GorseClient) HealthReady(ctx context.Context) (Health, error)
- func (c *GorseClient) InsertFeedback(ctx context.Context, feedbacks []Feedback) (RowAffected, error)
- func (c *GorseClient) InsertItem(ctx context.Context, item Item) (RowAffected, error)
- func (c *GorseClient) InsertItems(ctx context.Context, items []Item) (RowAffected, error)
- func (c *GorseClient) InsertUser(ctx context.Context, user User) (RowAffected, error)
- func (c *GorseClient) InsertUsers(ctx context.Context, users []User) (RowAffected, error)
- func (c *GorseClient) ListFeedbacks(ctx context.Context, feedbackType, userId string) ([]Feedback, error)deprecated
- func (c *GorseClient) PutFeedback(ctx context.Context, feedbacks []Feedback) (RowAffected, error)
- func (c *GorseClient) PutItemCategory(ctx context.Context, itemId string, category string) (RowAffected, error)
- func (c *GorseClient) SessionItemRecommend(ctx context.Context, feedbacks []Feedback, n, offset int) ([]Score, error)
- func (c *GorseClient) SessionItemRecommendWithCategory(ctx context.Context, feedbacks []Feedback, category string, n, offset int) ([]Score, error)
- func (c *GorseClient) SessionRecommend(ctx context.Context, feedbacks []Feedback, n int) ([]Score, error)deprecated
- func (c *GorseClient) UpdateItem(ctx context.Context, itemId string, item *ItemPatch) (RowAffected, error)
- func (c *GorseClient) UpdateUser(ctx context.Context, userId string, user UserPatch) (RowAffected, error)
- type Health
- type Item
- type ItemPatch
- type Items
- type RowAffected
- type Score
- type User
- type UserPatch
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorMessage ¶
type ErrorMessage string
func (ErrorMessage) Error ¶
func (e ErrorMessage) Error() string
type GorseClient ¶
type GorseClient struct {
// contains filtered or unexported fields
}
func NewGorseClient ¶
func NewGorseClient(c *config.Config) *GorseClient
func (*GorseClient) DelFeedback ¶
func (*GorseClient) DelFeedbackWithUserItem ¶
func (*GorseClient) DelItemCategory ¶
func (c *GorseClient) DelItemCategory(ctx context.Context, itemId string, category string) (RowAffected, error)
func (*GorseClient) DeleteItem ¶
func (c *GorseClient) DeleteItem(ctx context.Context, itemId string) (RowAffected, error)
func (*GorseClient) DeleteUser ¶
func (c *GorseClient) DeleteUser(ctx context.Context, userId string) (RowAffected, error)
func (*GorseClient) GetFeedback ¶
func (*GorseClient) GetFeedbackWithTypeUserItem ¶
func (*GorseClient) GetFeedbackWithUserItem ¶
func (*GorseClient) GetFeedbacksWithType ¶
func (*GorseClient) GetItemFeedbacks ¶
func (*GorseClient) GetItemFeedbacksWithType ¶
func (*GorseClient) GetItemLatest ¶
func (*GorseClient) GetItemLatestWithCategory ¶
func (*GorseClient) GetItemNeighbors ¶
func (*GorseClient) GetItemNeighborsWithCategory ¶
func (*GorseClient) GetItemPopular ¶
func (*GorseClient) GetItemPopularWithCategory ¶
func (*GorseClient) GetItemRecommend ¶
func (*GorseClient) GetItemRecommendWithCategory ¶
func (*GorseClient) GetNeighbors
deprecated
func (*GorseClient) GetRecommend
deprecated
func (*GorseClient) GetUserFeedbacks ¶
func (*GorseClient) GetUserFeedbacksWithType ¶
func (*GorseClient) GetUserNeighbors ¶
func (*GorseClient) HealthLive ¶
func (c *GorseClient) HealthLive(ctx context.Context) (Health, error)
func (*GorseClient) HealthReady ¶
func (c *GorseClient) HealthReady(ctx context.Context) (Health, error)
func (*GorseClient) InsertFeedback ¶
func (c *GorseClient) InsertFeedback(ctx context.Context, feedbacks []Feedback) (RowAffected, error)
func (*GorseClient) InsertItem ¶
func (c *GorseClient) InsertItem(ctx context.Context, item Item) (RowAffected, error)
func (*GorseClient) InsertItems ¶
func (c *GorseClient) InsertItems(ctx context.Context, items []Item) (RowAffected, error)
func (*GorseClient) InsertUser ¶
func (c *GorseClient) InsertUser(ctx context.Context, user User) (RowAffected, error)
func (*GorseClient) InsertUsers ¶
func (c *GorseClient) InsertUsers(ctx context.Context, users []User) (RowAffected, error)
func (*GorseClient) ListFeedbacks
deprecated
func (*GorseClient) PutFeedback ¶
func (c *GorseClient) PutFeedback(ctx context.Context, feedbacks []Feedback) (RowAffected, error)
func (*GorseClient) PutItemCategory ¶
func (c *GorseClient) PutItemCategory(ctx context.Context, itemId string, category string) (RowAffected, error)
func (*GorseClient) SessionItemRecommend ¶
func (*GorseClient) SessionItemRecommendWithCategory ¶
func (*GorseClient) SessionRecommend
deprecated
func (*GorseClient) UpdateItem ¶
func (c *GorseClient) UpdateItem(ctx context.Context, itemId string, item *ItemPatch) (RowAffected, error)
func (*GorseClient) UpdateUser ¶
func (c *GorseClient) UpdateUser(ctx context.Context, userId string, user UserPatch) (RowAffected, error)
type RowAffected ¶
type RowAffected struct {
RowAffected int `json:"RowAffected"`
}
Click to show internal directories.
Click to hide internal directories.