Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterModelsForCaching ¶
func RegisterModelsForCaching()
RegisterModelsForCaching register models to be cached in Redis Cache
func SetCacheSession ¶
func SetCacheSession(expinminute int, c *redicache.RedisSession)
SetCacheSession set session object where cache items could be added
Types ¶
type AuthInfo ¶
type AuthInfo struct { ClientID string `json:",omitempty"` ClientSecret string `json:",omitempty"` Scopes string `json:",omitempty"` AppUserID string `json:",omitempty"` RefereshToken string `json:",omitempty"` }
AuthInfo is used to take input from user
type DbUser ¶
DbUser is sample database user
func (*DbUser) Cache ¶
func (d *DbUser) Cache(m *mango.MongoSession) *dbUserCache
Cache returns mongodb collection for Dbuser
func (DbUser) GetExpiration ¶
GetExpiration returns expiration duration of key
func (DbUser) GetID ¶
func (d DbUser) GetID() interface{}
GetID implements interface to qualify for MongoDb cache
func (DbUser) GetMasterKey ¶
GetMasterKey - returns patter for key, just for documentation
type ListItem ¶
type ListItem struct { ID int `json:",omitempty"` BigID int64 `json:",omitempty"` IDStr string `json:",omitempty"` DataInt int `json:",omitempty"` DataStr string `json:",omitempty"` DataStr2 string `json:",omitempty"` Checked bool `json:",omitempty"` }
ListItem is used to allow get the value form common query or procedure which extract id , title etc.
Click to show internal directories.
Click to hide internal directories.