Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) DeleteSeen(ctx context.Context, user string, item string) error
- func (c *Client) Get(ctx context.Context, item string) (string, error)
- func (c *Client) Has(ctx context.Context, item string) (bool, error)
- func (c *Client) Insert(ctx context.Context, item string, comment string, schema string, ...) error
- func (c *Client) Latest(ctx context.Context, schema string) (string, int64, string, error)
- func (c *Client) Rate(ctx context.Context, user string, item string, feedback FeedbackType) error
- func (c *Client) Recommend(ctx context.Context, user string, schema string) (string, string, error)
- func (c *Client) Unrated(ctx context.Context, user string) ([]*Feedback, error)
- type ErrorMessage
- type Feedback
- type FeedbackType
- type Item
- type LatestItem
- type RowAffected
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var FeedbackTypes = []FeedbackType{Like, Dislike, Skip, Junk, Inaccessible, Abuse}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteSeen ¶
func (*Client) Insert ¶
func (c *Client) Insert( ctx context.Context, item string, comment string, schema string, searcher string, ) error
WARNING: Overwrites item if exists
type ErrorMessage ¶
type ErrorMessage string
func (ErrorMessage) Error ¶
func (e ErrorMessage) Error() string
type FeedbackType ¶
type FeedbackType string
const ( Like FeedbackType = "like" Dislike FeedbackType = "dislike" Skip FeedbackType = "skip" Junk FeedbackType = "junk" Inaccessible FeedbackType = "inaccessible" Abuse FeedbackType = "abuse" )
func ParseFeedback ¶
func ParseFeedback(f []byte) (FeedbackType, error)
func (FeedbackType) Value ¶
func (f FeedbackType) Value() []byte
type LatestItem ¶
type RowAffected ¶
type RowAffected struct {
RowAffected int `json:"RowAffected"`
}
Click to show internal directories.
Click to hide internal directories.