Documentation ¶
Index ¶
- type Api
- func (uc *Api) Attached(method string) bool
- func (uc *Api) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (uc *Api) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (uc *Api) List(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (uc *Api) Read(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (uc *Api) Replace(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func (uc *Api) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- type User
- type UserCache
- func (uc *UserCache) AdminAuth(r *http.Request) (ok bool)
- func (uc *UserCache) AuthenticateRequest(w http.ResponseWriter, r *http.Request) *User
- func (uc *UserCache) AuthenticateUser(username, password string) (*User, error)
- func (uc *UserCache) AuthorizeProvider(r *http.Request, facility string) (string, string, error)
- func (uc *UserCache) AuthorizeUser(r *http.Request, facility string) (string, error)
- func (uc *UserCache) Drop(username string) error
- func (uc *UserCache) Insert(user *User) error
- func (uc *UserCache) Load(username string) *User
- func (uc *UserCache) MinimalAuth(r *http.Request) (ok bool)
- func (uc *UserCache) Reinsert(user *User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
*UserCache
}
receiver type
func (*Api) Create ¶
func (uc *Api) Create(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Api) Delete ¶
func (uc *Api) Delete(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) List ¶
func (uc *Api) List(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*Api) Read ¶
func (uc *Api) Read(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) Replace ¶
func (uc *Api) Replace(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func (*Api) Update ¶
func (uc *Api) Update(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
type UserCache ¶
type UserCache struct {
// contains filtered or unexported fields
}
receiver type
func NewUserCache ¶
func NewUserCache(db *sql.DB, adminarr []string, authorizedProviders map[string][]string) *UserCache
generator
func (*UserCache) AuthenticateRequest ¶
extract the username+password from request
func (*UserCache) AuthenticateUser ¶
func (*UserCache) AuthorizeProvider ¶
authorize the request for this facility
func (*UserCache) AuthorizeUser ¶
func (*UserCache) MinimalAuth ¶
user exists
Click to show internal directories.
Click to hide internal directories.