Documentation ¶
Index ¶
- type ErrorMessage
- type Feedback
- type GorseClient
- 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) GetItem(ctx context.Context, itemId string) (Item, error)
- func (c *GorseClient) GetNeighbors(ctx context.Context, itemId string, n int) ([]Score, error)
- func (c *GorseClient) GetRecommend(ctx context.Context, userId string, category string, n int) ([]string, error)
- func (c *GorseClient) GetUser(ctx context.Context, userId string) (User, 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) InsertUser(ctx context.Context, user User) (RowAffected, error)
- func (c *GorseClient) ListFeedbacks(ctx context.Context, feedbackType, userId string) ([]Feedback, error)
- func (c *GorseClient) SessionRecommend(ctx context.Context, feedbacks []Feedback, n int) ([]Score, error)
- 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 Item
- type ItemPatch
- type RowAffected
- type Score
- type User
- type UserPatch
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(entryPoint, apiKey string) *GorseClient
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) GetNeighbors ¶
func (*GorseClient) GetRecommend ¶
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) InsertUser ¶
func (c *GorseClient) InsertUser(ctx context.Context, user User) (RowAffected, error)
func (*GorseClient) ListFeedbacks ¶
func (*GorseClient) SessionRecommend ¶
func (*GorseClient) UpdateItem ¶ added in v0.4.12
func (c *GorseClient) UpdateItem(ctx context.Context, itemId string, item ItemPatch) (RowAffected, error)
func (*GorseClient) UpdateUser ¶ added in v0.4.12
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.