Documentation
¶
Index ¶
- type URL
- func (u *URL) Find(key string) (*URL, error)
- func (u *URL) GetMostPopular(limit int) ([]*URL, error)
- func (u *URL) GetUrlsFromKeys(keys []string) ([]*URL, error)
- func (u *URL) IncrementViewCount(keys []string) error
- func (u *URL) Save() error
- func (u *URL) Search(query string, limit int) ([]*URL, error)
- func (u *URL) Update() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URL ¶
type URL struct { Key string `json:"key" sql:",pk"` URL string `json:"url"` Alias []string `json:"alias"` Views int `json:"views" sql:"default:0"` }
URL model
func (*URL) GetMostPopular ¶
GetMostPopular gets the urls sorted by views
func (*URL) GetUrlsFromKeys ¶
GetUrlsFromKeys returns all the db records that match the keys
func (*URL) IncrementViewCount ¶
IncrementViewCount increments the view count of all the keys passed in
Click to show internal directories.
Click to hide internal directories.