Documentation ¶
Index ¶
- Constants
- Variables
- type Admin
- type Manager
- func (mgr *Manager) AddUser(w http.ResponseWriter, r *http.Request, rnd render.Render)
- func (mgr *Manager) ChPasswd(w http.ResponseWriter, r *http.Request, ss sessions.Session)
- func (mgr *Manager) Containers(w http.ResponseWriter, rnd render.Render)
- func (mgr *Manager) CreateContainer(w http.ResponseWriter, r *http.Request)
- func (mgr *Manager) DeleteContainer(w http.ResponseWriter, r *http.Request, params martini.Params, ...)
- func (mgr *Manager) DeleteUser(w http.ResponseWriter, params martini.Params)
- func (mgr *Manager) Grant(w http.ResponseWriter, r *http.Request)
- func (mgr *Manager) InitMartini() error
- func (mgr *Manager) Login(w http.ResponseWriter, r *http.Request, ss sessions.Session)
- func (mgr *Manager) Logout(w http.ResponseWriter, r *http.Request, ss sessions.Session)
- func (mgr *Manager) Revoke(w http.ResponseWriter, params martini.Params)
- func (mgr *Manager) Start()
- func (mgr *Manager) Users(w http.ResponseWriter, rnd render.Render)
- type Priv
- type User
- type UserPriv
Constants ¶
View Source
const API_PREFIX = "/api"
Variables ¶
View Source
var AuthWhiteList = map[string][]string{
"GET": {"/_ping"},
"POST": {"/login"},
"DELETE": {},
}
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Containers ¶
func (mgr *Manager) Containers(w http.ResponseWriter, rnd render.Render)
GET /api/containers
func (*Manager) CreateContainer ¶
func (mgr *Manager) CreateContainer(w http.ResponseWriter, r *http.Request)
POST /api/containers
func (*Manager) DeleteContainer ¶
func (mgr *Manager) DeleteContainer(w http.ResponseWriter, r *http.Request, params martini.Params, rnd render.Render)
DELETE /api/containers/:id
func (*Manager) DeleteUser ¶
func (mgr *Manager) DeleteUser(w http.ResponseWriter, params martini.Params)
DELETE /api/users/:id
func (*Manager) Grant ¶
func (mgr *Manager) Grant(w http.ResponseWriter, r *http.Request)
POST /api/priv?user_id=123&container=dev1
func (*Manager) InitMartini ¶
type Priv ¶
type Priv struct { PrivId int `json:"priv_id"` Cid string `json:"cid"` UserId int `json:"user_id"` JoinedAt time.Time `json:"joined_at"` }
User to Container privileges map
Click to show internal directories.
Click to hide internal directories.