Documentation ¶
Index ¶
- type Application
- type Server
- func (s *Server) AuthorizeAction(ctx context.Context, action *auth.Action) (*empty.Empty, error)
- func (s *Server) Close() error
- func (s *Server) CreateRole(ctx context.Context, role *auth.Role) (*auth.Role, error)
- func (s *Server) CreateRoleBinding(ctx context.Context, req *auth.CreateRoleBindingRequest) (*empty.Empty, error)
- func (s *Server) DeleteRole(ctx context.Context, request *auth.DeleteRoleRequest) (*empty.Empty, error)
- func (s *Server) DeleteRoleBinding(ctx context.Context, req *auth.DeleteRoleBindingRequest) (*empty.Empty, error)
- func (s *Server) GetRole(ctx context.Context, request *auth.GetRoleRequest) (*auth.Role, error)
- func (s *Server) Serve(address string) error
- func (s *Server) UpdateRole(ctx context.Context, role *auth.Role) (*auth.Role, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { CheckAuthority(ctx context.Context, userID, organizationID string, permission model.Permission) error CreateRole(ctx context.Context, role model.Role) error UpdateRole(ctx context.Context, role model.Role) error GetRole(ctx context.Context, id string) (*model.Role, error) DeleteRole(ctx context.Context, id string) error AssignRole(ctx context.Context, userID, roleID, organizationID string) error RevokeRole(ctx context.Context, userID, roleID string) error }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func New ¶
func New(app Application) *Server
func (*Server) AuthorizeAction ¶
func (*Server) CreateRole ¶
func (*Server) CreateRoleBinding ¶
func (*Server) DeleteRole ¶
func (*Server) DeleteRoleBinding ¶
Click to show internal directories.
Click to hide internal directories.