Documentation ¶
Index ¶
- type Api
- func (sc *Api) Attached(method string) bool
- func (sc *Api) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (sc *Api) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (sc *Api) List(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (sc *Api) Read(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (sc *Api) Replace(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (sc *Api) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type SessionCache
- type UserSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
*SessionCache
}
receiver type
func (*Api) Create ¶
func (sc *Api) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Api) Delete ¶
func (sc *Api) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) List ¶
func (sc *Api) List(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Api) Read ¶
func (sc *Api) Read(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) Replace ¶
func (sc *Api) Replace(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) Update ¶
func (sc *Api) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
type SessionCache ¶
type SessionCache struct {
// contains filtered or unexported fields
}
receiver type
func NewSessionCache ¶
func NewSessionCache(db *sql.DB, users *userapi.UserCache) *SessionCache
generator
func (*SessionCache) Auth ¶
func (sc *SessionCache) Auth(r *http.Request) (ok bool)
user session exists
func (*SessionCache) GetSession ¶
func (sc *SessionCache) GetSession(sessionId string) *UserSession
func (*SessionCache) Insert ¶
func (sc *SessionCache) Insert(s *UserSession)
Click to show internal directories.
Click to hide internal directories.