Documentation ¶
Overview ¶
Package rest provides a gateway to the underlying grpc server
Index ¶
- type RoleHandler
- func (s *RoleHandler) DeleteRole(req *restful.Request, rsp *restful.Response)
- func (s *RoleHandler) Filter() func(string) string
- func (s *RoleHandler) GetRole(req *restful.Request, rsp *restful.Response)
- func (s *RoleHandler) PoliciesForRole(ctx context.Context, resourceId string, resourceClient interface{}) (policies []*serviceproto.ResourcePolicy, e error)
- func (s *RoleHandler) SearchRoles(req *restful.Request, rsp *restful.Response)
- func (s *RoleHandler) SetRole(req *restful.Request, rsp *restful.Response)
- func (s *RoleHandler) SwaggerTags() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleHandler ¶
type RoleHandler struct {
resources.ResourceProviderHandler
}
RoleHandler is the REST specific handler to access the role service
func NewRoleHandler ¶
func NewRoleHandler() *RoleHandler
NewRoleHandler creates and configure a new RoleHandler
func (*RoleHandler) DeleteRole ¶
func (s *RoleHandler) DeleteRole(req *restful.Request, rsp *restful.Response)
DeleteRole provides a REST endpoint to delete a given role given its UUID
func (*RoleHandler) Filter ¶
func (s *RoleHandler) Filter() func(string) string
Filter returns a function to filter the swagger path
func (*RoleHandler) GetRole ¶
func (s *RoleHandler) GetRole(req *restful.Request, rsp *restful.Response)
GetRole provides a REST end point to retrieve a given Role with UUID
func (*RoleHandler) PoliciesForRole ¶
func (s *RoleHandler) PoliciesForRole(ctx context.Context, resourceId string, resourceClient interface{}) (policies []*serviceproto.ResourcePolicy, e error)
PoliciesForRole retrieves Policies bound to a role given its UUID
func (*RoleHandler) SearchRoles ¶
func (s *RoleHandler) SearchRoles(req *restful.Request, rsp *restful.Response)
SearchRoles provides a REST endpoint to query the role repository
func (*RoleHandler) SetRole ¶
func (s *RoleHandler) SetRole(req *restful.Request, rsp *restful.Response)
SetRole provides a REST endpoint to create or update a role in the repository
func (*RoleHandler) SwaggerTags ¶
func (s *RoleHandler) SwaggerTags() []string
SwaggerTags list the names of the service tags declared in the swagger json implemented by this service