Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageInterface ¶
type StorageInterface interface {
// GetUser is return User based on request
// posssible to use cache, session, database or something else
GetUser(ctrl revel.Controller)
// ListPosts get the list of posts for the user by slug and page
// if no user slug so it return post ordered by create date
ListPosts(userSlug string, page int) []*models.Post
GetPost(userSlug string, postSlug string) *models.Post
// SavePost is save post. If there no id so it create new post, otherwise it update it
SavePost(post models.Post)
// RemovePost is remove the post using userSlug and postSlug. Both params required
RemovePost(userSlug string, postSlug string)
// SaveComment is save comment. If there no id so it create new comment, otherwise it update it
SaveComment(postSlug string, post models.Comment)
// RemoveComment is remove the comment using postSlug and commentID. Both params required
RemoveComment(postSlug string, commentID string)
}
StorageInterface is use makeSlug for slugging, i.e. scale-golang-applications
var Storage *StorageInterface
Storage interface
Directories
¶
| Path | Synopsis |
|---|---|
|
routes
GENERATED CODE - DO NOT EDIT This file provides a way of creating URL's based on all the actions found in all the controllers.
|
GENERATED CODE - DO NOT EDIT This file provides a way of creating URL's based on all the actions found in all the controllers. |
|
tmp
command
GENERATED CODE - DO NOT EDIT This file is the main file for Revel.
|
GENERATED CODE - DO NOT EDIT This file is the main file for Revel. |
|
tmp/run
GENERATED CODE - DO NOT EDIT This file is the run file for Revel.
|
GENERATED CODE - DO NOT EDIT This file is the run file for Revel. |
Click to show internal directories.
Click to hide internal directories.