Documentation ¶
Index ¶
- type Server
- func (r *Server) AddProject(id int64, name string) error
- func (r *Server) DeleteProject(id int64) error
- func (r *Server) HasPermission(username, project, permission string) bool
- func (r *Server) IsAdmin(username string) bool
- func (r *Server) RenameProject(id int64, name string) error
- func (r *Server) StartStatusCheck()
- func (r *Server) StopStatusCheck()
- func (r *Server) SyncProjects() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { ProjectsFunc func() (map[int64]string, error) // contains filtered or unexported fields }
Server represents an RBAC server.
func NewServer ¶
func NewServer(apiURL string, apiKey string, agentAuthURL string, agentUsername string, agentPrivateKey string, agentPublicKey string) (*Server, error)
NewServer returns a new RBAC server instance.
func (*Server) AddProject ¶
AddProject adds a new project resource to RBAC.
func (*Server) DeleteProject ¶
DeleteProject adds a new project resource to RBAC.
func (*Server) HasPermission ¶
HasPermission returns whether or not the user has the permission to perform a certain task.
func (*Server) RenameProject ¶
RenameProject renames an existing project resource in RBAC.
func (*Server) StartStatusCheck ¶
func (r *Server) StartStatusCheck()
StartStatusCheck starts a periodic status checker.
func (*Server) StopStatusCheck ¶
func (r *Server) StopStatusCheck()
StopStatusCheck stops the periodic status checker.
func (*Server) SyncProjects ¶
SyncProjects updates the list of projects in RBAC
Click to show internal directories.
Click to hide internal directories.