func HandleRoleMembers(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	// GET /roles/{rolename}/members Retrieve the role's members
	name := ps.ByName("rolename")
	ok, err := lgc.HasRole(name)
	if err != nil {
		return nil, 500, err
	}
	if !ok {
		return nil, 404, fmt.Errorf("no role found with name %s", name)
	}
	arr, sc, err := lgc.RoleMembers(name)
	if err != nil {
		return nil, sc, err
	}
	users := &membersBody{Users: arr, Role: name}
	return users, sc, nil
}
// HandleRoleMembers is the handler of Get the role's members API.
HandleRoleMembers is the handler of Get the role's members API.
// HandleRoleMembers is the handler of Get the role ' s members API .
func HandleRoleMembers(
	user *graylog.User, lgc *logic.Logic,
	w http.ResponseWriter, r *http.Request, ps httprouter.Params,
) (interface{}, int, error) {
	name := ps.ByName("rolename")
	ok, err := lgc.HasRole(name)
	if err != nil {
		return nil, 500, err
	}
	if !ok {
		return nil, 404, fmt.Errorf("no role found with name %s", name)
	}
	arr, sc, err := lgc.RoleMembers(name)
	if err != nil {
		return nil, sc, err
	}
	users := &membersBody{Users: arr, Role: name}
	return users, sc, nil
}
func HandleRoleMembers ( user * graylog . User , lgc * logic . Logic , w http . ResponseWriter , r * http . Request , ps httprouter . Params , ) ( interface { } , int , error ) { name := ps . ByName ( " " ) ok , err := lgc . HasRole ( name ) if err != nil { return nil , 500 , err } if ! ok { return nil , 404 , fmt . Errorf ( " " , name ) } arr , sc , err := lgc . RoleMembers ( name ) if err != nil { return nil , sc , err } users := & membersBody { Users : arr , Role : name } return users , sc , nil }
HandleRoleMembers is the handler of Get the role's members API.
HandleRoleMembers is the handler of Get the role ' s members API .
// GET /roles/{rolename}/members Retrieve the role's members